PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: John Montenigro on February 10, 2009, 10:21:29 PM

Title: Organize User Tools - adding H2Viewer for the SDK
Post by: John Montenigro on February 10, 2009, 10:21:29 PM
In the PB forums, I posted a question about installing the SDK on my local hard drive, and I got good info and now have access to it (as opposed to the MSDN online which I find painfully slow).

Someone suggested using H2Viewer with the SDK files, and it's a very nice help browser. I can now actually search the SDK files with intelligence and speed!

http://www.powerbasic.com/support/pbforums/showthread.php?t=39806 (http://www.powerbasic.com/support/pbforums/showthread.php?t=39806) message #5

SO, naturally, I want to make this connection through FireFly as well. Dave says he uses the following parameters:

QuoteCommand:  C:\H2Viewer135\H2Viewer.exe
Arguments:  /XNav /appid EditPlus /helpcol MS.PSDKXPSP2.1033 /filterquery /Search $(CurSel)

I was able to add a shortcut to my desktop and use these params, but when I went to FF's Tools/Organize User Tools/Add, and entered them, H2 won't come up...

I entered the Tool Name as "SDK Help (H2 Viewer)", put the .EXE in for the Command Line, his Arguments as the Parameters, and set the Working Folder to "E:\Program Files\Microsoft SDK\Help". No accelerators, Action is "Invoke only when selected by user", and the 3 checkboxes are not checked.

The menu shows "SDK Help (H2 Viewer)", but selecting this line via mouse or keystrokes appears to do nothing.

What have I left out/forgotten? (FF version is 2.95)
-John

Title: Re: Organize User Tools - adding H2Viewer for the SDK
Post by: John Montenigro on February 16, 2009, 04:35:06 PM
Anyone?  :(
Title: Re: Organize User Tools - adding H2Viewer for the SDK
Post by: TechSupport on February 16, 2009, 07:18:27 PM
I just downloaded the SDK and the H2Viewer..... Next, I'll see what needs to be done for FireFly.

(BTW, that H2Viewer is pretty cool for viewing the SDK).  :)


Title: Re: Organize User Tools - adding H2Viewer for the SDK
Post by: TechSupport on February 16, 2009, 08:14:38 PM
I did some work on the User Tools. There was a couple of things that did not work well. They are all fixed now.

In addition, I added the "<W>" which will automatically inserts the current word from the code editor into your command string. Therefore,
pass the following string to your H2Viewer tool:

/XNav /appid FireFly /helpcol MS.PSDKXPSP2.1033 /filterquery /Search <W>

It works perfectly for me. I must say that it is pretty cool!  :-)

I set up the tool to be invoked by Ctrl+F1. I place my curser on an api function, like "GetClientRect", and press Ctrl+F1 and voila! up pops
H2Viewer at the correct help location.

I have emailed you a new FFengine.exe to test.

Title: Re: Organize User Tools - adding H2Viewer for the SDK
Post by: John Montenigro on February 16, 2009, 10:43:59 PM
Paul, great work!!! Thanks!

I have no problem invoking H2 via the menu. Pops right up with the word from under the cursor in H2's Search box, and it brings up the page! Very cool!!!

I set up CTRL-F1 in the "Tools/Organize User Tools" edit box for H2, but it doesn't work until and unless I go back into the User Tools and click OK. Doesn't matter if the F1 is capital or lowercase.

After making the edit, it works. But if I quit and re-start, NG.

Also: I can bring up H2 via the menu, then close H2, but even after that, CTRL-F1 won't work.
But then, I go to the Tools/Organize User Tools and just click OK (don't need to go into Edit), and after that it's fine.

Does it behave differently on your system?




Title: Re: Organize User Tools - adding H2Viewer for the SDK
Post by: TechSupport on February 17, 2009, 08:50:58 AM
Hi John,

Right you are.... looks like I was creating the accelerator table prior to loading the User Tools from the FireFly ini file. I switched the two lines and now it works perfectly. I will email you the new file to try.

Title: Re: Organize User Tools - adding H2Viewer for the SDK
Post by: Jose Roca on February 17, 2009, 06:54:51 PM
Why to use H2Viewer if you can use DExplore directly through the IVsHelp interface?

I have added context help using DExplore to the upcoming new version of the SED editor.

From the H2Viewer FAQ:

Quote
Q. Can I ship H2Viewer with my product?
A. Yes (with permission). But why would you want to?
    H2Viewer depends on the same DLLs (runtime API files) that ship with DExplore.
    So why not just use DExplore?

I think it's time to learn some COM programming? :)
Title: Re: Organize User Tools - adding H2Viewer for the SDK
Post by: TechSupport on February 17, 2009, 07:13:16 PM
Hi Jose,

Good points. However, the purpose of this thread was to show how to integrate an external EXE program into FireFly through the use of the "User Tools" facility. I have no intention of distributing H2Viewer or including any other support for it other than what has been achieved in this thread.

:)

Title: Re: Organize User Tools - adding H2Viewer for the SDK
Post by: Jose Roca on February 17, 2009, 07:59:23 PM
Sorry, I misread the post. I thought that John wanted to see FireFly using the Platform SDK Help for context sensitive help.
Title: Re: Organize User Tools - adding H2Viewer for the SDK
Post by: John Montenigro on February 17, 2009, 11:22:35 PM
Hi Jose,
No, I've been looking for a better tool for viewing the SDK documentation, and someone on the PB forum suggested H2. I tried it, and liked it a lot!

What is DExplore? Is that the viewer that comes with the SDK? The fellow who recommended H2 had done a lot of comparisions, so I haven't checked out other viewers. I'm happy with FF and H2!

Paul, as usual, has gone "above and beyond" to help out a customer, and I appreciate it!!

-John


Title: Re: Organize User Tools - adding H2Viewer for the SDK
Post by: Jose Roca on February 18, 2009, 01:22:10 AM
Quote
What is DExplore? Is that the viewer that comes with the SDK?

Yes. It can be activated using COM. The new version of the SED Editor will use it optionally for context sensitive help instead of the old win32.hlp file.