mdiclwnd.cpp
来自「MFC扩展编程实例」· C++ 代码 · 共 56 行
CPP
56 行
// MDIClWnd.cpp : implementation file
//
#include "stdafx.h"
#include "wzd.h"
#include "MDIClWnd.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMDIClientWnd
CMDIClientWnd::CMDIClientWnd()
{
}
CMDIClientWnd::~CMDIClientWnd()
{
}
BEGIN_MESSAGE_MAP(CMDIClientWnd, CWnd)
//{{AFX_MSG_MAP(CMDIClientWnd)
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMDIClientWnd message handlers
void CMDIClientWnd::OnPaint()
{
CPaintDC dc(this); // device context for painting
CDC dcMem;
dcMem.CreateCompatibleDC( &dc );
// get bitmap and info
BITMAP bm;
CBitmap bitmap;
bitmap.LoadBitmap(IDB_WZD_MDIBITMAP);
dcMem.SelectObject(bitmap);
bitmap.GetObject( sizeof(BITMAP), &bm );
// stretch bitmap
CRect rect;
GetClientRect(&rect);
dc.StretchBlt( rect.left, rect.top, rect.right, rect.bottom,
&dcMem, 0, 0, bm.bmWidth-1, bm.bmHeight-1, SRCCOPY );
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?