home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_C / MSVCPUZL.ZIP / MAINFRM.CPP < prev    next >
C/C++ Source or Header  |  1993-11-10  |  2KB  |  69 lines

  1. // mainfrm.cpp : implementation of the CMainFrame class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "puzzle.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.     //}}AFX_MSG_MAP
  22. END_MESSAGE_MAP()
  23.  
  24.  
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CMainFrame construction/destruction
  27.  
  28. CMainFrame::CMainFrame()
  29. {
  30.     // TODO: add member initialization code here
  31. }
  32.  
  33. CMainFrame::~CMainFrame()
  34. {
  35. }
  36.  
  37. /////////////////////////////////////////////////////////////////////////////
  38. // CMainFrame diagnostics
  39.  
  40. #ifdef _DEBUG
  41. void CMainFrame::AssertValid() const
  42. {
  43.     CFrameWnd::AssertValid();
  44. }
  45.  
  46. void CMainFrame::Dump(CDumpContext& dc) const
  47. {
  48.     CFrameWnd::Dump(dc);
  49. }
  50.  
  51. #endif //_DEBUG
  52.  
  53. /////////////////////////////////////////////////////////////////////////////
  54. // CMainFrame message handlers
  55. BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
  56. {
  57. RECT rect={0,0,200,250};  //Desired client rect size
  58.   if ( !CFrameWnd::PreCreateWindow(cs))
  59.     return FALSE;
  60.   cs.style = WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU | WS_VISIBLE;
  61.   //CalcWindowRect(&rect);  //Calculate total window size
  62.   ::AdjustWindowRect(&rect, cs.style, TRUE);
  63.   cs.cx = rect.right-rect.left;
  64.   cs.cy = rect.bottom-rect.top;
  65.   cs.x  = CW_USEDEFAULT;
  66.   cs.y  = CW_USEDEFAULT;
  67.   return TRUE;
  68. }
  69.