Subject: RE: WIN32 development

From: "Mark D. Grosen" <[email-masked]>
Date: Fri, 11 Oct 1996 15:40:32 -0700

At 11:54 AM 10/10/96 -0700, Ed Bruck wrote:
>Thanks, I'll give this a try. 
>
>Do you know if someone has developed something to call WIN32 help from within 
>EMACS? I used MicroEMACS a few years ago and it had this feature.

Here is a simple elisp function that works for me. I'm a novice elisp'er,
so take it for what it is worth :).

Note that winhelp only works with .hlp files, which appear to be not
distributed with the newer versions of MSVC++. I use the .hlp files from the
2.0 release for Win32 and CRT help.

Also, every time you use this function, you get a new instance of winhelp.
Maybe there is a DDE/OLE interface to winhelp that could be used instead?

(defvar win32-api-help-file "c:/bin/api32.hlp")

(defun windows-help (help-file)
  "Look up the the word at point in HELP-FILE using external winhelp program"
  (let (beg end)
    (save-excursion
      (if (not (looking-at "\\<"))
          (forward-word -1))
      (setq beg (point))
      (forward-word 1)
      (setq end (point)))
    (shell-command
     (concat "winhelp -i " (buffer-substring beg end) " " help-file))))

(defun win32-api-help ()
  "Look up help for the Win32 API function or data structure at point"
  (interactive)
    (windows-help win32-api-help-file))