Win32 get current window size function?
4 replies to this topic
Members - Reputation: 122
Posted 25 June 2003 - 08:12 AM
I want to know if there is a function that will return the current size of the current window. I have found reference of how to get the max and minimum sizes of the current window, but I can''t seem to find anything on google about how to get the current size of the current window. I want to do this in straight WIN32 API, no MFC, no DirectX, no OpenGL.
Staff Emeritus - Reputation: 2067
Posted 25 June 2003 - 02:19 PM
quote:Actually, there is a difference between the two. GetWindowRect returns the dimensions of the entire window - frame, menus, etc - while GetClientRect returns the dimensions of the client or drawable area alone.
Original post by Russell
Not that there is a difference between GetClientRect and GetWindowRect.
Posted 25 June 2003 - 02:39 PM
GetWindowRect also returns screen coords, whereas GetClientRect always returns 0s for left and top and the width in right and the height in bottom. that''s because GetWindowRect''s coords are relative to the desktop origin and GetClientRect''s coords are relative to the given window''s client area.