OLD | NEW |
(Empty) | |
| 1 // client.cpp : Defines the class behaviors for the application. |
| 2 // |
| 3 |
| 4 #include "stdafx.h" |
| 5 #include "client.h" |
| 6 #include "clientDlg.h" |
| 7 |
| 8 #ifdef _DEBUG |
| 9 #define new DEBUG_NEW |
| 10 #endif |
| 11 |
| 12 |
| 13 // CclientApp |
| 14 |
| 15 BEGIN_MESSAGE_MAP(CclientApp, CWinApp) |
| 16 ON_COMMAND(ID_HELP, &CWinApp::OnHelp) |
| 17 END_MESSAGE_MAP() |
| 18 |
| 19 |
| 20 // CclientApp construction |
| 21 |
| 22 CclientApp::CclientApp() |
| 23 { |
| 24 // TODO: add construction code here, |
| 25 // Place all significant initialization in InitInstance |
| 26 } |
| 27 |
| 28 |
| 29 // The one and only CclientApp object |
| 30 |
| 31 CclientApp theApp; |
| 32 |
| 33 |
| 34 // CclientApp initialization |
| 35 |
| 36 BOOL CclientApp::InitInstance() |
| 37 { |
| 38 // InitCommonControlsEx() is required on Windows XP if an application |
| 39 // manifest specifies use of ComCtl32.dll version 6 or later to enable |
| 40 // visual styles. Otherwise, any window creation will fail. |
| 41 INITCOMMONCONTROLSEX InitCtrls; |
| 42 InitCtrls.dwSize = sizeof(InitCtrls); |
| 43 // Set this to include all the common control classes you want to use |
| 44 // in your application. |
| 45 InitCtrls.dwICC = ICC_WIN95_CLASSES; |
| 46 InitCommonControlsEx(&InitCtrls); |
| 47 |
| 48 CWinApp::InitInstance(); |
| 49 |
| 50 AfxEnableControlContainer(); |
| 51 |
| 52 // Standard initialization |
| 53 // If you are not using these features and wish to reduce the size |
| 54 // of your final executable, you should remove from the following |
| 55 // the specific initialization routines you do not need |
| 56 // Change the registry key under which our settings are stored |
| 57 // TODO: You should modify this string to be something appropriate |
| 58 // such as the name of your company or organization |
| 59 SetRegistryKey(_T("Local AppWizard-Generated Applications")); |
| 60 |
| 61 CclientDlg dlg; |
| 62 m_pMainWnd = &dlg; |
| 63 INT_PTR nResponse = dlg.DoModal(); |
| 64 if (nResponse == IDOK) |
| 65 { |
| 66 // TODO: Place code here to handle when the dialog is |
| 67 // dismissed with OK |
| 68 } |
| 69 else if (nResponse == IDCANCEL) |
| 70 { |
| 71 // TODO: Place code here to handle when the dialog is |
| 72 // dismissed with Cancel |
| 73 } |
| 74 |
| 75 // Since the dialog has been closed, return FALSE so that we exit the |
| 76 // application, rather than start the application's message pump. |
| 77 return FALSE; |
| 78 } |
OLD | NEW |