设置Windows弹出菜单(框架)的颜色? [英] Setting windows popup menu (frame) colors?

查看:159
本文介绍了设置Windows弹出菜单(框架)的颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我如何在Windows上设置弹出菜单的颜色.我知道如何通过MENUINFO hbrBack设置背景颜色,以及如何所有者绘制项目,但是我找不到如何设置框架颜色.弹出菜单框是浅色的,在我的应用中看起来很黑,颜色很深.我已经搜索了MSDN并在Google周围搜索了此信息,但找不到答案.如果我可以设置框架颜色,完全隐藏框架,甚至自己绘制菜单背景,我都会很高兴.我需要在XP及更高版本上使用它.我将不胜感激,即使解决方案证明是不切实际或不可能的.

Hello,

how can i set the colors of a popup menu on windows. I know how to set the background color via MENUINFO hbrBack and how to ownerdraw the items, but i can''t find out how to set the frame color. The popup menu frame is light which looks awful in my app that has very dark colors. I''ve searched MSDN and googled around for this but can''t find the answer. I would be happy if i could just either set the frame color, hide the frame entirely or even draw the menu background myself. I need this to work on XP and later. I will appreciate any help, even if the solution turns out impractical or impossible.

推荐答案

您可以处理WM_NCPAINT并自己绘制框架.
You can handle WM_NCPAINT and paint the frame yourself.


如何处理WM_NCPAINT消息? menu是一个窗口,类似于HWND,如何处理菜单的窗口处理?
How to handle the WM_NCPAINT msg ? menu is a window , something likes a HWND , how to deal with a window proc of a menu ?


这篇关于设置Windows弹出菜单(框架)的颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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