WM_GETICON The WM_GETICON message is sent to a window to retrieve a handle to the large or small icon associated with a window. The system displays the large icon in the Alt+Tab dialog, and the small icon in the window caption. WM_GETICON fType = wParam; // icon type
Parameters fType Value of wParam. Specifies the type of icon being retrieved. This parameter can be one of the following values: Value Meaning ICON_BIG Retrieve the large icon for the window. ICON_SMALL Retrieve the small icon for the window. Return Values The return value is a handle to the large or small icon, depending on the value of fType. When an application receives this message, it can return a handle to a large or small icon, or pass the message to DefWindowProc.
DrawIcon VB声明 Declare Function DrawIcon Lib "user32" Alias "DrawIcon" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal hIcon As Long) As Long 说明 在指定的位置画一个图标 返回值 Long,非零表示成功,零表示失败。会设置GetLastError 参数表 参数 类型及说明 hdc Long,设备场景 x,y Long,想描绘图标的位置(逻辑坐标) hIcon Long,欲描绘图标的句柄
The WM_GETICON message is sent to a window to retrieve a handle to the large or small icon associated with a window. The system displays the large icon in the Alt+Tab dialog, and the small icon in the window caption. WM_GETICON
fType = wParam; // icon type
Parameters
fType
Value of wParam. Specifies the type of icon being retrieved. This parameter can be one of the following values: Value Meaning
ICON_BIG Retrieve the large icon for the window.
ICON_SMALL Retrieve the small icon for the window.
Return Values
The return value is a handle to the large or small icon, depending on the value of fType. When an application receives this message, it can return a handle to a large or small icon, or pass the message to DefWindowProc.
Declare Function DrawIcon Lib "user32" Alias "DrawIcon" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal hIcon As Long) As Long
说明
在指定的位置画一个图标
返回值
Long,非零表示成功,零表示失败。会设置GetLastError
参数表
参数 类型及说明
hdc Long,设备场景
x,y Long,想描绘图标的位置(逻辑坐标)
hIcon Long,欲描绘图标的句柄
其中nindex设成GCL_HICON可以得到该类中默认图标的句柄;
设成GCL_HICONSM可以得到该类中小图标;
设成GCL_HCURSOR可以得到该类中默认光标的句柄;