home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / powergui / cnr / edithdr / keyhdr.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-29  |  767 b   |  31 lines

  1. #ifndef _KEYHDR_
  2. #define _KEYHDR_
  3. //************************************************************
  4. // Container - Keyboard Handler for MLE
  5. //
  6. // Copyright (C) 1994, Law, Leong, Love, Olson, Tsuji.
  7. // Copyright (c) 1997 John Wiley & Sons, Inc. 
  8. // All Rights Reserved.
  9. //************************************************************
  10. #include <ikeyhdr.hpp>
  11. #include <istring.hpp>
  12.  
  13. class KeyboardHandler : public IKeyboardHandler {
  14. protected:
  15. virtual Boolean
  16.   characterKeyPress ( IKeyboardEvent& event )
  17.   {
  18.     // Reject any 'A' characters.
  19.     IString strChar = event.mixedCharacter();
  20.     if (strChar.isSBCS()  &&  strChar == 'A')
  21.     {
  22.        event.setResult(true);
  23.        return true;
  24.     }
  25.     return false;
  26.   }
  27. };
  28.  
  29. #endif // _KEYHDR_
  30.  
  31.