Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted

You can handle WM_NCPAINT and paint the frame yourself.
 
Share this answer
 
Comments
mardul 23-Oct-11 11:07am    
Thank you very much!
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 ?
 
Share this answer
 
Comments
Nelek 24-Nov-12 13:59pm    
Please don't post solutions to add information, to ask something or to comment another user.
- To add information to your message, you can use the widget "Improve question" / "Improve solution" at the bottom of your text.
- To ask/answer a user, you can use the widget "Have a question or comment?" (as I am doing right now with you) or the widget "reply" in another comment.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900