|
这一段就是程序启动时候的关于窗体的代码:
- BOOL CEM9161_XWJApp::InitInstance()
- {
- if (!AfxSocketInit())
- {
- AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
- return FALSE;
- }
- //frmQst---------------------
- frmQst=new CfrmQst;
- frmQst->Create(IDD_DIALOG1);
- ::MoveWindow(frmQst->m_hWnd,0,1,640,450,true);
- //frmQst---------------------
- //frmBtn---------------------
- frmBtn=new CfrmBtn;
- frmBtn->Create(DLG_BUTTONS);
- ::MoveWindow(frmBtn->m_hWnd,0,450,640,480,true);
- frmBtn->ShowWindow(true);
- //frmBtn---------------------
-
- //frmMain---------------------
- CEM9161_XWJDlg dlg;
- m_pMainWnd = &dlg;
- frmMain=&dlg;
- //frmMain---------------------
- int nResponse = dlg.DoModal();
- if (nResponse == IDOK)
- {
- }
- else if (nResponse == IDCANCEL)
- {
- }
- // Since the dialog has been closed, return FALSE so that we exit the
- // application, rather than start the application's message pump.
- return FALSE;
- }
复制代码 |
|