Print Page | Close Window

Pane resize with an ocx on

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=1264
Printed Date: 27 November 2024 at 5:35pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Pane resize with an ocx on
Posted By: castleJoe
Subject: Pane resize with an ocx on
Date Posted: 11 October 2004 at 4:31pm

I just started looking at the docking pane and I managed to attach my ocx to it. The ocx holds some other controls that are resized on the resize event of the ocx, but that is not called although the ocx apparently is resized by the pane. How do I trap the resize event so I can adjust the controls inside the ocx?

Thanks, Joe




Replies:
Posted By: SuperMario
Date Posted: 11 October 2004 at 11:46pm
if you are using commandbars, then only the commandbars_resize even will be called.


Posted By: castleJoe
Date Posted: 12 October 2004 at 12:45am
I'm not using commandbars, I'm talking about docking pane.


Posted By: Oleg
Date Posted: 12 October 2004 at 2:56am

Locate it to picture box without borders and

Private Sub DockingPaneManager_AttachPane(ByVal Item As XtremeDockingPane.IPane)
    Item.Handle = Picture1.Hwnd
End Sub

Private Sub Picture1_Resize()
UserControl11.Move 0, 0, Picture1.Width, Picture1.Height
End Sub

 



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: castleJoe
Date Posted: 12 October 2004 at 3:12am

Thanks Oleg, it almost works. It's working only if the pane is docked, but not when the pane floats (dblclk on the header).

I found out that this is a MS bug ( http://support.microsoft.com/kb/q187740/ - http://support.microsoft.com/kb/q187740/ ) but that doesn't help too much because I doubt that they will ever fix it...



Posted By: castleJoe
Date Posted: 13 October 2004 at 7:26am
I see that nobody from CJ is commenting more on this case - is considered solved from CJ point of view?


Posted By: Geraint P
Date Posted: 13 October 2004 at 9:54am

I'm having a very similar issue as well.

I've followed the code in here, so my panes all have a picture box attached to them. The picture boxes contain the individual OCXs which are then resized in the picture box resize event. Trouble is the contents of the OCX don't seem to be drawn completely. Works fine when panes are getting resized by the splitter, but if a pane is floated and docked somewhere else (causing a resize of the pane with the OCX) then the OCX isn't drawn fully during the resize event. Tab in-and-out of the app and it's drawn fully again. Works fine if I substitute a text box for the OCX.

Any ideas? I'm going to try forcing the OCX to redraw itself in this situation (although I'd have expected the Move method to have done that).

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net