home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / toolba.zip / AMHLPHDR.CPP < prev    next >
Text File  |  1994-08-25  |  1KB  |  41 lines

  1. /****************************************************************
  2. * AMHlpHdr.cpp - allow micro-help via the UM_MICROHELP message. *
  3. ****************************************************************/
  4.  
  5. #include <iwindow.hpp>
  6.  
  7. #define INCL_WINMESSAGEMGR
  8. #include <os2.h>           /* get WM_USER definition */
  9.  
  10. #include "amhlphdr.hpp"
  11.  
  12.  
  13. /* --------------------------
  14.    allow message id to be set
  15.    -------------------------- */
  16.  
  17. void AMicroHelpHandler::setMessageId( unsigned long id )
  18. {
  19.    messageId = id;
  20. }  /* end AMicroHelpHandler::setMessageId( ... ) */
  21.  
  22.  
  23. /* ---------------------------
  24.    handle UM_MICROHELP message
  25.    --------------------------- */
  26.  
  27. Boolean AMicroHelpHandler::microHelp( IEvent &evt )
  28. {
  29.    return false;
  30. }  /* end AMicroHelpHandler::microHelp( ... ) */
  31.  
  32.  
  33. Boolean AMicroHelpHandler::dispatchHandlerEvent( IEvent &evt )
  34. {
  35.    if ( evt.eventId() == WM_USER + messageId ) {
  36.       return microHelp( evt );
  37.    }  /* endif */
  38.    return false;
  39. }  /* end AMicroHelpHandler::dispatchHandlerEvent( ... ) */
  40.  
  41.