home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 02 Useful Techniques / 07 Vykruta / LOSGridDemo.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-11-13  |  2.7 KB  |  126 lines

  1. // LOSGridDemo.cpp : Defines the class behaviors for the application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "LOSGridDemo.h"
  6.  
  7. #include "MainFrm.h"
  8.  
  9. #ifdef _DEBUG
  10. #define new DEBUG_NEW
  11. #undef THIS_FILE
  12. static char THIS_FILE[] = __FILE__;
  13. #endif
  14.  
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CLOSGridDemoApp
  17.  
  18. BEGIN_MESSAGE_MAP(CLOSGridDemoApp, CWinApp)
  19.     //{{AFX_MSG_MAP(CLOSGridDemoApp)
  20.     ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
  21.     //}}AFX_MSG_MAP
  22. END_MESSAGE_MAP()
  23.  
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CLOSGridDemoApp construction
  26.  
  27. CLOSGridDemoApp::CLOSGridDemoApp()
  28. {
  29. }
  30.  
  31. /////////////////////////////////////////////////////////////////////////////
  32. // The one and only CLOSGridDemoApp object
  33.  
  34. CLOSGridDemoApp theApp;
  35.  
  36. /////////////////////////////////////////////////////////////////////////////
  37. // CLOSGridDemoApp initialization
  38.  
  39. BOOL CLOSGridDemoApp::InitInstance()
  40. {
  41.     // Standard initialization
  42.  
  43.     // Change the registry key under which our settings are stored.
  44.     SetRegistryKey(_T("Local AppWizard-Generated Applications"));
  45.  
  46.  
  47.  
  48.     CMainFrame* pFrame = new CMainFrame;
  49.     m_pMainWnd = pFrame;
  50.  
  51.     // create and load the frame with its resources
  52.  
  53.     pFrame->LoadFrame(IDR_MAINFRAME,
  54.         WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
  55.         NULL);
  56.  
  57.     pFrame->ShowWindow(SW_SHOW);
  58.     pFrame->UpdateWindow();
  59.  
  60.     return TRUE;
  61. }
  62.  
  63. /////////////////////////////////////////////////////////////////////////////
  64. // CLOSGridDemoApp message handlers
  65.  
  66.  
  67.  
  68.  
  69.  
  70. /////////////////////////////////////////////////////////////////////////////
  71. // CAboutDlg dialog used for App About
  72.  
  73. class CAboutDlg : public CDialog
  74. {
  75. public:
  76.     CAboutDlg();
  77.  
  78. // Dialog Data
  79.     //{{AFX_DATA(CAboutDlg)
  80.     enum { IDD = IDD_ABOUTBOX };
  81.     //}}AFX_DATA
  82.  
  83.     // ClassWizard generated virtual function overrides
  84.     //{{AFX_VIRTUAL(CAboutDlg)
  85.     protected:
  86.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  87.     //}}AFX_VIRTUAL
  88.  
  89. // Implementation
  90. protected:
  91.     //{{AFX_MSG(CAboutDlg)
  92.         // No message handlers
  93.     //}}AFX_MSG
  94.     DECLARE_MESSAGE_MAP()
  95. };
  96.  
  97. CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
  98. {
  99.     //{{AFX_DATA_INIT(CAboutDlg)
  100.     //}}AFX_DATA_INIT
  101. }
  102.  
  103. void CAboutDlg::DoDataExchange(CDataExchange* pDX)
  104. {
  105.     CDialog::DoDataExchange(pDX);
  106.     //{{AFX_DATA_MAP(CAboutDlg)
  107.     //}}AFX_DATA_MAP
  108. }
  109.  
  110. BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
  111.     //{{AFX_MSG_MAP(CAboutDlg)
  112.         // No message handlers
  113.     //}}AFX_MSG_MAP
  114. END_MESSAGE_MAP()
  115.  
  116. // App command to run the dialog
  117. void CLOSGridDemoApp::OnAppAbout()
  118. {
  119.     CAboutDlg aboutDlg;
  120.     aboutDlg.DoModal();
  121. }
  122.  
  123. /////////////////////////////////////////////////////////////////////////////
  124. // CLOSGridDemoApp message handlers
  125.  
  126.