?? childfrm.cpp
字號:
// ChildFrm.cpp : implementation of the CChildFrame class
//
#include "stdafx.h"
#include "ex22c.h"
#include "ChildFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CChildFrame
IMPLEMENT_DYNAMIC(CChildFrame, CMDIChildWnd)
BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
//{{AFX_MSG_MAP(CChildFrame)
ON_WM_PAINT()
ON_WM_CLOSE()
ON_COMMAND(ID_FILE_CLOSE, OnFileClose)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CChildFrame construction/destruction
CChildFrame::CChildFrame()
{
// TODO: add member initialization code here
}
CChildFrame::~CChildFrame()
{
}
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CMDIChildWnd::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CChildFrame diagnostics
#ifdef _DEBUG
void CChildFrame::AssertValid() const
{
CMDIChildWnd::AssertValid();
}
void CChildFrame::Dump(CDumpContext& dc) const
{
CMDIChildWnd::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CChildFrame message handlers
void CChildFrame::OnPaint()
{
CPaintDC dc(this); // device context for painting
dc.TextOut(0, 0, "Hello, world!");
// Do not call CMDIChildWnd::OnPaint() for painting messages
}
void CChildFrame::OnClose()
{
if (AfxMessageBox("OK to close window?", MB_YESNO) == IDYES) {
CMDIChildWnd::OnClose();
}
}
void CChildFrame::OnFileClose()
{
SendMessage(WM_CLOSE);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -