home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / ioc / mle / auwmhdr.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  3.1 KB  |  57 lines

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