Jump to content
  • Advertisement

Archived

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

Screndib

CWnd::CalcWindowRect returns an incorrect window size.

This topic is 6301 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 want to resize the window so that the client area measures 524x524. I use this code to make a CRect of the correct size:
    
CRect rect( 0, 0, 524, 524 );
CalcWindowRect( &rect );
SetWindowPos( NULL, 0, 0, rect.Width(), rect.Height(), SWP_NOZORDER | SWP_NOMOVE | SWP_NOREDRAW );
     
The problem is that it's calculating the window 4px too small so the right and bottom are cut off by 4px. I did a screen cap and it came out that the client area was 520x520. Am I doing something wrong here or what? Edited by - Screndib on March 18, 2001 6:18:54 PM

Share this post


Link to post
Share on other sites
Advertisement

  • 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!