Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Xtremehobo

Changing window class attributes (MDI Backgrounds)

This topic is 5210 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

heya, How would I go about accessing and changing specific attributes (i.e. hbrBackground) from a pre-defined window class such as "MDICLIENT" in win32 c++? If this helps to make it more clear, I basically need to change the hbrBackground member of my MDI client window so I can change its background color. I've been able to change the color of the MDI Frame window, but as soon as the client window updates, its default MDI-gray is painted all over my lovely colored background on the frame window Thanks! Matt [edited by - Xtremehobo on April 15, 2004 10:36:02 PM]

Share this post


Link to post
Share on other sites
Advertisement
You don''t deal with the window class, you deal with the window. (Changing the attribute of the window class may or may not affect an already created window; it''s undefined AFAIK.) What you want to do is to change the background brush for that window; look into SelectObject and the various drawing functions cross-listed at the bottom of that page.

Share this post


Link to post
Share on other sites
I''m getting a bit confused now. How does SelectObject know which brush to change for my client window''s DC? I''m trying this code:
SelectObject(hDC,GetStockObject(DC_BRUSH));
SetDCBrushColor(hDC,RGB(255,0,0);

and it''s not changing anything. I probably sound pretty stupid right now because I''ve still got no idea what I''m doing.

Thanks for the help though

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!