4#include "StaticControl.h"
53 HICON
Load(StandardIcon icon);
61 HICON
Load(HINSTANCE hInstance,
int resourceId);
68 HICON
Load(
const std::wstring &fileName);
92 void _SetIcon(HICON hIcon);
99 HICON _SetIconIfNotNull(HICON hIcon);
用于显示一个图标的控件
Definition IconBox.h:12
HICON Load(HINSTANCE hInstance, int resourceId)
从指定模块中加载图标
void SizeToIcon()
调整控件尺寸为图标尺寸,未加载图标时该函数不生效
const Property< bool > StretchIcon
是否拉伸图标以填充整个控件,值为true时成功调用Load函数会自动调整尺寸为图标尺寸,反之则不会调整尺寸
Definition IconBox.h:28
const ReadOnlyProperty< HICON > IconHandle
当前控件显示的图标句柄,使用Load函数可以加载图标
Definition IconBox.h:23
virtual bool OnDestroy() override
接收到WM_DESTROY时调用该函数
HICON Load(const std::wstring &fileName)
从文件加载图标
HICON Load(HICON hIcon)
加载图标,该函数会复制一个图标句柄作为显示的图标
HICON Load(StandardIcon icon)
加载系统标准图标
属性
Definition Property.h:1743
只读属性
Definition Property.h:1828
静态控件
Definition StaticControl.h:11