Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
3.3 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. bltarrow.hxx
  7. arrow object within the spin button
  8. FILE HISTORY:
  9. terryk 15-May-91 Created
  10. terryk 10-Jul-91 second code review change. Attend: beng
  11. rustanl chuckc terryk
  12. terryk 19-Jul-91 change the constructor's
  13. parameters to TCHAR * instead of ULONG.
  14. terryk 12-Aug-91 Remove BLT_TIMER object from the class.
  15. terryk 20-Aug-91 Add OnLMouseDblClk function to correct
  16. double click problem.
  17. */
  18. #ifndef _BLTARROW_HXX_
  19. #define _BLTARROW_HXX_
  20. #include "bltctrl.hxx"
  21. #include "bltbutn.hxx"
  22. /**********************************************************************
  23. NAME: ARROW_BUTTON
  24. SYNOPSIS: This is a class which creates the bitmap push button which
  25. lives within the SPIN button. It is similar to
  26. GRAPHICAL_BUTTON class. However the differents are:
  27. 1. It will fit the bitmap to the push button
  28. 2. User can specified the disable bitmap for display
  29. 3. It will notify the SPIN_GROUP parent if it is
  30. hit by the user.
  31. 4. It will set up a timer to record the time different
  32. between mouse button down and mouse button up.
  33. INTERFACE:
  34. ARROW_BUTTON() - constructor
  35. PARENT: GRAPHICAL_BUTTON_WITH_DISABLE, CUSTOM_CONTROL
  36. CAVEATS:
  37. HISTORY:
  38. terryk 29-May-91 Created
  39. terryk 19-Jul-91 Change the bitmap parameter to
  40. TCHAR * instead of ULONG
  41. beng 31-Jul-1991 Changed QMessageInfo to QEventEffects
  42. beng 04-Oct-1991 Win32 conversion
  43. beng 04-Aug-1992 Loads bitmaps by ordinal
  44. **********************************************************************/
  45. DLL_CLASS ARROW_BUTTON: public GRAPHICAL_BUTTON_WITH_DISABLE,
  46. public CUSTOM_CONTROL
  47. {
  48. private:
  49. static const TCHAR * _pszClassName; // default class name
  50. int _cTimerClick; // if counter is bigger than 10, use big
  51. // increase value
  52. BOOL _fPress; // flag for the button is down or not
  53. protected:
  54. virtual BOOL OnLMouseButtonDown( const MOUSE_EVENT &event );
  55. virtual BOOL OnLMouseButtonUp( const MOUSE_EVENT &event );
  56. virtual BOOL OnLMouseButtonDblClick( const MOUSE_EVENT & event )
  57. { return OnLMouseButtonDown( event ); }
  58. virtual BOOL OnTimer( const TIMER_EVENT &event );
  59. virtual UINT QueryEventEffects( const CONTROL_EVENT & e );
  60. public:
  61. ARROW_BUTTON( OWNER_WINDOW *powin, CID cid,
  62. BMID nIdEnable, BMID nIdEnableInvert, BMID nIdDisable );
  63. ARROW_BUTTON( OWNER_WINDOW *powin, CID cid,
  64. BMID nIdEnable, BMID nIdEnableInvert, BMID nIdDisable,
  65. XYPOINT xy, XYDIMENSION dxy,
  66. ULONG flStyle = BS_OWNERDRAW|WS_BORDER|WS_CHILD );
  67. };
  68. #endif // _BLTARROW_HXX_