home *** CD-ROM | disk | FTP | other *** search
/ Master Visual C++ 1.5 / MASTERVC15.ISO / vcprog / original / ch27 / ball / mainfrm.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-12  |  1.6 KB  |  81 lines

  1. // mainfrm.cpp : implementation of the CMainFrame class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "ball.h"
  6.  
  7. #include "mainfrm.h"
  8.  
  9. #ifdef _DEBUG
  10. #undef THIS_FILE
  11. static char BASED_CODE THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CMainFrame
  16.  
  17. IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
  18.  
  19. BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
  20.     //{{AFX_MSG_MAP(CMainFrame)
  21.         // NOTE - the ClassWizard will add and remove mapping macros here.
  22.         //    DO NOT EDIT what you see in these blocks of generated code !
  23.     //}}AFX_MSG_MAP
  24. END_MESSAGE_MAP()
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CMainFrame construction/destruction
  28.  
  29. CMainFrame::CMainFrame()
  30. {
  31.     // TODO: add member initialization code here
  32. }
  33.  
  34. CMainFrame::~CMainFrame()
  35. {
  36. }
  37.  
  38. /////////////////////////////////////////////////////////////////////////////
  39. // CMainFrame diagnostics
  40.  
  41. #ifdef _DEBUG
  42. void CMainFrame::AssertValid() const
  43. {
  44.     CFrameWnd::AssertValid();
  45. }
  46.  
  47. void CMainFrame::Dump(CDumpContext& dc) const
  48. {
  49.     CFrameWnd::Dump(dc);
  50. }
  51.  
  52. #endif //_DEBUG
  53.  
  54. /////////////////////////////////////////////////////////////////////////////
  55. // CMainFrame message handlers
  56.  
  57.  
  58. //////////////////////
  59. // MY CODE STARTS HERE
  60. //////////////////////
  61.  
  62. BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
  63. {
  64.  
  65.     // Call the base class function.
  66.     CFrameWnd::PreCreateWindow( cs );
  67.  
  68.     // Set the width of the window to 335.
  69.     cs.cx = 335;
  70.  
  71.     // Set the height of the window to 385.
  72.     cs.cy = 385;
  73.  
  74.     return TRUE;
  75. }
  76.  
  77. ////////////////////
  78. // MY CODE ENDS HERE
  79. ////////////////////
  80.  
  81.