|
-
June 14th, 1999, 03:13 AM
#1
GetClientRect and OnSize...
Hi,
I have a silly question..., GetClientRect, get the rectangle of the window without the window header ( and all this ****) ?, And OnSize, the parameter cy get the size of the window with or wihtout the header and.. ?, I'm trying to resize windows in a pretty way, and I have some problems..
Thanks, Bye !
Braulio
-
June 14th, 1999, 08:29 AM
#2
Re: GetClientRect and OnSize...
Try MoveWindow(x1,y1,x2,y2);
-
June 14th, 1999, 12:02 PM
#3
Re: GetClientRect and OnSize...
GetClientRect and the CX and CY parameters of OnSize are the same. They are the size of the client rect (that rect minus the title bar, caption, edges).
-
June 14th, 1999, 12:18 PM
#4
Re: GetClientRect and OnSize...
When I have used GetClientRect() in the past it has always included the offset from the parents window as well. Has anybody else seen this problem?
I have to use this code :
CRect rect ;
CRect parent ;
GetClientRect(&rect) ;
GetParent()->GetWindowRect(&parent) ;
rect -= CPoint(parent.left, parent.top) ;
This gets the actual rectangle of the client area in client co-ordinates. Or can I just use ScreenToClient(&rect) to translate it correctly?
Roger Allen
Please use meaningful question titles - "Help me" does not let me know whether I can help with your question, and I am unlikely to bother reading it.
Please remember to rate useful answers. It lets us know when a question has been answered.
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
|