【VC开源代码栏目提醒】:本文主要为网学会员提供MDICLWND.CPP,希望对需要MDICLWND.CPP网友有所帮助,学习一下!
// 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 );
}