Print Page | Close Window

error MoveAlignedControl

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=1144
Printed Date: 26 June 2024 at 6:36am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: error MoveAlignedControl
Posted By: cory
Subject: error MoveAlignedControl
Date Posted: 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




Replies:
Posted By: SuperMario
Date Posted: 08 September 2004 at 10:45am
Can you post the sample, or send the sample to support?


Posted By: SuperMario
Date 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()




Posted By: cory
Date 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)

https://forum.codejock.com/uploads/cory/2004-09-09_030411_MoveAlignedCtlEx.zip - 2004-09-09_030411_MoveAlignedCtlEx.zip

thank you so much.



Posted By: Oleg
Date 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


Posted By: cory
Date 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



Posted By: Geraint P
Date 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
   hWnd = UserControl.hWnd
End Property

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.

 




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