CEdit::GetClientRect() returns wrong info? 
Author Message
 CEdit::GetClientRect() returns wrong info?

I have a problem resizing a CEdit (textbox) control in a dialog. I
call GetClientRect() to get the current size of the control, then
resize the control appropriately by calling MoveWindow() on the
control. It seems that the next time i call GetClientRect() the RECT
returned is 4 pixels smaller than the one I passed to MoveWindow().
What gives?

Thanks,
Bob



Mon, 26 Jan 2004 22:14:49 GMT  
 CEdit::GetClientRect() returns wrong info?
Hi..

    I think you need to use GetWindowRect(..) instead of the
GetClientRect(.. )

Cheers
Check Abdoul
--------------------


Quote:
> I have a problem resizing a CEdit (textbox) control in a dialog. I
> call GetClientRect() to get the current size of the control, then
> resize the control appropriately by calling MoveWindow() on the
> control. It seems that the next time i call GetClientRect() the RECT
> returned is 4 pixels smaller than the one I passed to MoveWindow().
> What gives?

> Thanks,
> Bob



Mon, 26 Jan 2004 22:34:17 GMT  
 CEdit::GetClientRect() returns wrong info?

Quote:

> Hi..

>     I think you need to use GetWindowRect(..) instead of the
> GetClientRect(.. )

Yes that works. Thank you. Makes sense, Get>>>Client<<<Rect() *should*
return the *client* area rect, which for the textbox is inside the 3-d
border...

Bob



Tue, 27 Jan 2004 03:44:04 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. GetClientRect returns different values each time app is run

2. CView::GetClientRect returning null rect

3. CWnd::GetClientRect(struct tagRECT *) returns all-zero rectangle.

4. Getting wrong Timezone info on WINNT Japanese version

5. Parameter info for CreateWindow() is wrong

6. this.location this.width etc return wrong values intermittantly

7. IndexOf returning wrong result

8. Com objects returning wrong results when called from C#

9. Wrong return declaration(please help)!

10. atof returning large, wrong floats

11. wrong malloc return

12. -How do i return an error when any thing gone wrong inside thread procedure-

 

 
Powered by phpBB® Forum Software