找回密码
 加入
搜索
查看: 1277|回复: 0

怎么在这个 ListView 里显示图片?

[复制链接]
发表于 2009-8-22 11:22:19 | 显示全部楼层 |阅读模式
#include <GuiListView.au3>
#include <GuiImageList.au3>
#include <GuiConstantsEx.au3>

GUICreate("显示图片", 800, 600, -1, -1)
$ListView1 = GUICtrlCreateListView("", 12, 12, 778, 578)
GUICtrlSetStyle($ListView1, $LVS_ICON)
$LHand = GUICtrlGetHandle ($ListView1)
$hImage = _GUIImageList_Create()
_GUIImageList_SetIconSize($hImage,100,120)
_GUIImageList_SetBkColor($hImage,0xFFFFFF)
_GUIImageList_AddBitmap($hImage, "C:\list.bmp")
_GUICtrlListView_SetImageList($ListView1, $hImage, 0)
_GUICtrlListView_AddItem($ListView1, "图片", 1)
_GUICtrlListView_SetIconSpacing($ListView1, 72, 72)
GUISetState(@SW_SHOW)

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
Exit
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-26 00:38 , Processed in 0.071089 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表