Windows programming

Moderators: None (Apply to moderate this forum)
Number of threads: 3711
Number of posts: 9173

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
How to change the backgroundcolor of a menu in VC6 Posted by SteveDavis on 6 Dec 2003 at 5:18 AM
Hi there,

I've written a dialog based program. I've changed the background color of the dialog itself and a few of the controls (using OnCtlColor). This works OK. Dialog looks fine, but when I add a menubar, this menu is still shown in grey (standard background color). I would like to change that.
Is it also possible to change the backgroundcolor of standard messageboxes? The alternative is that I create the dialogs myself (as a resource).

Any help on this would be greatly appreciated.

Steve

Report
Re: How to change the backgroundcolor of a menu in VC6 Posted by pingpong on 6 Dec 2003 at 10:30 AM
: Hi there,
:
: I've written a dialog based program. I've changed the background color of the dialog itself and a few of the controls (using OnCtlColor). This works OK. Dialog looks fine, but when I add a menubar, this menu is still shown in grey (standard background color). I would like to change that.

Yes, you need to use owner draw menus. Petzold book has an example on that and I have some source code over here as well:
http://www.geocities.com/al_ani/OwnerDrawMenu.zip
(copy/paste to your browser, do not click).

: Is it also possible to change the backgroundcolor of standard messageboxes?

Dont think so.

:The alternative is that I create the dialogs myself (as a resource).

That's the the way to go.




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.