/[H8]/trunk/test-server/test-server.cpp
ViewVC logotype

Annotation of /trunk/test-server/test-server.cpp

Parent Directory Parent Directory | Revision Log Revision Log


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