SkinStatic.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /************************************************************************
  2. * 程序名: 精仿QQ主界面
  3. * 制作人: 李克平, 2011年04月11日
  4. * 版本号: 1.0
  5. ************************************************************************/
  6. #if !defined(AFX_SKINSTATIC_H__8008CAA3_1EE3_4F71_A6B7_976421CC0915__INCLUDED_)
  7. #define AFX_SKINSTATIC_H__8008CAA3_1EE3_4F71_A6B7_976421CC0915__INCLUDED_
  8. #include "EnBitmap.h" // Added by ClassView
  9. #if _MSC_VER > 1000
  10. #pragma once
  11. #endif // _MSC_VER > 1000
  12. // SkinStatic.h : header file
  13. //
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CSkinStatic window
  16. #include "EnBitmap.h"
  17. class CSkinStatic : public CStatic
  18. {
  19. // Construction
  20. public:
  21. CSkinStatic();
  22. // Attributes
  23. public:
  24. // Operations
  25. public:
  26. // Overrides
  27. // ClassWizard generated virtual function overrides
  28. //{{AFX_VIRTUAL(CSkinStatic)
  29. protected:
  30. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  31. //}}AFX_VIRTUAL
  32. // Implementation
  33. public:
  34. void SetText(CString strText,int nStart = 0,COLORREF cr = RGB(0,0,0));
  35. void SetExtendPoint(int nX,int nY){m_nX=nX;m_nY=nY;}
  36. void SetFont(CFont *pFont){m_pFont = pFont;}
  37. BOOL DrawText(CDC *pDC,CRect rc ,CString strText);
  38. void Redraw(CDC *pDC);
  39. CEnBitmap m_bmpStatic;
  40. CString m_strText;
  41. CFont *m_pFont;
  42. int m_nTextStart;
  43. COLORREF m_crText;
  44. virtual ~CSkinStatic();
  45. void LoadBitmap(LPCTSTR szImagePath);
  46. int Width(){return m_bmpStatic.GetWidth();}
  47. int Height(){return m_bmpStatic.GetHeight();}
  48. CRect GetRectInParent();
  49. // Generated message map functions
  50. protected:
  51. //{{AFX_MSG(CSkinStatic)
  52. afx_msg void OnPaint();
  53. //}}AFX_MSG
  54. int m_nX,m_nY;
  55. DECLARE_MESSAGE_MAP()
  56. };
  57. /////////////////////////////////////////////////////////////////////////////
  58. //{{AFX_INSERT_LOCATION}}
  59. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  60. #endif // !defined(AFX_SKINSTATIC_H__8008CAA3_1EE3_4F71_A6B7_976421CC0915__INCLUDED_)