📄 property.h
字号:
// Property.h: interface for the CProperty class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_PROPERTY_H__2ACF12EB_5996_4F05_B412_9E2FE471B270__INCLUDED_)
#define AFX_PROPERTY_H__2ACF12EB_5996_4F05_B412_9E2FE471B270__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ToolKit.h"
class CProperty
{
private:
static void SetDefaultContrlStruct(CreateWndStruct &controlStruct);
static void SetDefaultFont(LOGFONT &font);
public:
CProperty();
virtual ~CProperty();
public:
/**------------------------------------------------------------------------------------
* 名 称: <SetValue>
* 说 明: <根据字符串指针,取得控件的配置信息>
* 参 数: <char *chValue>:<字符串指针>
* <char* keye>:<控件主键值>
* 返 回:
*---------------------------------------------------------------------------------------*/
void SetValue(char* chValue, char* key);
private:
/**------------------------------------------------------------------------------------
* 名 称: <GetSpeCharPtr>
* 说 明: <取得根字符串中,某子字符串后面的字符串>
* 参 数: <char *chValue>:<根字符串>
* <char* &chSpe>:<处理后的字符串>
* <char* key>:<子字符串>
* 返 回:
*---------------------------------------------------------------------------------------*/
void GetSpeCharPtr(char *chValue, char* &chSpe, char* key);
/**------------------------------------------------------------------------------------
* 名 称: <GetColor>
* 说 明: <根据某主键,取得根字符串中该主键对应的颜色>
* 参 数: <char *chValue>:<根字符串>
* <COLORREF &color>:<对应的颜色>
* <char* key>:<主键>
* 返 回:
*---------------------------------------------------------------------------------------*/
void GetColor(char* chValue, COLORREF &color, char* key);
/**------------------------------------------------------------------------------------
* 名 称: <GetInt>
* 说 明: <根据某主键,取得根字符串中该主键对应的整数>
* 参 数: <char *chValue>:<根字符串>
* <int &nInt>:<整数>
* <char* key>:<主键>
* 返 回:
*---------------------------------------------------------------------------------------*/
void GetInt(char* chValue, int &nInt, char* key);
/**------------------------------------------------------------------------------------
* 名 称: <GetCString>
* 说 明: <根据某主键,取得根字符串中该主键对应的字符串值>
* 参 数: <char *chValue>:<根字符串>
* <CString &strSrc>:<字符串值>
* <char* key>:<主键>
* 返 回:
*---------------------------------------------------------------------------------------*/
void GetCString(char *chValue, CString &strSrc, char* key);
/**------------------------------------------------------------------------------------
* 名 称: <GetImgInfo>
* 说 明: <取得根字符串中该主键对应的图片信息>
* 参 数: <char *chValue>:<根字符串>
* <int &nCount>:<图片总数>
* <int &nIndex>:<图片部分的索引>
* 返 回:
*---------------------------------------------------------------------------------------*/
void GetImgInfo(char *chValue, int &nCount, int &nIndex);
/**------------------------------------------------------------------------------------
* 名 称: <GetOtherInfo>
* 说 明: <取得控件的位置>
* 参 数: <char *chValue>:<根字符串>
* <RECT &rect>:<控件的位置>
* 返 回:
*---------------------------------------------------------------------------------------*/
void GetRect(char *chValue, RECT &rect, char* key);
public:
CString m_strKey; // 配置文件中的主键
CString m_strType; // 控件类型
CString m_strText; // 控件文本
COLORREF m_FocColor; // 获取焦点后的背景颜色
COLORREF m_EnbColor; // 控件不可用时的颜色
COLORREF m_ForColor; // 前台颜色
COLORREF m_BgColor; // 背景颜色
CString m_strImgSrc; // 背景图路径
int m_nImgIndex; // 背景图索引
int m_nImgCount; // 背景图图数
RECT m_Rect; // 控件位置
bool m_bIsShow; // 控件是否显示
// char* m_chValue; // 控件描述字符串
CreateWndStruct m_WndStruct; // 创建控件的样式
LOGFONT m_logfont; // 控件文本的字体
UINT m_TextFormat; // 控件文本的样式:靠上,靠下等
bool m_bIsBold; // 字体是否粗体
bool m_bIsEnable; // 是否不可用
};
#endif // !defined(AFX_PROPERTY_H__2ACF12EB_5996_4F05_B412_9E2FE471B270__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -