ButtonExt.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. // ButtonExt.h: interface for the CButtonExt class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_BUTTONEXT_H__89B645C4_311D_4364_B810_6BB77A628FDA__INCLUDED_)
  5. #define AFX_BUTTONEXT_H__89B645C4_311D_4364_B810_6BB77A628FDA__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. /*
  10. * Button Procduce Routine
  11. */
  12. #define STATUS_BUTTON_NORMAL 0x00000000
  13. #define STATUS_BUTTON_HOVER 0x00000001
  14. #define STATUS_BUTTON_DOWN 0x00000002
  15. class CButtonExt
  16. {
  17. public:
  18. CButtonExt();
  19. virtual ~CButtonExt();
  20. static UINT m_nStatus;
  21. static WNDPROC m_cWndProc;
  22. static LRESULT DefWindowProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam );
  23. static LRESULT OnLButtonDown( CWnd *pWnd, UINT nFlags, CPoint point );
  24. static LRESULT OnLButtonUp( CWnd *pWnd, UINT nFlags, CPoint point ) ;
  25. static LRESULT OnMouseMove( CWnd *pWnd, UINT nFlags, CPoint point );
  26. static LRESULT OnPaint( CWnd *pWnd );
  27. static void DrawInsideBorder(CDC *pDC, CRect* rect);
  28. static void DoGradientFill(CDC *pDC, CRect* rect);
  29. };
  30. #endif // !defined(AFX_BUTTONEXT_H__89B645C4_311D_4364_B810_6BB77A628FDA__INCLUDED_)