06-17-2009 10:25 AM
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
Solved! Go to Solution.
06-19-2009 11:48 AM - edited 06-19-2009 11:49 AM
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
06-22-2009 03:16 AM
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 )
Have you examples in VB of how to link a specific chm page to a VB function used in a step ?
PFo
06-22-2009 10:20 AM - edited 06-22-2009 10:22 AM
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
06-24-2009 09:01 AM
Doug, that's the point ! !
The documentation clearly shows how to do, and it works.
thanks for your help
Phil.