home *** CD-ROM | disk | FTP | other *** search
/ Media Share 13 / mediashare_13.zip / mediashare_13 / ZIPPED / PROGRAM / WTJ9403.ZIP / POKER / POKER.CPP < prev    next >
C/C++ Source or Header  |  1993-10-05  |  4KB  |  135 lines

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