Here's a simple addin which integrates radasm with the HtmlHelp system. In particular it will launch the Platform SDK collection help file. Any word which is highlighted in the active edit control will be passed to the help file which opens to the index...
Place the dll in your radasm\addins directory and edit radasm.ini accordingly.

It uses the environment varable MSSdk(created automatically when you install the platform sdk) to locate the SDK path...

Welcome back!
In the installdll procedure I've simplified the process of adding a button to the toolbar...This way is more correct I think...
I tried to add an item to the contextmenu but haven't suceeded...

Let me know how it works for you...

look in next message for attachment
Posted on 2002-06-04 17:27:36 by MArtial_Code
Hi MArtial_Code

The addin looks great, but I am not able to test it. I dont have platform SDK, only the MSDN library.
The edit context menu is the same menu as the edit menu. Just change mov nMnu,6 to mov nMnu,1. If you do this you can remove AIM_MENUREBUILD and WM_INITMENUPOPUP handeling.
One more thing. If the selection is more than 100 bytes you will get a buffer overrun. You should check the length of the selection and change it if it is too long.

Posted on 2002-06-05 02:35:02 by KetilO
IIRC someone did similar addin for RadASM called MSDNHelp, but it hooks F1 key for hotkey and searched the word where was currsor.

cool addin u've done:alright:
Posted on 2002-06-05 06:56:54 by NEMO
I've made some changes as suggesed by Ketilo..
The menu item is moved to the contextmenu...
The selected text is checked for length and truncated if necessary
The addin now uses the registry instead of the environment variable
The topic of the selected text, if it's a keyword, now opens automatically...

Ketilo can you refresh my memory on what should be returned in eax if a message is processed it possible to make transparent .bmp ? if not how do you make toolbar buttons which hide the background color?
Posted on 2002-06-05 08:22:52 by MArtial_Code

Works great on WinME...thanks!
Posted on 2002-06-05 08:43:26 by gscundiff
Hi MArtial_Code

What to return in eax depends on the message you are handeling and if you dont want RadASM or other addins to process the message. In most cases return FALSE.

Cant remember the api to set background color of a bmp.

You are using:

invoke LoadBitmap,hInstance,IDBMP_TBBMP
mov myaddbitmap.nID,eax

Use instead:

;Set toolbar bitmap
m2m myaddbitmap.hInst,hInstance
mov myaddbitmap.nID,IDBMP_TBBMP

and let windows handle the transparency.

Posted on 2002-06-05 09:39:21 by KetilO
Hi MartialCode,
Sorry, but the easiest things sometimes are rather confusing to the untrained.
Could you please explain
"Place the dll in your radasm\addins directory and edit radasm.ini accordingly".

I added this to the RadAsm.ini:

;FlipCase,x (1=Flip case, 2=Auto Show/Hide Output, 4=Auto Show/Hide ToolBox, 8=Save as temp, 16=Page Break, 31=All)
5=platsdk.dll,1 <====Added by me

Is this what you meant or something else?

Also, you wanted the folder "platsdk" in the RadAsm directory???

Thanks for your patience, and this great tool.
Posted on 2002-06-06 09:22:17 by BeHereNow

;FlipCase,x (1=Flip case, 2=Auto Show/Hide Output, 4=Auto Show/Hide ToolBox, 8=Save as temp, 16=Page Break, 31=All)
5=platsdk.dll,1 <====Added by me

Yes that's correct...
don't forget to put platsdk.dll in radasm\addins

You must have the Platform SDK installed (free from Microsoft for Win2k/98) for the addin to do anything...If the SDK isn't installed then youll get an error message...

to use it highlight the word you want help on then click the Plat SDK button on the toolbr or use the contextmenu...
Posted on 2002-06-06 13:15:13 by MArtial_Code
It's working great. Thanks for the help and this great addin.
Posted on 2002-06-06 17:27:22 by BeHereNow
MArtial_Code, I have the November 2001 PSDK installed and it didn't create the environment variable MSSdk. Also, I keep getting the can't load hhctrl.ocx error. I'm taking a look at the code now. This is on WinXP. Could it be security issues around accessing the system directory?

Sorry, I was using an old version. :stupid:
It works great!!
Posted on 2002-06-09 12:30:57 by bitRAKE
The latest version does not use the environment variable instead it gets the path from the registry.... make sure you've got the latest version...

The error message is displayed if the address used to call the HtmlHelp function in the .ocx is NULL. This value is null for two reasons...
1)the addin wasn't successfull in retrieving the path info from the registry
2) The call to GetProcAddress failed...

Check to see if the registry path exists...

You got yours in before me !
Posted on 2002-06-09 12:44:31 by MArtial_Code