⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shapeobj.h

📁 有关属性对话框的编程
💻 H
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
// shapeobj.h : interface of the CShape class
//
// This is a part of the Microsoft Foundation Classes C++ library.
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.

//图形样式
enum SHAPE_STYLE
{
	rectangle,
	rounded_rectangle,
	ellipse,
};
//图形颜色数
enum SHAPE_COLOR_ENUM
{
	black,
	dark_gray,
	light_gray,
	white,
};
//图形颜色结构
struct SHAPE_COLOR
{
	SHAPE_COLOR_ENUM e;
	operator COLORREF() const;
	const SHAPE_COLOR& operator = (COLORREF colorref);
	operator int() const;
	const SHAPE_COLOR& operator = (int n);
};

class CShape : public CObject
{
public:
	CShape();
	CShape(SHAPE_COLOR_ENUM colorenum, SHAPE_STYLE shapestyle, CRect& rect);

	DECLARE_SERIAL(CShape)

	SHAPE_COLOR m_shapecolor;//图形颜色
	SHAPE_STYLE m_shapestyle;//图形样式
	CRect       m_rect;

	void Draw(CDC* pDC, BOOL bSelected);//绘制
	virtual void Serialize(CArchive& ar);
};

⌨️ 快捷键说明

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