如何在所有者绘制菜单中绘制自己的子菜单箭头(并防止窗口将其箭头绘制在我的顶部)

发布于 2024-08-30 17:07:04 字数 190 浏览 2 评论 0原文

Windows 似乎在我在 WM_DRAWITEM,如何阻止Windows绘制箭头?

Windows seems to draw the submenu arrow after I have done my painting in WM_DRAWITEM, how can I stop windows from drawing the arrow?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

哆啦不做梦 2024-09-06 17:07:04

请参阅 所有者在 CodeGuru 上绘制子菜单箭头

简而言之,操作系统总是在您绘制完菜单项后绘制箭头,但您可以使用 ExcludeClipRect()HDC 中排除菜单项的矩形'完成在可绘制区域内的绘制后,操作系统将无法在您的绘图之上进行绘制。

See Owner Drawing the Submenu Arrow on CodeGuru.

In a nutshell, the OS always draws the arrow after you are done drawing the menu item, but you can use ExcludeClipRect() to exclude the menu item's rectangle from the HDC's drawable area after you are done drawing inside of it, so that the OS can't draw over top of your drawing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文