请问怎么使用WM_SETICON,帮忙看看代码
我想修改其他窗口的图标,可是做不到。
尝试使用SendMessage hwnd,WM_SETICON,Icon_SMALL,hIcon
代码如下
Dim sFileName As String
Dim nIconIdx As Long, hSmallIcon As Long, hLargeIcon As Long
Dim hIcon As Long
sFileName = String(MAX_PATH, 0)
If SHChangeIconDialog(0, sFileName, MAX_PATH, nIconIdx) Then
If IsWindowsNT Then sFileName = StrConv(sFileName, vbFromUnicode)
If ExtractIconEx(sFileName, nIconIdx, hLargeIcon, hSmallIcon, 1) > 0 Then
hIcon = CopyIcon(hSmallIcon)
If hIcon <> 0 Then
Call SendMessage(Val(ListView1(0).SelectedItem.SubItems(1)), WM_SETICON, 0&, hIcon)
End If
End if
End if
帮帮我~