1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #pragma once
- #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);
- };
|