home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / HELPTEST.ZIP / TESTBED.DOC < prev    next >
Text File  |  1990-09-19  |  2KB  |  51 lines

  1. This is my little sample of my best shot at using Help Manager.
  2. I've found some interesting things about the help manager, and some 
  3. mysteries remain.  The most obvious thing is that the Microsoft
  4. Toolkit is horribly under-documented.
  5.  
  6. First thing to watch for is error codes.  I'm not real sure why, but
  7. somebody decided to start them at 0x1000.  This, of course, is the
  8. same as the PM error codes.  When you call WinGetLastError() and 
  9. WinGetErrorInfo(), you'd better know if your expecting a PM 
  10. or a Help Manager code.
  11.  
  12. One thing that is not made real clear from the documentation is that the
  13. window you are associating with Help has to be assigned an ID.  It's 
  14. easy to miss this, since the WinCreateStdWindow() call doesn't let you assign
  15. them automatically.  The other part is that it has to be assigned to the
  16. FRAME window, not the client window.  So, you can take the result (say, 
  17. "hwndFrame" of the call and then call 
  18.         WinSetWindowUShort( hwndFrame, QWS_ID, id);
  19. to set your id, before you call WinAssociateHelpInstance().
  20.  
  21. Strangely enough, my programs create several top-level windows.  I've found
  22. that WinAssociateHelpInstance() can be called for each of them.
  23.  
  24. Not all requests to the Help Manager go through your code.  For
  25. example, menu selection help requests from the keyboard seem to get 
  26. captured in the system somehow and directed to HM.  Also, HM seems
  27. to call window procedures directly when it "sends messages": they don't
  28. go through the dispatch routine either.
  29.  
  30.  
  31. As to creating the program, the C6.00 NMAKE utility was used, with the
  32. make file being created by PWB.  Nothing fancy.  One thing that is not
  33. in the make file is the compilation of the help source text.  I used the
  34. line:
  35.         IPFC /W3 /X testbed.ipf
  36. which creates the file testbed.hlp.  Getting access to the Toolkit's
  37. Help for IPFC fooled me at first, but I just copied the IPFC help file into
  38. the same directory as the other help files, and then opened it directly with
  39. QuickHelp.  (I think QH opens all files it finds on startup, because next
  40. time it had found it on its own.)  All the info about the IPF LANGUAGE (such
  41. as it is) is there as well.  I stepped through the table of contents and
  42. printed out everything I thought would be useful.  (There is no printed
  43. manual, as far as I know.)
  44.  
  45. More comments are in the source files.   Good Luck!
  46.  
  47.  
  48. Bob Whitten,  CSIDs 71611,1656 or 72220,2137.
  49.  
  50.  
  51.