1 BOOL CC3EngineDemoApp::InitInstance() 2 { 3 ![](http://www.cppblog.com/Images/dot.gif) ![](http://www.cppblog.com/Images/dot.gif) 4 5 CC3EngineDemoDlg* pDlg; 6 pDlg = new CC3EngineDemoDlg(); 7 pDlg->Create(IDD_C3ENGINEDEMO_DIALOG, NULL); 8 pDlg->ModifyStyle(WS_MAXIMIZEBOX, 0, 0); 9 RECT rect; 10 UINT unDefWidth = 1024; 11 UINT unDefHeight = 768; 12 if (this->CalPositionInfo(rect, unDefWidth, unDefHeight)) 13 pDlg->MoveWindow(rect.left, rect.top, unDefWidth, unDefHeight, TRUE); 14 else 15 pDlg->MoveWindow(0, 0, 1024, 768, TRUE); 16 pDlg->UpdateWindow(); 17 m_pMainWnd = pDlg; 18 return TRUE; 19 } 20 21 BOOL CC3EngineDemoApp::OnIdle(LONG lCount) 22 { 23 // TODO: Add your specialized code here and/or call the base class 24 25 //return CWinAppEx::OnIdle(lCount); 26 return TRUE; 27 }
|