NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Comment utiliser le bouton grisé ? dans l'editeur ActiveX/COM?

Solved!
Go to solution

bonjour,

 

je souhaiterais associer une aide à chacun de mes "steps" dans l'éditeur d'ActiveX/COM. Il y a un bouton "?" grisé et je veux le rendre actif.

 

Comment créer le lien entre ce bouton, le fichier d'aide et ma "Method"?

 

J'ai cherché sur le forum et j'ai trouvé un seul cas identique et sans réponse pour l'instant "Add Documentation to custom DLL-Teststeps".

 

merci pour votre aide.

P.F

 

 

0 Kudos
Message 1 of 5
(3,824 Views)

I do not know French that well, but I know the answer to your question so hopefully someone can translate this for you if needed.

 

Basically what you need to do is add a helpfile tag and helpcontext and/or helpstring tags to the library, methods, and interfaces in your COM object's type library. If you are using C++ and an .idl file it looks something like this:

 

At the top of your idl file:

 

[
    uuid(LibraryGUID),
    version(1.0),
    helpstring("Help string"),
    helpfile("..\\Doc\\Help\\TSAPIRef.chm")
]
library libraryName

 

For each interface:

 

    [helpcontext(HlpIDConstant) ,helpstring(HelpString) ,
        uuid(InterfaceGUID),
        dual,
        pointer_default(unique)
    ]
    interface MyInterface : IDispatch
 

For each method:

 

        [helpcontext(HlpIDConstant) ,helpstring(HelpString), id(642)] HRESULT                MyMethod();


 Hope this helps,

-Doug

Message Edited by dug9000 on 06-19-2009 11:49 AM
0 Kudos
Message 2 of 5
(3,802 Views)

Hi dug9000,

thanks for your answer.

This solution looks good, and I'll try to adapt it to my ActiveX because it has been developped using Visual Basic 6.0 (nobody's perfect I guess Smiley Wink )

 

Have you examples in VB of how to link a specific chm page to a VB function used in a step ?

 

PFo

0 Kudos
Message 3 of 5
(3,772 Views)
Solution
Accepted by topic author philfour

I've never done this in VB 6.0, but I found a Microsoft help page which explains how to do it.

 

http://msdn.microsoft.com/en-us/library/aa716313(VS.60).aspx

 

Let us know if this works for you,

-Doug

Message Edited by dug9000 on 06-22-2009 10:22 AM
0 Kudos
Message 4 of 5
(3,766 Views)

Doug, that's the point ! !

The documentation clearly shows how to  do, and it works.

 

thanks for your help

 

Phil. 

0 Kudos
Message 5 of 5
(3,744 Views)