home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / sybase / starbuck / hpp.z / WHOTKEY.HPP < prev    next >
C/C++ Source or Header  |  1996-12-03  |  3KB  |  97 lines

  1. /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2.    %     Copyright (C) 1994, by WATCOM International Inc.  All rights    %
  3.    %     reserved.  No part of this software may be reproduced or        %
  4.    %     used in any form or by any means - graphic, electronic or       %
  5.    %     mechanical, including photocopying, recording, taping or        %
  6.    %     information storage and retrieval systems - except with the     %
  7.    %     written permission of WATCOM International Inc.                 %
  8.    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  9. */
  10.  
  11. /*************************************************************************
  12.  *
  13.  * WHotKey -- Wrapper for the Windows 95 Hot-Key control.
  14.  *
  15.  *************************************************************************/
  16.  
  17. #ifndef _WHOTKEY_HPP_INCLUDED
  18. #define _WHOTKEY_HPP_INCLUDED
  19.  
  20. #ifndef _WNO_PRAGMA_PUSH
  21. #pragma pack(push,8);
  22. #pragma enum int;
  23. #endif
  24.  
  25. #ifndef _WCONTROL_HPP_INCLUDED
  26. #  include "wcontrol.hpp"
  27. #endif
  28.  
  29. //
  30. // HotKey styles
  31. //
  32.  
  33. #define WHKSDefault             ((WStyle)0x50000000L) // WS_VISIBLE|WS_CHILD
  34.  
  35. enum {
  36.     WHKCombNone         = 0x0001,
  37.     WHKCombS            = 0x0002,               // Shift
  38.     WHKCombC            = 0x0004,               // Control
  39.     WHKCombA            = 0x0008,               // Alt
  40.     WHKCombSC           = 0x0010,               // Shift + Control
  41.     WHKCombSA           = 0x0020,               // Shift + Alt
  42.     WHKCombCA           = 0x0040,               // Control + Alt
  43.     WHKCombSCA          = 0x0080,               // Shift + Control + Alt
  44. };
  45.  
  46. class WCMCLASS WHotKey : public WControl {
  47.     WDeclareSubclass( WHotKey, WControl );
  48.  
  49.     public:
  50.     
  51.         /**********************************************************
  52.          * Constructors and destructors
  53.          *********************************************************/
  54.  
  55.         WHotKey();
  56.     
  57.         ~WHotKey();
  58.  
  59.         /**********************************************************
  60.          * Properties
  61.          *********************************************************/
  62.  
  63.         // HotKey
  64.  
  65.         WHotKeyInfo GetHotKey();
  66.         WBool SetHotKey( const WHotKeyInfo & hotKey );
  67.  
  68.         /**********************************************************
  69.          * Methods
  70.          *********************************************************/
  71.  
  72.         // SpecifyInvalidCombos
  73.  
  74.         void SpecifyInvalidCombos( WULong invalidCombos,
  75.                                    WKeyState keyStateToUseInstead );
  76.  
  77.         /**********************************************************
  78.          * Overrides
  79.          *********************************************************/
  80.  
  81.         virtual WColor GetBackColor( WBool getResultingColor=TRUE ) const;
  82.  
  83.         virtual const WChar * InitializeClass();
  84.  
  85.         virtual WStyle GetDefaultStyle() const;
  86.  
  87.         virtual WBool CloneWindow( WStyle newStyle, WStyle newExStyle,
  88.                                    void * data=NULL );
  89. };
  90.  
  91. #ifndef _WNO_PRAGMA_PUSH
  92. #pragma enum pop;
  93. #pragma pack(pop);
  94. #endif
  95.  
  96. #endif // _WHOTKEY_HPP_INCLUDED
  97.