home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / C++-7 / DISK8 / MFC / SAMPLES / HELLOAPP / HELLOAPP.CP$ / helloapp
Encoding:
Text File  |  1992-01-10  |  1.1 KB  |  39 lines

  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. public:
  17.     CHelloWindow() 
  18.         { Create(NULL, "Hello World!", WS_OVERLAPPEDWINDOW, rectDefault); }
  19. };
  20.  
  21. // Define an application class derived from CWinApp
  22. class CHelloApp : public CWinApp
  23. {
  24. public:
  25.     virtual BOOL InitInstance();
  26. };
  27.  
  28. // Construct the CHelloApp's m_pMainWnd data member
  29. BOOL CHelloApp::InitInstance()
  30. {
  31.     m_pMainWnd = new CHelloWindow();
  32.     m_pMainWnd->ShowWindow(m_nCmdShow);
  33.     m_pMainWnd->UpdateWindow();
  34.     return TRUE;
  35. }
  36.  
  37. CHelloApp HelloApp;  // HelloApp's constructor initializes and runs the app
  38.