Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - error MoveAlignedControl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

error MoveAlignedControl

 Post Reply Post Reply
Author
Message
cory View Drop Down
Groupie
Groupie


Joined: 31 August 2004
Location: Italy
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote cory Quote  Post ReplyReply Direct Link To This Post Topic: error MoveAlignedControl
    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



Edited by cory
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 08 September 2004 at 10:45am
Can you post the sample, or send the sample to support?

Edited by SuperMario
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
cory View Drop Down
Groupie
Groupie


Joined: 31 August 2004
Location: Italy
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote cory Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
cory View Drop Down
Groupie
Groupie


Joined: 31 August 2004
Location: Italy
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote cory Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Geraint P View Drop Down
Newbie
Newbie


Joined: 13 September 2004
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Geraint P Quote  Post ReplyReply Direct Link To This Post 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.

 

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.203 seconds.