_WinAPI_ShellExtractIcon这个文件哪个有,能发一下吗,谢谢!(已解决)
本帖最后由 qsy666888 于 2018-3-25 14:02 编辑WinAPIEx.au3里面不含这个代码#include <GuiListView.au3>
#include <GuiImageList.au3>
#include <WinAPIEx.au3>
GUICreate("xxxxxxxx", 560, 180)
$hListView = GUICtrlCreateListView("", 8, 8, 545, 150)
GUICtrlSendMsg(-1, $LVM_SETVIEW, 0, 0)
GUISetState()
$hImage = _GUIImageList_Create(128, 128, 5, 3)
_GUICtrlListView_SetImageList($hListView, $hImage, 0)
Local $hIcon
For $i = 0 To 2
$hIcon = _WinAPI_ShellExtractIcon("ico.dll", $i, 128, 128)
ConsoleWrite(_GUIImageList_ReplaceIcon($hImage, -1, $hIcon) & @CRLF)
Next
_GUICtrlListView_AddColumn($hListView, "Items")
_WinAPI_DestroyIcon($hIcon)
_GUICtrlListView_AddItem($hListView, "a", 0)
_GUICtrlListView_AddItem($hListView, "b", 1)
_GUICtrlListView_AddItem($hListView, "c", 2)
While GUIGetMsg() <> -3
WEnd
回复 1# qsy666888
AUTOIT V3.3.14.2 版 以上應該就有了 回复 2# kk_lee69
没得,我下了一个最新版,安装后也是显示这个 发现WinAPIEx.au3 这个文件里没有这个 _WinAPI_ShellExtractIcon 的一段代码。 新版的名字改了,你还是改改吧
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WinAPI.au3>
#include <WinAPIShellEx.au3>
Local $iIndex = 0, $iTotal = _WinAPI_ExtractIconEx(@SystemDir & '\shell32.dll', -1, 0, 0, 0)
Local $hForm = GUICreate('测试 ' & StringReplace(@ScriptName, '.au3', '()'), 160, 160)
Local $idButton = GUICtrlCreateButton('下一步', 50, 130, 70, 23)
Local $idIcon = GUICtrlCreateIcon(@SystemDir & '\shell32.dll', 0, 69, 54, 32, 32)
Local $hIcon = GUICtrlGetHandle(-1)
GUISetState(@SW_SHOW)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $idButton
$iIndex += 1
If $iIndex > $iTotal - 1 Then
$iIndex = 0
EndIf
_WinAPI_DestroyIcon(_SendMessage($hIcon, $STM_SETIMAGE, 1, _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', $iIndex, 32, 32)))
EndSwitch
WEnd
回复 6# rikthhpgf2005
谢谢你,谢谢大家的回复,论坛威武
页:
[1]