// Test.cpp : 定义应用程序的入口点。
//

#include "stdafx.h"
#include "Test.h"

#include "xcgui.h"
#pragma comment(lib,"XCGUI.lib")

class CMyWindowShape
{
public:
	HWINDOW m_hWindow;
	HELE    m_hButton;
	CMyWindowShape()
	{
		Init();
	}
	void Init()
	{
		HXCGUI hXCGUI=XC_LoadLayout(L"Layout.xml");
		if(XC_IsHELE((HELE)hXCGUI))
		{
			XWnd_AddEle(m_hWindow,(HELE)hXCGUI);
		}else if(XC_IsHWINDOW((HWINDOW)hXCGUI))
		{
			m_hWindow=(HWINDOW)hXCGUI;
			XC_ShowLayoutFrame(TRUE);

			XWnd_AdjustLayout(m_hWindow);
			XWnd_ShowWindow(m_hWindow,SW_SHOW);
		}
	}
};

int APIENTRY _tWinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR    lpCmdLine,
                     int       nCmdShow)
{
	XInitXCGUI();
	XC_ShowLayoutFrame(FALSE);
	CMyWindowShape  MyWindow;
	XRunXCGUI();
	XExitXCGUI();
	return 0;
}

