📄 brush.cpp
字号:
// ============================================================================
// Brush implementation
//
// (c) 2003 Ken Reed
//
// This is free software. You can redistribute it and/or modify it under the
// terms of the GNU General Public License version 2 as published by the Free
// Software Foundation.
// ============================================================================
#include "stdafx.h"
#include "brush.h"
#include <assert.h>
// ============================================================================
// Construction
// ============================================================================
Brush::Brush(HDC hdc, COLORREF colour)
{
shdc = hdc;
brush = CreateSolidBrush(colour);
assert(brush != 0);
SelectObject(hdc, brush);
}
// ============================================================================
// Destruction
// ============================================================================
Brush::~Brush()
{
SelectObject(shdc, old_brush);
DeleteObject(brush);
}
// ============================================================================
// Convert to HBRUSH
// ============================================================================
Brush::operator HBRUSH() const
{
return brush;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -