mainfrm.cpp
来自「MS VC++ 开发斐切比塔游戏范例」· C++ 代码 · 共 69 行
CPP
69 行
// mainfrm.cpp : implementation of the CMainFrame class
//
#include "stdafx.h"
#include "puzzle.h"
#include "mainfrm.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMainFrame
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
//{{AFX_MSG_MAP(CMainFrame)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMainFrame construction/destruction
CMainFrame::CMainFrame()
{
// TODO: add member initialization code here
}
CMainFrame::~CMainFrame()
{
}
/////////////////////////////////////////////////////////////////////////////
// CMainFrame diagnostics
#ifdef _DEBUG
void CMainFrame::AssertValid() const
{
CFrameWnd::AssertValid();
}
void CMainFrame::Dump(CDumpContext& dc) const
{
CFrameWnd::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMainFrame message handlers
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
RECT rect={0,0,200,250}; //Desired client rect size
if ( !CFrameWnd::PreCreateWindow(cs))
return FALSE;
cs.style = WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU | WS_VISIBLE;
//CalcWindowRect(&rect); //Calculate total window size
::AdjustWindowRect(&rect, cs.style, TRUE);
cs.cx = rect.right-rect.left;
cs.cy = rect.bottom-rect.top;
cs.x = CW_USEDEFAULT;
cs.y = CW_USEDEFAULT;
return TRUE;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?