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

Contents of /trunk/H7 Server/H7 Server.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (show annotations) (download)
Mon Jan 29 10:44:29 2007 UTC (17 years, 3 months ago) by hedin
File size: 1981 byte(s)
Added basic server structure
1 // H7 Server.cpp : Defines the class behaviors for the application.
2 //
3
4 #include "stdafx.h"
5 #include "H7 Server.h"
6 #include "H7 ServerDlg.h"
7
8 #ifdef _DEBUG
9 #define new DEBUG_NEW
10 #endif
11
12
13 // CH7ServerApp
14
15 BEGIN_MESSAGE_MAP(CH7ServerApp, CWinApp)
16 ON_COMMAND(ID_HELP, CWinApp::OnHelp)
17 END_MESSAGE_MAP()
18
19
20 // CH7ServerApp construction
21
22 CH7ServerApp::CH7ServerApp()
23 {
24 // TODO: add construction code here,
25 // Place all significant initialization in InitInstance
26 }
27
28
29 // The one and only CH7ServerApp object
30
31 CH7ServerApp theApp;
32
33
34 // CH7ServerApp initialization
35
36 BOOL CH7ServerApp::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 CH7ServerDlg 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