/************************************************************************/
/*  Copyright (C), 2016-2020, [IT], 保留所有权利;
/*  模 块 名：;
/*  描    述：;
/*
/*  版    本：[V];	
/*  作    者：[IT];
/*  日    期：[8/19/2016];
/*
/*
/*  注    意：;
/*
/*  修改记录：[IT];
/*  修改日期：;
/*  修改版本：;
/*  修改内容：;
/************************************************************************/
#ifndef __SKIN_STATIC_20160824__
#define __SKIN_STATIC_20160824__

#include "EnBitmap.h"	// Added by ClassView
#pragma once

class CSkinStatic : public CStatic
{
public:
	CSkinStatic();
	virtual ~CSkinStatic();
protected:
	virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);

public:
	void	SetText(CString strText,int nStart = 0,COLORREF cr = RGB(0,0,0));
	void	SetExtendPoint(int nX,int nY)
	{
		m_nX=nX;
		m_nY=nY;
	}

	void	SetFont(CFont *pFont){m_pFont = pFont;}
	BOOL	DrawText(CDC *pDC,CRect rc ,CString strText);
	void	Redraw(CDC *pDC);
	
	void	LoadBitmap(LPCTSTR szImagePath);
	int		Width()
	{
		return m_bmpStatic.GetWidth();
	}

	int		Height()
	{
		return m_bmpStatic.GetHeight();
	}
	CRect	GetRectInParent();

	CEnBitmap	m_bmpStatic;
	CString		m_strText;
	CFont		*m_pFont;
	int			m_nTextStart;
	COLORREF	m_crText;

protected:
	int			m_nX;
	int			m_nY;
	afx_msg void OnPaint();
	DECLARE_MESSAGE_MAP()
};

#endif // __SKIN_STATIC_20160824__
