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
Printable View
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
Strange, movewindow should do the trick. can u post your code and elaborate a bit about what you wanna do.
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);
}
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.