home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / advanced / mtgdi / mainfrm.cpp next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  1.8 KB  |  73 lines

  1. // mainfrm.cpp : implementation of the CMainFrame class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 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 related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #include "stdafx.h"
  14. #include "mtgdi.h"
  15.  
  16. #include "mainfrm.h"
  17.  
  18. #ifdef _DEBUG
  19. #undef THIS_FILE
  20. static char BASED_CODE THIS_FILE[] = __FILE__;
  21. #endif
  22.  
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CMainFrame
  25.  
  26. IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
  27.  
  28. BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
  29.     //{{AFX_MSG_MAP(CMainFrame)
  30.         // NOTE - the ClassWizard will add and remove mapping macros here.
  31.         //    DO NOT EDIT what you see in these blocks of generated code !
  32.     //}}AFX_MSG_MAP
  33. END_MESSAGE_MAP()
  34.  
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CMainFrame construction/destruction
  37.  
  38. CMainFrame::CMainFrame()
  39. {
  40.     // TODO: add member initialization code here
  41.  
  42. }
  43.  
  44. CMainFrame::~CMainFrame()
  45. {
  46. }
  47.  
  48. /////////////////////////////////////////////////////////////////////////////
  49. // CMainFrame diagnostics
  50.  
  51. #ifdef _DEBUG
  52. void CMainFrame::AssertValid() const
  53. {
  54.     CFrameWnd::AssertValid();
  55. }
  56.  
  57. void CMainFrame::Dump(CDumpContext& dc) const
  58. {
  59.     CFrameWnd::Dump(dc);
  60. }
  61.  
  62. #endif //_DEBUG
  63.  
  64. /////////////////////////////////////////////////////////////////////////////
  65. // CMainFrame message handlers
  66.  
  67. BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
  68. {
  69.     cs.style &= ~FWS_ADDTOTITLE;
  70.  
  71.     return CFrameWnd::PreCreateWindow(cs);
  72. }
  73.