home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / IOC / MLE / AUWMHDR.HPP < prev    next >
Text File  |  1994-10-14  |  3KB  |  50 lines

  1. #ifndef AUSERMESSAGEHANDLER_HPP
  2. #define AUSERMESSAGEHANDLER_HPP
  3. /******************************************************************************/
  4. /* Multi-Line Entry Field Sample Program (User Message Handler)               */
  5. /*                                                                            */
  6. /* COPYRIGHT: Copyright (C) International Business Machines Corp., 1992,1993. */
  7. /*                                                                            */
  8. /* DISCLAIMER OF WARRANTIES:                                                  */
  9. /*   The following [enclosed] code is sample code created by IBM              */
  10. /*   Corporation.  This sample code is not part of any standard IBM product   */
  11. /*   and is provided to you solely for the purpose of assisting you in the    */
  12. /*   development of your applications.  The code is provided "AS IS",         */
  13. /*   without warranty of any kind.  IBM shall not be liable for any damages   */
  14. /*   arising out of your use of the sample code, even if they have been       */
  15. /*   advised of the possibility of such damages.                              */
  16. /******************************************************************************/
  17. /* NOTE: WE RECOMMEND USING A FIXED SPACE FONT TO LOOK AT THE SOURCE          */
  18. /******************************************************************************/
  19.  
  20. #include <ihandler.hpp>
  21.  
  22. /******************************************************************************/
  23. /* Class   : AUserMessageHandler                                              */
  24. /*                                                                            */
  25. /* Purpose : Instances of this class can be user to process user messages.    */
  26. /*           Objects of this class process messages with the ID that the      */
  27. /*           the object is created with. The class provides the virtual       */
  28. /*           function userMessage which you should override to do your        */
  29. /*           application specific processing.                                 */
  30. /*           It is derived from IHandler                                      */
  31. /*                                                                            */
  32. /******************************************************************************/
  33. class AUserMessageHandler : public IHandler
  34. {
  35.   public:
  36.     AUserMessageHandler( unsigned long uwmId )
  37.       : userMessageId( uwmId ) {;}
  38.   Boolean
  39.     dispatchHandlerEvent( IEvent& evt );
  40.  
  41.   protected:
  42.     virtual Boolean
  43.        userMessage( IEvent& evt ) { return false; }
  44.  
  45.   private:
  46.     unsigned long   userMessageId;
  47. };
  48.  
  49. #endif
  50.