home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / memsz231.zip / HELPWIN.CPP < prev    next >
Text File  |  1994-01-19  |  858b  |  37 lines

  1. // Class HELPWIN: Encapsulates the startup/shutdown logic for an OS/2-PM help window.
  2.  
  3. #define INCL_BASE
  4. #define INCL_PM
  5. #include <os2.h>
  6.  
  7. #include <string.h>
  8.  
  9. #include "debug.h"
  10.  
  11. #include "helpwin.h"
  12.  
  13.   // Constructor
  14.  
  15. HelpWindow::HelpWindow ( HAB Anchor, HMODULE Module, USHORT Id, PSZ Filename, PSZ Title ) {
  16.   HELPINIT HelpInit ;
  17.  
  18.   memset ( &HelpInit, 0, sizeof(HelpInit) ) ;
  19.  
  20.   HelpInit.cb = sizeof(HelpInit) ;
  21.   HelpInit.phtHelpTable = (PHELPTABLE)MAKEULONG(Id,0xFFFF);
  22.   HelpInit.hmodHelpTableModule = Module ;
  23.   HelpInit.pszHelpWindowTitle = Title ;
  24.   HelpInit.fShowPanelId = CMIC_HIDE_PANEL_ID ;
  25.   HelpInit.pszHelpLibraryName = Filename ;
  26.  
  27.   Handle = WinCreateHelpInstance ( Anchor, &HelpInit ) ;
  28. }
  29.  
  30.   // Destructor
  31.  
  32. HelpWindow::~HelpWindow ( ) {
  33.   if ( Handle ) {
  34.     WinDestroyHelpInstance ( Handle ) ;
  35.   }
  36. }
  37.