The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: starzboy on July 18, 2009, 02:28:51 PM

Title: Statusbar color
Post by: starzboy on July 18, 2009, 02:28:51 PM
Hi

I have colored a dialogbox and the statics, but the color of status bar has not chnaged and looks weird.
How does one change the color of a statusbar ?

thanx
Title: Re: Statusbar color
Post by: ramguru on July 18, 2009, 02:35:08 PM
maybe with SB_SETBKCOLOR message  :wink
Title: Re: Statusbar color
Post by: MichaelW on July 18, 2009, 06:54:16 PM
In my quick test sending a SB_SETBKCOLOR message from the WM_INITDIALOG handler worked as expected for a dialog that was not user-sizable. But for a user-sizeable dialog the sizing area at the right end of the status bar remained at the default background color, unaffected by the color set with SB_SETBKCOLOR or in my WM_CTLCOLORDLG handler. The attachment shows the problem. At this point I have no idea of how to correct the problem.

[attachment deleted by admin]
Title: Re: Statusbar color
Post by: Slugsnack on July 18, 2009, 07:03:34 PM
it might be worth it to try to call setwindowpos() after you send the message. some changes don't always take place till you do that. eg. setwindowlong
Title: Re: Statusbar color
Post by: MichaelW on July 18, 2009, 07:41:15 PM
The problem can be eliminated by maximizing the window (but only while it is maximized), and otherwise the problem is not affected by moving, sizing, or forcing a redraw.