Click here to Skip to main content
11,797,944 members (77,799 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C Windows Color menu

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 10:33am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can handle WM_NCPAINT and paint the frame yourself.
mardul at 23-Oct-11 11:07am
Thank you very much!
Rate this: bad
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 ?
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 CPallini 575
1 Maciej Los 375
2 OriginalGriff 353
3 Abhinav S 342
4 Richard MacCutchan 218
0 OriginalGriff 2,150
1 Maciej Los 1,790
2 KrunalRohit 1,456
3 CPallini 1,415
4 Richard MacCutchan 1,016

Advertise | Privacy | Mobile
Web03 | 2.8.151002.1 | Last Updated 24 Nov 2012
Copyright © CodeProject, 1999-2015
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