如何在所有者绘制菜单中绘制我自己的子菜单箭头(并防止窗口在我的顶部绘制箭头) [英] How do I draw my own submenu arrow in owner draw menus (and prevent windows from painting its arrow on top of mine)

查看:15
本文介绍了如何在所有者绘制菜单中绘制我自己的子菜单箭头(并防止窗口在我的顶部绘制箭头)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows 似乎在之后绘制子菜单箭头我在WM_DRAWITEM,如何阻止窗口绘制箭头?

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?

推荐答案

参见 所有者在 CodeGuru 上绘制子菜单箭头.

简而言之,在您绘制完菜单项后,操作系统总是会绘制箭头,但您可以使用 ExcludeClipRect()HDC 中排除菜单项的矩形code> 的可绘制区域在您在其中绘制完成后,以便操作系统无法在您的绘图之上绘制.

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.

这篇关于如何在所有者绘制菜单中绘制我自己的子菜单箭头(并防止窗口在我的顶部绘制箭头)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆