/************************************************************************/
/*  Copyright (C), 2016-2020, [IT], ��������Ȩ��;
/*  ģ �� ����;
/*  ��    ����;
/*
/*  ��    ����[V];	
/*  ��    �ߣ�[IT];
/*  ��    �ڣ�[8/19/2016];
/*
/*
/*  ע    �⣺;
/*
/*  �޸ļ�¼��[IT];
/*  �޸����ڣ�;
/*  �޸İ汾��;
/*  �޸����ݣ�;
/************************************************************************/
#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);
};