int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR cmdline, int nCmdShow) { CoInitialize(NULL); InitCommonControls(); CMyDialog dlg; dlg.DoModal(); return 0; }
BOOL CMyThread::InitInstance() { // TODO: perform and per-thread initialization here CMyDialog dlg; m_pMainWnd=&dlg; dlg.DoModal(); return TRUE; }