How do I draw my own submenu arrow in owner draw menus (and prevent windows from painting its arrow on top of mine)

强颜欢笑 提交于 2019-12-01 08:22:48

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/2716402/how-do-i-draw-my-own-submenu-arrow-in-owner-draw-menus-and-prevent-windows-from

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!