home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / utilities2 / desklib / Libraries / Window / c / AutoHelp next >
Encoding:
Text File  |  1993-04-10  |  823 b   |  30 lines

  1. #include "Wimp.h"
  2. #include "Event.h"
  3.  
  4. extern BOOL Window_HelpHandler(event_pollblock *event, void *reference);
  5.  
  6.  
  7. /* NOTE:
  8.  * By #defining "USE_EVENTMSG" on compilation, the HelpHandler will be
  9.  * called ONLY for a HelpRequest message, but this will also pull in the
  10.  * "EventMsg" code.
  11.  *
  12.  * This function is basically here to show you how to include the
  13.  * Window_HelpHandler under your own steam, using either EventMsg or Event
  14.  *
  15.  * use: #define USE_EVENTMSG 1
  16.  *
  17.  */
  18.  
  19.  
  20. extern BOOL Window_AutoHelp(window_handle window, icon_handle icon)
  21. {
  22. #ifdef USE_EVENTMSG
  23.   return(EventMsg_Claim(message_HELPREQUEST, window,
  24.                           Window_HelpHandler, NULL);
  25. #else
  26.   return(Event_Claim(event_USERMESSAGERECORDED, window, icon,
  27.                                                  Window_HelpHandler, NULL));
  28. #endif
  29. }
  30.