#include "StaticControl.h"
#include "EEngineFrameWork.h"


CStaticControl::CStaticControl( int aIdx, LPCWSTR aName, int aX, int aY, int aWidth, int aHeight, DWORD aStyle)
{
	EEngineFrameWork* FrameWork = EEngineFrameWork::GetSingletonPtr();

	m_hWnd		= CreateWindow( L"static", aName, aStyle, aX, aY, aWidth, aHeight, FrameWork->m_hWnd, (HMENU)aIdx, FrameWork->m_hInst, NULL );
	m_nIdx		= aIdx;
	m_strText	= aName;
	m_nPosX		= aX;
	m_nPosY		= aY;
	m_nWidth	= aWidth;
	m_nHeight	= aHeight;
}


CStaticControl::~CStaticControl(void)
{
	
}


void CStaticControl::SetText( LPCWSTR aText )
{
	SetWindowText( m_hWnd,  aText );
	m_strText = aText;
}

LPCWSTR CStaticControl::GetText( void )
{
	WCHAR Text[256] = {0,};
	GetWindowText( m_hWnd, Text, 256 );

	m_strText = Text;

	return m_strText.c_str();
}