Print Page | Close Window

MarkupWindowContainer help needed

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: MarkupLabel Control
Forum Description: Topics Related to Codejock MarkupLabel Control
URL: http://forum.codejock.com/forum_posts.asp?TID=17446
Printed Date: 05 May 2024 at 9:38pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: MarkupWindowContainer help needed
Posted By: j.godas
Subject: MarkupWindowContainer help needed
Date Posted: 18 October 2010 at 1:24pm
I am using new 13.4.2 and finally find the new MarkupWindowContainer, but I couldn't found any sample how to use it and what's his limits. Can somebody help ?
I amb very interested in insert the new chart pro control in a MarkupLabel schema (see sample). It's possible to use MarkupWindowContainer to do this?




-------------
Product: Xtreme SuitePro ActiveX Ver. 13.4.2
Platform: Windows XP, Windows 7
www.krontime.com
Language: Vb6



Replies:
Posted By: jpbro
Date Posted: 18 October 2010 at 2:18pm
You can attach ActiveX Controls to the MarkupWindowContainer object by setting the hWnd of the AX control to the Child property of the CJ MWC.

It is important that the AX control is a child of the MarkupLabel window (draw the control on the ML window).

Unfortunately, there doesn't appear to be an hWnd property for the Chart control. You might be able to find the hWnd using the API thoug (I will see if I can find it soon, as I had also hoped to drop the chart control into the MarkupLabel).

I've attached a very basic demo using the VB6 TextBox control.

HTH.

uploads/2676/MarkupWindowContainer.zip - uploads/2676/MarkupWindowContainer.zip


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: jpbro
Date Posted: 18 October 2010 at 2:19pm
I should add that I hope to make some more demos available, as this feature is amazing, I've just been incredibly busy lately. If you feel like sharing some demos to help promote the feature, I would enjoy seeing them!




-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: jpbro
Date Posted: 18 October 2010 at 4:19pm
Here's a demo that uses the API to try to find the hWnd of a ChartControl and then attach the control to a MarkupWindowContainer object.

It works, with some caveats:

1) It assumes the parent container scalemode is Twips
2) It won't necessarily find the right Hwnd if 2 or more Chart controls have the same Left/Top/Width/Heights, so make sure that you don't have any 100% overlapping Chart control windows.

I didn't get a chance to put too many comments in, so if you have any questions, please post the here and I will try to answer them.

uploads/2676/ChartHwnd.zip - uploads/2676/ChartHwnd.zip

NOTE: It would be nice if CJ could include an hWnd property to avoid all of this mess!


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: yardiuk
Date Posted: 17 February 2011 at 10:00am

I've also been trying to host the chartcontrol in the windowcontainer but it doesn't work quite right (v15 vb6)

Initally it shows fine but if you click on the chart it moves to the top left corner and shrinks.
I noticed your example above does the same thing, how can i prevent this from happening?
 
Thanks.
 


Posted By: jpbro
Date Posted: 17 February 2011 at 10:31am
It looks like you can put the ChartControl inside a PictureBox and attach the PictureBox Hwnd to the WindowContainer to prevent this problem.

uploads/2676/ChartWindowContainer.zip - uploads/2676/ChartWindowContainer.zip


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: yardiuk
Date Posted: 17 February 2011 at 11:18am

What a star, works fine now using a picture box.

Many Thanks.



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