/[H7]/trunk/Client/Client.cpp
ViewVC logotype

Annotation of /trunk/Client/Client.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4 - (hide annotations) (download)
Mon Jan 29 10:49:43 2007 UTC (17 years, 4 months ago) by kevin
File size: 1952 byte(s)
Added Client piece
1 kevin 4 // 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     // InitCommonControls() 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     InitCommonControls();
42    
43     CWinApp::InitInstance();
44    
45     if (!AfxSocketInit())
46     {
47     AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
48     return FALSE;
49     }
50    
51     AfxEnableControlContainer();
52    
53     // Standard initialization
54     // If you are not using these features and wish to reduce the size
55     // of your final executable, you should remove from the following
56     // the specific initialization routines you do not need
57     // Change the registry key under which our settings are stored
58     // TODO: You should modify this string to be something appropriate
59     // such as the name of your company or organization
60     SetRegistryKey(_T("Local AppWizard-Generated Applications"));
61    
62     CClientDlg dlg;
63     m_pMainWnd = &dlg;
64     INT_PTR nResponse = dlg.DoModal();
65     if (nResponse == IDOK)
66     {
67     // TODO: Place code here to handle when the dialog is
68     // dismissed with OK
69     }
70     else if (nResponse == IDCANCEL)
71     {
72     // TODO: Place code here to handle when the dialog is
73     // dismissed with Cancel
74     }
75    
76     // Since the dialog has been closed, return FALSE so that we exit the
77     // application, rather than start the application's message pump.
78     return FALSE;
79     }

  ViewVC Help
Powered by ViewVC 1.1.20