home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / mswindo / programm / misc / 4714 < prev    next >
Encoding:
Text File  |  1993-01-07  |  2.2 KB  |  55 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. From: chris@chrism.demon.co.uk (Chris Marriott)
  3. Path: sparky!uunet!pipex!demon!chrism.demon.co.uk!chris
  4. Subject: Re: Getting rid of Help Engine on WM_SYSCOMMAND ?! 
  5. Distribution: world
  6. References: <1993Jan7.162242.7587@tandem.com>
  7. Organization: None
  8. Reply-To: chris@chrism.demon.co.uk
  9. X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
  10. Lines: 40
  11. Date: Thu, 7 Jan 1993 19:35:24 +0000
  12. Message-ID: <726435324snz@chrism.demon.co.uk>
  13. Sender: usenet@demon.co.uk
  14.  
  15. In article <1993Jan7.162242.7587@tandem.com> stu@Tandem.COM writes:
  16.  
  17. >I have an application with associated help.  When the user exits
  18. >the application via the File|Exit command, I call WinHelp() with
  19. >HELP_QUIT in order to cause the help engine to close its window
  20. >and exit.  This works just fine.
  21. >
  22. >However, if the use exits via the close menu item on the windows
  23. >system menu, I can't get rid of the darn help engine!
  24. >
  25. >I've tried processing the WM_SYSCOMMAND message and looking for
  26. >the SC_CLOSE event; I process it just fine, call WinHelp() with
  27. >HELP_QUIT but the help engine stays around!
  28. >
  29. >I started trying commercial window applications and have found
  30. >that all Microsoft applications exhibit the same behavior I'm
  31. >experiencing.  Borland applications such as the Resource
  32. >Workshop and the IDE however, correctly dispose of the help
  33. >engine no matter how they are exited!
  34. >
  35. >Anyone have the magic cookie recipe to get rid of help after
  36. >a System Menu close ?????
  37. >
  38. >Thanks!
  39. >Stu
  40. >
  41.  
  42. All I do is call WinHelp( ..... HELP_QUIT ) during the processing of the
  43. WM_DESTROY message of my main window.  This gets called no matter *how*
  44. the application ends, so it should always be OK.  After reading your
  45. message I've tested my own apps, and the help window goes away exactly
  46. as it should.
  47. -- 
  48. --------------------------------------------------------------------------
  49. | Chris Marriott                           | chris@chrism.demon.co.uk    |
  50. | Warrington, UK                           | BIX: cmarriott              |
  51. | (Still awaiting inspiration              | CIX: cmarriott              |
  52. |  for a witty .sig .... )                 | CompuServe: 100113,1140     |
  53. --------------------------------------------------------------------------
  54.  
  55.