CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Guest

    Dynamically sizing an ActiveX control

    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


  2. #2
    Guest

    Re: Dynamically sizing an ActiveX control

    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.


  3. #3
    Guest

    Re: Dynamically sizing an ActiveX control

    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


  4. #4
    Join Date
    Apr 1999
    Location
    Portland, OR, USA
    Posts
    18

    Re: Dynamically sizing an ActiveX control

    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
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured