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

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

问题描述

Windows似乎在之后绘制了子菜单箭头.我在解决方案

请参见WM_DRAWITEM, how can I stop windows from drawing the arrow?

解决方案

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.

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

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