Click to See Complete Forum and Search --> : Dynamically sizing an ActiveX control
April 5th, 1999, 12:51 PM
I have a method that resizes my MFC ActiveX control. When I call this method from within the ActiveX Control Test Container it appears to resize the control properly, as the bounds rectangle with the diagonal lines in it grows, but only the original area is redrawn, and the rest is all diagonal lines.
I'm using SetControlSize to change the size.
Any suggestions?
Dave Relyea
April 5th, 1999, 01:29 PM
Hi,
Check out this MSDN article if you haven't seen it already: Q168326. Search
on this ref #. You can do this resizing stuff in COleControl::OnSetExtent().
Steve B.
April 5th, 1999, 03:43 PM
Steve,
Thanks for your reply. It didn't seem to work, though. It looks to me like the OnSetExtent method is more for verifying and/or restricting the size when the user or a container attempts to resize the control.
My problem is that the control is trying to resize itself, and although the bounds appear to be changing, it isn't redrawn, and the child controls do not appear.
Dave
ValerieB
April 5th, 1999, 05:38 PM
Have you tried calling Refresh() after calling SetControlSize()? It's a member of COleControl and takes no parameters. Call this function to force a repaint of the OLE control.
Hope this helps!
Valerie Bradley
http://www.synthcom.com/~val
val@synthcom.com
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.