|
|
1.1 root 1: // helloapp.cpp : Minimal MFC Windows app.
2: //
3: // This is a part of the Microsoft Foundation Classes C++ library.
4: // Copyright (C) 1992 Microsoft Corporation
5: // All rights reserved.
6: //
7: // This source code is only intended as a supplement to the
8: // Microsoft Foundation Classes Reference and Microsoft
9: // QuickHelp documentation provided with the library.
10: // See these sources for detailed information regarding the
11: // Microsoft Foundation Classes product.
12: #include <afxwin.h>
13:
14: // Define a window class derived from CFrameWnd
15: class CHelloWindow : public CFrameWnd
16: {
17: public:
18: CHelloWindow()
19: { Create(NULL, "Hello World!", WS_OVERLAPPEDWINDOW, rectDefault); }
20: };
21:
22: // Define an application class derived from CWinApp
23: class CHelloApp : public CWinApp
24: {
25: public:
26: virtual BOOL InitInstance();
27: };
28:
29: // Construct the CHelloApp's m_pMainWnd data member
30: BOOL CHelloApp::InitInstance()
31: {
32: m_pMainWnd = new CHelloWindow();
33: m_pMainWnd->ShowWindow(m_nCmdShow);
34: m_pMainWnd->UpdateWindow();
35: return TRUE;
36: }
37:
38: CHelloApp HelloApp; // HelloApp's constructor initializes and runs the app
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.