Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C Windows Color menu
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 21-Oct-11 11:33am
mardul126
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You can handle WM_NCPAINT and paint the frame yourself.
  Permalink  
Comments
mardul at 23-Oct-11 11:07am
   
Thank you very much!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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 ?
  Permalink  
Comments
Nelek at 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)

  Print Answers RSS
0 OriginalGriff 304
1 Maciej Los 285
2 Sergey Alexandrovich Kryukov 255
3 Shweta N Mishra 216
4 PIEBALDconsult 174
0 OriginalGriff 7,660
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,760


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 24 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100