Jump to content
  • Advertisement
Sign in to follow this  
comservlant

change client rectangle?

This topic is 5094 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

I have a simple (overlapped) win32 window I print text to. On WM_CREATE I first initialize a toolbar window, then get the text metrics for the font I want and resize the main window to handle the length of a line of text. After initialization in WM_CREATE, I first call ShowWindow() on the toolbar, then force a repaint of the main window with InvalidateRect(). When the window paints, the text is overwritten by the toolbar, the client rect still thinks it has the whole main window to display in, is there a way to resize the client area of a window? Do I have to send a WM_SIZE to the toolbar?, If so what do I tell it in WPARAM/LPARAM? Thanks for any help, George

Share this post


Link to post
Share on other sites
Advertisement
You can use AdjustWindowRect() to help change the window's size so that the client has the desired dimensions. The input rectangle is the desired client dimensions and given the window's styles the function will modify the RECT to be the dimensions of the entire window for you to use in SetWindowPos().

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!