From owner-ntemacs-users@june  Fri Oct 11 17:30:08 1996
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Fri" "11" "October" "1996" "15:40:32" "-0700" "Mark D. Grosen" "mdgrosen@spectron.com" nil "36" "RE: WIN32 development" "^From:" nil nil "10" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.7.6/7.2ju) with SMTP id RAA12721 for <voelker@june.cs.washington.edu>; Fri, 11 Oct 1996 17:30:08 -0700
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id RAA27563 for <voelker@joker.cs.washington.edu>; Fri, 11 Oct 1996 17:30:02 -0700
Received: from nic.cerf.net (nic.cerf.net [192.102.249.3]) by june.cs.washington.edu (8.7.6/7.2ju) with ESMTP id PAA05742 for <ntemacs-users@cs.washington.edu>; Fri, 11 Oct 1996 15:40:38 -0700
Received: from spectron.COM ([146.152.131.1]) by nic.cerf.net (8.7.5/8.6.9) with SMTP id PAA08506; Fri, 11 Oct 1996 15:40:34 -0700 (PDT)
Received: from tsmbeta.spectron.com by spectron.COM (4.1/SMI-4.1) 	id AA12964; Fri, 11 Oct 96 15:40:32 PDT
Message-Id: <2.2.32.19961011224032.008af4d0@spox>
X-Sender: mg@spox
X-Mailer: Windows Eudora Pro Version 2.2 (32)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
From: "Mark D. Grosen" <mdgrosen@spectron.COM>
To: Ed Bruck <Ed.Bruck@Newnes.COM>, "'Dewey M. Sasser'" <dewey@newvision.com>
Cc: "'ntemacs-users@cs.washington.edu'" <ntemacs-users@cs.washington.edu>
Subject: RE: WIN32 development
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))


