ButtonST.h
Upload User: szluye
Upload Date: 2022-04-24
Package Size: 58k
Code Size: 2k
Category:

Special Effects

Development Platform:

Visual C++

  1. #if !defined(AFX_BUTTONST_H__A3483D87_0905_4A27_96DE_68967096DD5C__INCLUDED_)
  2. #define AFX_BUTTONST_H__A3483D87_0905_4A27_96DE_68967096DD5C__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // ButtonST.h : header file
  7. #define RWIDTH(x) x.right-x.left
  8. #define RHIGHT(x) x.bottom-x.top
  9. #define MAX_PATHLEN 512
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CButtonST window
  12. class CButtonST : public CButton
  13. {
  14. // Construction
  15. public:
  16. CButtonST();
  17. // Attributes
  18. public:
  19. // Operations
  20. public:
  21. // Overrides
  22. // ClassWizard generated virtual function overrides
  23. //{{AFX_VIRTUAL(CButtonST)
  24. public:
  25. virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
  26. protected:
  27. virtual void PreSubclassWindow();
  28. //}}AFX_VIRTUAL
  29. // Implementation
  30. public:
  31. virtual ~CButtonST();
  32. void InitMemCDC(CDC *pDC,CRect bRect);
  33. void SetBitmapID(int nID,CDC *pParentDC);
  34. void SetFlat(BOOL bState);
  35. void SetOwnerStyle(LONG lStyle);
  36. void SetImageFile(char *szFilename);
  37. void ImageOpen(CDC *pDC,char *szFilename);
  38. void DrawTransparentBitmap(CDC *pDC,UINT IDImage,CRect &rect,COLORREF rgbMask);
  39. BOOL bInitialCDC;
  40. CDC *pBtnDC;
  41. int mBitmapID;
  42. CDC *pBKDC; //背景层
  43. CDC m_BuffDC; //缓存层
  44. BOOL m_bIsFlat;
  45. BOOL m_bImage;
  46. LONG lBStyle;
  47. TCHAR szImageFileName[MAX_PATHLEN];
  48. CFont m_Font;
  49. // Generated message map functions
  50. protected:
  51. //{{AFX_MSG(CButtonST)
  52. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  53. //}}AFX_MSG
  54. DECLARE_MESSAGE_MAP()
  55. };
  56. /////////////////////////////////////////////////////////////////////////////
  57. //{{AFX_INSERT_LOCATION}}
  58. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  59. #endif // !defined(AFX_BUTTONST_H__A3483D87_0905_4A27_96DE_68967096DD5C__INCLUDED_)