Link to home
Start Free TrialLog in
Avatar of sumsumsum
sumsumsum

asked on

Back Ground Color

I have created some child frame in my program. But I haven't add any DocTemplate to the application.
I found I cannot change the BackGround Color of both the MainFrame and all the CHild Frame.

How can I change the BackGround Colour of each frame?

Thanks
Avatar of viktornet
viktornet
Flag of United States of America image

in OnPaint() of your windwos do a FillRect() with your prefered brush...

..-=ViKtOr=-..
Avatar of sumsumsum
sumsumsum

ASKER

I have try this but I found the colour paint into the status bar also.....

And when I move the child frame within the mainframe.....

the background just don't update......
ASKER CERTIFIED SOLUTION
Avatar of vachooho
vachooho
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ups
child frame moving doesn;t update mainframe's background because it is not a MainFrame;s background - what you see is the MDI client window. You need to manage somehow its WM_ERASEBACKGROUND

Client Window pointer is stored in CMDIFrameWnd's member variable m_pClientWnd

I got it works now.... Thanks