ShadeButtonST.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. //
  2. // Class: CShadeButtonST
  3. //
  4. // Compiler: Visual C++
  5. // eMbedded Visual C++
  6. // Tested on: Visual C++ 6.0
  7. // Windows CE 3.0
  8. //
  9. // Created: 14/June/2001
  10. // Updated: 25/November/2002
  11. //
  12. // Author: Davide Calabro' davide_calabro@yahoo.com
  13. // http://www.softechsoftware.it
  14. //
  15. // Disclaimer
  16. // ----------
  17. // THIS SOFTWARE AND THE ACCOMPANYING FILES ARE DISTRIBUTED "AS IS" AND WITHOUT
  18. // ANY WARRANTIES WHETHER EXPRESSED OR IMPLIED. NO REPONSIBILITIES FOR POSSIBLE
  19. // DAMAGES OR EVEN FUNCTIONALITY CAN BE TAKEN. THE USER MUST ASSUME THE ENTIRE
  20. // RISK OF USING THIS SOFTWARE.
  21. //
  22. // Terms of use
  23. // ------------
  24. // THIS SOFTWARE IS FREE FOR PERSONAL USE OR FREEWARE APPLICATIONS.
  25. // IF YOU USE THIS SOFTWARE IN COMMERCIAL OR SHAREWARE APPLICATIONS YOU
  26. // ARE GENTLY ASKED TO DONATE 5$ (FIVE U.S. DOLLARS) TO THE AUTHOR:
  27. //
  28. // Davide Calabro'
  29. // P.O. Box 65
  30. // 21019 Somma Lombardo (VA)
  31. // Italy
  32. //
  33. #ifndef _SHADEBUTTONST_H_
  34. #define _SHADEBUTTONST_H_
  35. #ifdef _WIN32_WCE
  36. #define BASE_BTNST_CLASS CCeButtonST
  37. #define INC_BTNST "CeBtnST.h"
  38. #else
  39. #define BASE_BTNST_CLASS CButtonST
  40. #define INC_BTNST "BtnST.h"
  41. #endif
  42. #include INC_BTNST
  43. #include "CeXDib.h"
  44. #if _MSC_VER > 1000
  45. #pragma once
  46. #endif // _MSC_VER > 1000
  47. class CShadeButtonST : public BASE_BTNST_CLASS
  48. {
  49. public:
  50. CShadeButtonST();
  51. virtual ~CShadeButtonST();
  52. enum { SHS_NOISE = 0,
  53. SHS_DIAGSHADE,
  54. SHS_HSHADE,
  55. SHS_VSHADE,
  56. SHS_HBUMP,
  57. SHS_VBUMP,
  58. SHS_SOFTBUMP,
  59. SHS_HARDBUMP,
  60. SHS_METAL };
  61. void SetShade(UINT shadeID=0,BYTE granularity=8,BYTE highlight=10,BYTE coloring=0,COLORREF color=0);
  62. private:
  63. CCeXDib m_dNormal,m_dDown,m_dDisabled,m_dOver,m_dh,m_dv;
  64. protected:
  65. virtual DWORD OnDrawBorder(CDC* pDC, CRect* pRect);
  66. virtual DWORD OnDrawBackground(CDC* pDC, CRect* pRect);
  67. };
  68. #endif