What is whelp? -------------- whelp is a small program that provides a command line interface to the winhelp help system in Microsoft Windows. The command line syntax is whelp [/F helpfile] topic (You can use -f instead of /F if you prefer) This invokes winhelp with a helpfile and searches for the topic. If no topic matches then winhelp lets you search interactively. If no helpfile is specified the default is win31wh.hlp (the SDK reference). That's all. Not very useful in itself, but it can be used in conjunction with other tools to build useful systems. How to use whelp ---------------- Since whelp is a windows program it must be run from within windows. You can either use the "Run" menu item in program manager (or other applications) or you can use a utility that allows windows programs to be executed from a DOS prompt. I know of three such utilities (I use run.zip), run.zip - available from most windows software archives. wrun.exe - available with backmenu and backdesk, also in most windows archives. wx.exe - a utility that comes with Microsoft C/C++ 7.0 One way to use whelp -------------------- I wrote whelp to use in conjunction with my editor of choice (elvis, a vi clone) when I am developing windows applications. The following vi macro allows me to place the cursor over a word (eg a function call or type) and press ^W to look it up in the SDK reference. It works in a similar way to ctags, but for the SDK instead of your own code. You could have a similar macro to invoke Microsoft's qh program (for text mode help). " invokes winhelp for the word under the cursor map  ywop^i:! run whelp ^"add@a " invokes qh for the word under the cursor map  ywop^i:! qh ^"add@a NOTE: To enter this in your vi startup file (using vi) you need to enter the control codes explicitly by escaping them with ^V - that is, you actually press, map (ctrl-V)(ctrl-W) ywo(ctrl-V)(ESC)p^i:! run whelp (ctrl-V)(ESC)^"add@a There is no reason why whelp should not be used in a similar way with other editors. I beleive that brief, epsilon and emacs variants will all allow similar behaviour. Using whelp with elvis ---------------------- If you are using elvis in particular there is the K command to look up a keyword using a program. This is better than the macro above since the cursor can be anywhere in the word and there is less rubbish on the screen. The equivalent mappings for your elvis startup file would be, " invokes winhelp for the word under the cursor map  :set kp="run whelp" K " invokes qh for the word under the cursor map  :set kp=qh K Thanks to Uri London for pointing out the K command in elvis. For the future -------------- whelp is so small there shouldn't be any bugs in it, but if you find any you can tell me at the address below. I am interested in any other ideas for using whelp and any improvements you might suggest (or implement). The distribution contains the C source and a makefile for whelp which compiles under Windows 3.1 using Microsoft C/C++ 7.0 and the SDK. whelp was written by: Mark Dobie, Department of Electronics and Computer Science, University of Southampton, Southampton, SO9 5NH UK email: mrd@ecs.soton.ac.uk Copyright --------- whelp is copyright 1992 by Mark Dobie Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation.