![]()  | 
 
error MoveAlignedControl | 
 
    Post Reply  
   | 
  
| Author | |
   
   cory  
   
   Groupie  
   Joined: 31 August 2004 Location: Italy Status: Offline Points: 26  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: error MoveAlignedControlPosted: 06 September 2004 at 3:46am  | 
 
| 
   
    Hi, I got a little problem, i'm using my ocx in a form that have command bar when i call the method MoveAlignedControl to size the ocx at the bottom of commandbar i got this error: run-time error '-2147417848 (80010108)... I get an answer from support of codejoke that tall me to implement the DISPID_HWND to allow CommandBars retieve window handle. I know it's my fault, but I don't know how to make it :-( can somebody help me? PS: I know i can use a picture as container but I'd like to do without it... thanks Edited by cory  | 
 |
![]()  | 
 |
   
   SuperMario  
   
   Senior Member  
    
   Joined: 14 February 2004 Status: Offline Points: 18057  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 08 September 2004 at 10:45am | 
 
| 
   
    
   
Can you post the sample, or send the sample to support?
 
   
  Edited by SuperMario  | 
 |
![]()  | 
 |
   
   SuperMario  
   
   Senior Member  
    
   Joined: 14 February 2004 Status: Offline Points: 18057  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 08 September 2004 at 11:11am | 
 
| 
   
    
   
I think he meant to add  "DISP_STOCKPROP_HWND()" to your dispatch map of the OCX control you are creating. 
   
  DISP_STOCKPROP_HWND() DISP_STOCKPROP_ENABLED() Edited by SuperMario  | 
 |
![]()  | 
 |
   
   cory  
   
   Groupie  
   Joined: 31 August 2004 Location: Italy Status: Offline Points: 26  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 09 September 2004 at 3:04am | 
 
| 
   
    thank you for reply! :-) I post a little sample that shows the problem... (is not myproject but as the same behaviour) 2004-09-09_030411_MoveAlignedCtlEx.zip thank you so much.  | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 10 September 2004 at 2:56am | 
 
| 
   
    All you need to do is Tools->Procedure Attributes-> (hWnd) ->Advanced -> Procedure Id = hWnd  | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   cory  
   
   Groupie  
   Joined: 31 August 2004 Location: Italy Status: Offline Points: 26  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 10 September 2004 at 4:54am | 
 
| 
   
    THANK YOU!!!!!! it works perfectly now!... i was near the solution but i didn't know this thing about vb :-(...it's my fault... thanks  | 
 |
![]()  | 
 |
   
   Geraint P  
   
   Newbie  
   Joined: 13 September 2004 Status: Offline Points: 19  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 15 September 2004 at 11:33am | 
 
| 
   
    In the interests of clarity (for anyone else other than Cory). Just had to do this myself and the precise instructions are... In your usercontrol ensure you have the following property defined: Public Property Get hWnd() As Long Then (as shown above) go to Tools>Procedure Attributes, select the hWnd property in the Name combo, click on Advanced and select hWnd in the Procedure ID combo. Click OK. Should work fine then. 
  | 
 |
![]()  | 
 |
    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  |