#include <windows.h>
#include "resource.h"
#include "DuiFrameWnd.h"
int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
CPaintManagerUI::SetInstance(hInstance);
CPaintManagerUI::SetResourceType(UILIB_ZIPRESOURCE);
//加载资源管理器
HRSRC hResource = ::FindResource(CPaintManagerUI::GetResourceDll(), MAKEINTRESOURCE(IDR_ZIPRES1), _T("ZIPRES"));
if (hResource != NULL)
{
DWORD dwSize = 0;
HGLOBAL hGlobal = ::LoadResource(CPaintManagerUI::GetResourceDll(), hResource);
if (hGlobal != NULL)
{
dwSize = ::SizeofResource(CPaintManagerUI::GetResourceDll(), hResource);
if (dwSize > 0)
{
CPaintManagerUI::SetResourceZip((LPVOID)::LockResource(hGlobal), dwSize);
}
}
::FreeResource(hResource);
}
CDuiFrameWnd duiFrame;
duiFrame.Create(NULL, _T("DUIWnd"), UI_WNDSTYLE_FRAME, 0);
duiFrame.CenterWindow();
duiFrame.ShowModal();
return 0;
}
评论0
最新资源