本帖最后由 xzf680 于 2018-3-22 11:12 编辑
看一下是不是你想要的,看来我是错的,图标也都是正方形,没办法
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
Example()
Func Example()
; 创建一个 GUI 及其各种控件.
Local $hGUI = GUICreate("内置函数示例")
Local $idOK = GUICtrlCreateButton("确定", 310, 370, 85, 25)
Global $idListview = GUICtrlCreateListView("示例1|系统|卷标|总大小|可用空间", 35, 130, 330, 130, BitOR($lvs_showselalways, $lvs_nosortheader, $lvs_report, $lvs_singlesel))
_GUICtrlListView_SetColumnWidth(-1, 0, 60)
_GUICtrlListView_SetColumnWidth(-1, 1, 60)
_GUICtrlListView_SetColumnWidth(-1, 2, 60)
_GUICtrlListView_SetColumnWidth(-1, 3, 60)
_GUICtrlListView_SetColumnWidth(-1, 4, 60)
GUICtrlSendMsg(-1, $lvm_setextendedlistviewstyle, $lvs_ex_gridlines, $lvs_ex_gridlines)
Local $idItem1 = GUICtrlCreateListViewItem("图标1|子目2|子目3|子目4|子目5", $idListview)
GUICtrlSetImage(-1, "shell32.dll", 22)
Local $idItem2 = GUICtrlCreateListViewItem("图标2|子目2|子目3|子目4|子目5", $idListview)
GUICtrlSetImage(-1, "shell32.dll", 23)
Local $idItem3 = GUICtrlCreateListViewItem("图标3|子目2|子目3|子目4|子目5", $idListview)
GUICtrlSetImage(-1, "shell32.dll", 24)
Local $idItem4 = GUICtrlCreateListViewItem("图标4|子目2|子目3|子目4|子目5", $idListview)
GUICtrlSetImage(-1, "shell32.dll", 25)
Local $idItem5 = GUICtrlCreateListViewItem("图标5|子目2|子目3|子目4|子目5", $idListview)
GUICtrlSetImage(-1, "shell32.dll", 26)
Local $idItem6 = GUICtrlCreateListViewItem("图标6|子目2|子目3|子目4|子目5", $idListview)
GUICtrlSetImage(-1, "shell32.dll", 27)
; 显示 GUI.
GUISetState(@SW_SHOW, $hGUI)
; 循环到用户退出.
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE, $idOK
ExitLoop
EndSwitch
WEnd
; 删除先前创建的 GUI 和所有控件.
GUIDelete($hGUI)
EndFunc ;==>Example
|