|
-
March 12th, 2003, 03:58 PM
#1
Window size and documentation conflict
The three functions
CreateWindow()
GetClientRect()
GetWindowRect()
are somehwat in conflict with my documentation.
In CreateWindow() I specify the window position and size with
0,0,100,100.
Then I call
GetClientRect() and GetWindowRect(). I want to get the size of the window frames.
Heres what I get:
clientrect.left = 0
clientrect.top = 0
clientrect.right = 111
clientrect.bottom = 42
windowrect.left = 0
windowrect.top = 0
windowrect.right = 123
windowrect.bottom = 100
It seems that the CreateWindow() function 'width' value gives the width of the client area, not the window, whereas the 'height' value gives the height of the window and not the client.
Is this a known feature? That's not what my documentation says!
-
March 12th, 2003, 09:41 PM
#2
I assume that Windows inherently sets a minimum width and minimum height of the window, so that the user doesn't resize it so much that it becomes hard to find.
-
March 13th, 2003, 05:55 AM
#3
You are right. That was exactly the problem. Setting the width to 100 was below some internal minimum and Windows changed it to something else. When I set the width ro 200, that was no longer the case. So all I did was to let widnows decide the window size and take the difference between the client and window rectangles.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|