Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - C# ActiveX Drawing Problems
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

C# ActiveX Drawing Problems

 Post Reply Post Reply
Author
Message
mzuber View Drop Down
Newbie
Newbie


Joined: 03 May 2006
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote mzuber Quote  Post ReplyReply Direct Link To This Post Topic: C# ActiveX Drawing Problems
    Posted: 23 October 2006 at 5:28pm

I am currently having a problem with resizing controls written in C# when they are in a floating window. I have discovered that the issue is with CreateControl - the code currently passes the main application window in as the parent.  With C# controls, this means that they will only redraw themselves up to the size of their parent window.  This is only an issue when they are contained in a floating window which resizes larger than the main application window.  

My attempted solution was to pass in the CXTPDockingPaneTabbedContainer* as the parent window.  If the pane starts out floating, then this solution actually works.  If the pane starts docked, and is made floating, this causes huge problems. The docked pane is destroyed when it is floated, which then destroys any controls which listed it as their parent.  I have tried forcing the C# controls to set their parent to the main application window before the float occurs, then setting the parent back to the floating container, but this doesn't work - the controls are still destroyed.  I should mention that if I pass in the application window to CreateControl, then do a SetParent afterwards with the tabbed container, the controls still redraw incorrectly.  Is their any way to allow the C# controls to use the tabbed container as their parent for redrawing?  This might fundamentally be an MFC issue, and I just don't understand some small step that is necessary to switch the container for an ActiveX control.  Either way, I appreciate any help you can provide.
 
Thanks,
Michael Zuber
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.