typedef struct _WNDCLASS { UINT style; //制定窗口的类型 WNDPROC lpfnWndProc; int cbClsExtra; //额外的数值 int cbWndExtra; //额外的内存空间 HANDLE hInstance; // HICON hIcon; //图标的句柄利用loadicon进行赋值 HCURSOR hCursor; //光标 HBRUSH hbrBackground; //画刷 LPCTSTR lpszMenuName;
destroyWindow
HICON LoadIcon( HINSTANCE hInstance, // handle to application instance LPCTSTR lpIconName // icon-name string or icon resource // identifier);
Parameters
-
-
HInstance
-
Handle to a instance of the
-
module whose executable file contains the icon to be loaded. This parameter must was NULL when a standard icon is being loaded.
-
-
lpIconName
-
Pointer to a null-terminated string this contains the name of the the icon resource to be loaded. Alternatively, this parameter can contain the resource identifier in the Low-order word and zero in the High-order word. Use the
MakeintresourceMacro to create this value.
To use one of the predefined icons, set the hinstance parameter to NULL and the lpiconname parameter to One of the following values:
Value |
Description |
Idi_application |
Default application icon. |
Idi_asterisk |
Same as Idi_information. |
Idi_error |
hand-shaped icon. |
Idi_exclamation |
Same as idi_warning. |
Idi_hand |
Same as Idi_error. |
Idi_information |
Asterisk icon. |
Idi_question |
Question mark icon. |
Idi_warning |
exclamation point icon. |
Idi_winlogo |
Customizing Windows MFC