/************************************************************************ * 程序名: 精仿QQ主界面 * 制作人: 李克平, 2011年04月11日 * 版本号: 1.0 ************************************************************************/ #pragma once // CSkinEdit #include "EnBitmap.h" class CSkinEdit : public CEdit { DECLARE_DYNAMIC(CSkinEdit) public: CSkinEdit(); virtual ~CSkinEdit(); CEnBitmap m_bmpEdit; CString m_strText,m_strSearchTip; int m_nTextStart; COLORREF m_crText; void SetText(CString strText,int nStart,COLORREF cr); void SetExtendPoint(int nX,int nY){m_nX=nX;m_nY=nY;} BOOL DrawText(CDC *pDC,CRect rc ,CString strText); void LoadBitmap(LPCTSTR szImagePath); int Width(){return m_bmpEdit.GetWidth();} int Height(){return m_bmpEdit.GetHeight();} CRect GetRectInParent(); protected: int m_nX,m_nY; DECLARE_MESSAGE_MAP() public: afx_msg void OnPaint(); afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS* lpncsp); afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point); afx_msg void OnMouseMove(UINT nFlags, CPoint point); afx_msg void OnSetFocus(CWnd* pOldWnd); afx_msg void OnKillFocus(CWnd* pNewWnd); afx_msg LRESULT OnNcHitTest(CPoint point); virtual BOOL PreTranslateMessage(MSG* pMsg); };