odstatic.cpp

来自「讲mfc的书」· C++ 代码 · 共 41 行

CPP
41
字号
// ODStatic.cpp : implementation file
//

#include "stdafx.h"
#include "buttons.h"
#include "ODStatic.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CODStatic

CODStatic::CODStatic()
{
}

CODStatic::~CODStatic()
{
}


BEGIN_MESSAGE_MAP(CODStatic, CStatic)
	//{{AFX_MSG_MAP(CODStatic)
//	ON_WM_DRAWITEM()
	ON_WM_DRAWITEM_REFLECT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CODStatic message handlers

void CODStatic::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) 
{
	CDC *dc=CDC::FromHandle(lpDrawItemStruct->hDC);
	dc->Ellipse(&lpDrawItemStruct->rcItem);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?