|
-
June 21st, 2004, 11:43 PM
#1
How to resize a control through code
Hi All,
I have created a very simple activex control. I want to resize it through code.I tried putting MoveWindow(..) in OnDraw. But it doesn't seem to work.Can anybody pls help me out?
Thanx,
Meenu
-
June 21st, 2004, 11:52 PM
#2
Strange, movewindow should do the trick. can u post your code and elaborate a bit about what you wanna do.
-
June 21st, 2004, 11:59 PM
#3
I haven't done much..In OnDraw function of the activexcontrol class, I call MoveWindow as follows
void COnOffControlCtrl::OnDraw(
CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
{
DoSuperclassPaint(pdc, rcBounds); //Wizard generated code
MoveWindow(rcBounds.left, rcBounds.top, 1000, 1000, TRUE);
}
-
June 22nd, 2004, 02:24 AM
#4
Why did you put the code in OnDraw()?
Do you really want the resizing to happen every time it is Drawn?
I would prefer letting the application using the control decide when and how to resize it.
Extreme situations require extreme measures
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
|