SimpleWindow
载入中...
搜索中...
未找到
Icon.h
1#pragma once
2
3#include <Windows.h>
4#include <string>
5
6namespace sw
7{
12 enum class StandardIcon {
13 Application = 32512, // Default application icon
14 Error = 32513, // Error icon
15 Question = 32514, // Question mark icon
16 Warning = 32515, // Warning icon
17 Information = 32516, // Information icon
18 WinLogo = 32517, // Windows logo icon
19 Shield = 32518, // Security shield icon
20 };
21
26 {
27 private:
28 IconHelper() = delete;
29
30 public:
36 static HICON GetIconHandle(StandardIcon icon);
37
44 static HICON GetIconHandle(HINSTANCE hInstance, int resourceId);
45
51 static HICON GetIconHandle(const std::wstring &fileName);
52 };
53}
用于获取图标句柄的工具类
Definition Icon.h:26
static HICON GetIconHandle(StandardIcon icon)
获取系统标准图标句柄
static HICON GetIconHandle(const std::wstring &fileName)
从文件加载图标句柄
static HICON GetIconHandle(HINSTANCE hInstance, int resourceId)
从指定模块中获取图标句柄