Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Back Ground Color

Posted on 1999-10-07
5
Medium Priority
?
348 Views
Last Modified: 2013-11-20
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
0
Comment
Question by:sumsumsum
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 10

Expert Comment

by:viktornet
ID: 2108840
in OnPaint() of your windwos do a FillRect() with your prefered brush...

..-=ViKtOr=-..
0
 

Author Comment

by:sumsumsum
ID: 2109019
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......
0
 
LVL 5

Accepted Solution

by:
vachooho earned 20 total points
ID: 2109024
handle WM_ERASEBackGROUND message
and do the same : FillRect().
If you don;t want statusbar's rect to be painted - exclude it from rectangle you are going to paint


0
 
LVL 5

Expert Comment

by:vachooho
ID: 2109026
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

0
 

Author Comment

by:sumsumsum
ID: 2109126
I got it works now.... Thanks
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question