之前跑了一个基本例子;接下来准备再做一些;
看着它的WinMain函数里面,有几句不知道需不需要;
它是这样的;从别的示例里面来的;
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpCmdLine*/, int nCmdShow)
{
CPaintManagerUI::SetInstance(hInstance);
HRESULT Hr = ::CoInitialize(NULL);
if (FAILED(Hr)) return 0;
TestFrame* pFrame = new TestFrame();
if (pFrame == NULL) return 0;
pFrame->Create(NULL, _T("TestWindow"), UI_WNDSTYLE_FRAME, 0, 0, 0, 0, 0);
pFrame->CenterWindow();
::ShowWindow(*pFrame, SW_SHOW);
CPaintManagerUI::MessageLoop();
::CoUninitialize();
return 0;
}
::CoInitialize(NULL);
::CoUninitialize();
这是COM的初始化和释放;没用到COM的话是不需要的;<