Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > MarkupLabel Control
  New Posts New Posts RSS Feed - MarkupWindowContainer help needed
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MarkupWindowContainer help needed

 Post Reply Post Reply
Author
Message
j.godas View Drop Down
Newbie
Newbie
Avatar

Joined: 25 November 2009
Location: Spain
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote j.godas Quote  Post ReplyReply Direct Link To This Post Topic: MarkupWindowContainer help needed
    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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

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

Back to Top
yardiuk View Drop Down
Newbie
Newbie
Avatar

Joined: 19 October 2010
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote yardiuk Quote  Post ReplyReply Direct Link To This Post 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.
 
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
yardiuk View Drop Down
Newbie
Newbie
Avatar

Joined: 19 October 2010
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote yardiuk Quote  Post ReplyReply Direct Link To This Post Posted: 17 February 2011 at 11:18am

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

Many Thanks.
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.154 seconds.