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

后端 未结 1 743
夕颜
夕颜 2021-01-06 16:26

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条回答
  • 2021-01-06 17:25

    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.

    0 讨论(0)
提交回复
热议问题