Jump to content
rossh

F1 context help to WinAPI ?

Recommended Posts

I just updated to 12.1, after 10 years on XE3.  Does the F1 contextual help still work for Win32 API functions?  Do they install a local Win32 help for the lookup?   Mine doesn't.  Is it a broken install?  The F1 help works perfect for VCL and RTL functions, but nothing good happens with Win32 functions.  Is this expected?

thanks.

Share this post


Link to post
1 minute ago, Remy Lebeau said:

I see offline help files provided for 11.x and earlier but not for 12.x.

Strange - this is what I see:

image.thumb.png.3a831a2bc8f07005eef9333c7a1984e1.png

Share this post


Link to post

That helps a little, thank you.  I updated the chm help files to v12.1.    But still no contextual F1 help on win32 functions?   Does it work for anyone?   I just installed the trial D12.1 in a VM, and still nothing.   This is rather disappointing because my old XE3 had F1 Winapi help linked to the MS Document viewer and the Winapi help there.

Share this post


Link to post
16 minutes ago, rossh said:

no contextual F1 help on win32 functions?

So, just to make sure we're on the same page, I open up the Windows unit (or WinAPI.Windows), find a function with a stdcall that calls an external Windows DLL, like CreateRemoteThreadEx or GetFreeSpace or QueryIdleProcessorCycleTime (just to pick a few at random), place the cursor and hit F1 and it should take me to a Windows API Help, right? I think I remember seeing this many years ago but not recently.

 

I tried this in several versions of Delphi (XE, XE2, 10.1, 11.3, and 12.1); most of these pull up the generic "Code Editor - Getting Started with RAD Studio" help (some of the older ones have broken help files now). Some of them find specific (or related?) help, such as ToolsAPI.IOTAProcess60.GetCurrentThread and System.FindResource. But none of them brought up a Windows API local help file.

 

In both Delphi 11.3 and 12.1, the Help menu has Platform SDK Help > Windows Platform SDK Library and clicking that takes me to the learn.microsoft.com web site for Win32 API. I guess that's the best we have now.

Share this post


Link to post

IIRC, they dropped the use of MS Document Viewer a while ago. While there are help items for a handful of Windows functions, there also is a hint to the MSDN online library, which IMHO is always the better up-to-date source.

image.thumb.png.12d0061dbebc56445173c730f6954beb.png

Share this post


Link to post
Posted (edited)
3 hours ago, corneliusdavid said:

 .... But none of them brought up a Windows API local help file.

 

In both Delphi 11.3 and 12.1, the Help menu has Platform SDK Help > Windows Platform SDK Library and clicking that takes me to the learn.microsoft.com web site for Win32 API. I guess that's the best we have now.

In XE3, I make a procedure with a Win32 function (example) EnumWindows(f, 0); and if put the focus on it and press F1, it goes to the topic (attached below):

enumwindows.thumb.jpg.4efd9e3eb4dd95ca3de7e1f00ec0a848.jpg

In XE3, it was actually a URL starting with ms-help://...?searchterm.  And now its back to chm and a searchterm, so I expect we can only do chm from here.

I'm happy if it goes to MSDN instead, with the proper search term (EnumWindows),  but the current setup doesn't do that, or anything good or useful.

 

We used to be able to create help files and inject them into the IDE menu.   That was back in D7.   I see that Indy and other packages add their own help into the IDE's contextual help.   So I'm thinking we should be able to edit something in the IDE / registry to pass the query into a proper web search term ??   Is there a proper tool / command that inserts help into the IDE with component design or package installing?

 

So I think I need to find a win32.chm file, and do some reg editing.
 

 

Edited by rossh
fix

Share this post


Link to post

I have an IDE wizard lying around somewhere on my HD that AFAIR will can redirect the help request to an URL if the other help providers fail to resolve it.

It was made for Delphi 5 or 6 (so it's 20-25 years old) and from back when the MSDN help was distributed on CDs.

I'll see if I can locate it and get it to compile with a newer Delphi...

 

Yup it works; I just had to update the default search URL.

image.png.3fcfd6a5632a6db3dff22fa29d4982f2.png

However, for some reason it only works if I search on a keyword the standard help doesn't resolve. Otherwise the IDE help lookup fails with an exception.

I can post the source if anyone wants to have a go at it.

Share this post


Link to post
5 hours ago, rossh said:

I see that Indy and other packages add their own help into the IDE's contextual help.

FYI, Indy's help file hasn't been updated in many years. And Indy isn't the one adding the help file into the IDE, Embarcadero is doing that when they ship Indy with the IDE.

Share this post


Link to post
3 hours ago, dummzeuch said:

Nicely avoids the problem of integrating with the IDE help system - by not integrating with the IDE help system 🙂

Also contains the only instance of a cocktail shaker bubble sort that I've seen used in practice.

 

1 hour ago, Remy Lebeau said:

Indy isn't the one adding the help file into the IDE, Embarcadero is doing that when they ship Indy with the IDE.

"Outdated help is better than no help" - apparently.

  • Haha 1

Share this post


Link to post
56 minutes ago, Anders Melander said:

Also contains the only instance of a cocktail shaker bubble sort that I've seen used in practice.

I had totally forgotten about that. I also don't quite remember why I used this particular sort algorithm, probably because I was tired of Quicksort and Cocktail Sort sounded more interesting. Or maybe I just selected a random sort algorithm from my dzlib.

Share this post


Link to post
15 minutes ago, dummzeuch said:

Cocktail Sort sounded more interesting

I can relate to that. I've used a Gnome Sort from time to time when performance wasn't critical. Simply because it looks nice.

var i := 0;
while (i < High(Values)) do
  if (i = 0) or (Values[i] >= Values[i-1]) then
  begin
    Inc(i);
  end else
  begin
    Swap(Values[i], Values[i-1]);
    Dec(i);
  end;

 

Share this post


Link to post
7 minutes ago, Anders Melander said:

Simply because it looks nice.

Reminds me of one step forward, two steps backwards. :classic_biggrin:

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×