LlistViewItem里面如何使用图标
LlistViewItem里的数据能不能是图标 如何创建和使用[ 本帖最后由 5yun 于 2008-8-11 02:06 编辑 ] 帮助里有例子,需要用到UDF 谢谢提示 不过我想要的是 windows 桌面的样式 怎样实现 望提供代码样例 Local $hImage, $hListView
; Create GUI
GUICreate("ListView Set Icon Spacing", 400, 300)
$hListView = GUICtrlCreateListView("", 2, 2, 394, 268)
GUICtrlSetStyle($hListView, $LVS_ICON)
GUISetState()
; Load images
$hImage = _GUIImageList_Create()
_GUIImageList_SetIconSize($hImage,32,32)
_GUIImageList_SetBkColor($hImage,0xffffff)
_GUIImageList_AddIcon($hImage, "002.ico");读取图标
_GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0x00FF00, 48, 48))
_GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0x0000FF, 48, 48))
_GUICtrlListView_SetImageList($hListView, $hImage, 0)
; Add items
_GUICtrlListView_AddItem($hListView, "Item 1", 0)
_GUICtrlListView_AddItem($hListView, "Item 2", 1)
_GUICtrlListView_AddItem($hListView, "Item 3", 2)
; Change item spacing
;MsgBox(4160, "Information", "Changing icon spacing")
_GUICtrlListView_SetIconSpacing($hListView, 64, 64)
; Loop until user exits
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
页:
[1]