![]()  | 
 
MarkupWindowContainer help needed | 
 
    Post Reply  
   | 
  
| Author | |
   
   j.godas  
   
   Newbie  
   Joined: 25 November 2009 Location: Spain Status: Offline Points: 6  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: MarkupWindowContainer help neededPosted: 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  | 
 |
![]()  | 
 |
   
   jpbro  
   
   Senior Member  
   Joined: 12 January 2007 Status: Offline Points: 1357  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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  | 
 |
![]()  | 
 |
   
   jpbro  
   
   Senior Member  
   Joined: 12 January 2007 Status: Offline Points: 1357  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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  | 
 |
![]()  | 
 |
   
   jpbro  
   
   Senior Member  
   Joined: 12 January 2007 Status: Offline Points: 1357  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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  | 
 |
![]()  | 
 |
   
   yardiuk  
   
   Newbie  
   Joined: 19 October 2010 Status: Offline Points: 2  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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. 
 | 
 |
![]()  | 
 |
   
   jpbro  
   
   Senior Member  
   Joined: 12 January 2007 Status: Offline Points: 1357  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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  | 
 |
![]()  | 
 |
   
   yardiuk  
   
   Newbie  
   Joined: 19 October 2010 Status: Offline Points: 2  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 17 February 2011 at 11:18am | 
 
| 
   
    What a star, works fine now using a picture box. Many Thanks. 
    | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  |