home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pc3270sa.zip / apps / winaping / winaping.cpp < prev    next >
Text File  |  2002-02-28  |  4KB  |  131 lines

  1. // winaping.cpp : Defines the class behaviors for the application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "winaping.h"
  6.  
  7. #include "mainfrm.h"
  8. #include "winapdoc.h"
  9. #include "goview.h"
  10.  
  11. #ifdef _DEBUG
  12. #undef THIS_FILE
  13. static char BASED_CODE THIS_FILE[] = __FILE__;
  14. #endif
  15.  
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CWinapingApp
  18.  
  19. BEGIN_MESSAGE_MAP(CWinapingApp, CWinApp)
  20.         //{{AFX_MSG_MAP(CWinapingApp)
  21.         ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
  22.                 // NOTE - the ClassWizard will add and remove mapping macros here.
  23.                 //    DO NOT EDIT what you see in these blocks of generated code!
  24.         //}}AFX_MSG_MAP
  25.         // Standard file based document commands
  26.         ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
  27.         ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
  28. END_MESSAGE_MAP()
  29.  
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CWinapingApp construction
  32.  
  33. CWinapingApp::CWinapingApp()
  34. {
  35.         // TODO: add construction code here,
  36.         // Place all significant initialization in InitInstance
  37. }
  38.  
  39. /////////////////////////////////////////////////////////////////////////////
  40. // The one and only CWinapingApp object
  41.  
  42. CWinapingApp theApp;
  43.  
  44. /////////////////////////////////////////////////////////////////////////////
  45. // CWinapingApp initialization
  46.  
  47. BOOL CWinapingApp::InitInstance()
  48. {
  49.         // Standard initialization
  50.         // If you are not using these features and wish to reduce the size
  51.         //  of your final executable, you should remove from the following
  52.         //  the specific initialization routines you do not need.
  53.  
  54. //      Enable3dControls();
  55.  
  56.         LoadStdProfileSettings();  // Load standard INI file options (including MRU)
  57.  
  58.         // Register the application's document templates.  Document templates
  59.         //  serve as the connection between documents, frame windows and views.
  60.  
  61.         CSingleDocTemplate* pDocTemplate;
  62.         pDocTemplate = new CSingleDocTemplate(
  63.                 IDR_MAINFRAME,
  64.                 RUNTIME_CLASS(CWinapingDoc),
  65.                 RUNTIME_CLASS(CMainFrame),       // main SDI frame window
  66.                 RUNTIME_CLASS(CGoView));
  67. //              RUNTIME_CLASS(CWinapingView));
  68.         AddDocTemplate(pDocTemplate);
  69.  
  70.         // create a new (empty) document
  71.         OnFileNew();
  72.  
  73.         if (m_lpCmdLine[0] != '\0')
  74.         {
  75.                 // TODO: add command line processing here
  76.         }
  77.  
  78.         return TRUE;
  79. }
  80.  
  81. /////////////////////////////////////////////////////////////////////////////
  82. // CAboutDlg dialog used for App About
  83.  
  84. class CAboutDlg : public CDialog
  85. {
  86. public:
  87.         CAboutDlg();
  88.  
  89. // Dialog Data
  90.         //{{AFX_DATA(CAboutDlg)
  91.         enum { IDD = IDD_ABOUTBOX };
  92.         //}}AFX_DATA
  93.  
  94. // Implementation
  95. protected:
  96.         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  97.         //{{AFX_MSG(CAboutDlg)
  98.                 // No message handlers
  99.         //}}AFX_MSG
  100.         DECLARE_MESSAGE_MAP()
  101. };
  102.  
  103. CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
  104. {
  105.         //{{AFX_DATA_INIT(CAboutDlg)
  106.         //}}AFX_DATA_INIT
  107. }
  108.  
  109. void CAboutDlg::DoDataExchange(CDataExchange* pDX)
  110. {
  111.         CDialog::DoDataExchange(pDX);
  112.         //{{AFX_DATA_MAP(CAboutDlg)
  113.         //}}AFX_DATA_MAP
  114. }
  115.  
  116. BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
  117.         //{{AFX_MSG_MAP(CAboutDlg)
  118.                 // No message handlers
  119.         //}}AFX_MSG_MAP
  120. END_MESSAGE_MAP()
  121.  
  122. // App command to run the dialog
  123. void CWinapingApp::OnAppAbout()
  124. {
  125.         CAboutDlg aboutDlg;
  126.         aboutDlg.DoModal();
  127. }
  128.  
  129. /////////////////////////////////////////////////////////////////////////////
  130. // CWinapingApp commands
  131.