感谢afan哥。。我找到原因了。至于GUICtrlSetStyle($ListView1 , $LVS_ICON)这个,是我精简源码拷贝过来用来发论坛方便大家查看,没注意修改导致,不过这个不是影响结果的原因。不过根据您的提醒,我仔细看了下,是因为_GUICtrlListView_SetImageList($ListView2, $hImage, 0),默认小图标模式。我把他更改为大图标后就可以了。。。感恩~~是我马虎了~~不好意思。谢谢afan哥
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 716, 367, 192, 124)
$ListView1 = GUICtrlCreateListView("", 16, 24, 322, 334)
GUICtrlSetStyle($ListView1 , $LVS_ICON)
$ListView2 = GUICtrlCreateListView("", 344, 24, 370, 334)
GUICtrlSetStyle($ListView2 , $LVS_ICON)
$hImage = _GUIImageList_Create(16, 16, 5, 3)
_GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 13)
_GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 14)
_GUICtrlListView_SetImageList($ListView1, $hImage, 0)
; _GUICtrlListView_SetImageList($ListView2, $hImage, 0)
_GUICtrlListView_SetImageList($ListView2, $hImage, 1)
; Add columns
_GUICtrlListView_AddColumn($ListView1, "", 120)
; Add columns
_GUICtrlListView_AddColumn($ListView2, "", 120)
; Add items
_GUICtrlListView_AddItem($ListView1, "Row 1", 0)
_GUICtrlListView_AddItem($ListView1, "Row 2", 0)
$ListView1context = GUICtrlCreateContextMenu($ListView1)
$MenuItem1 = GUICtrlCreateMenuItem("右?添加到右?", $ListView1context)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $MenuItem1
_GUICtrlListView_CopyItems($ListView1, $ListView2)
EndSwitch
WEnd
|