本帖最后由 shenrenba 于 2011-4-7 16:12 编辑
使用_GUICtrlListView_Create创建的控件 用GUICtrlCreateContextMenu 无效
使用GUICtrlCreateListView 创建的就可以 请问如何解决
#include <GuiListView.au3>
$hGUI = GUICreate("Test", 400, 300)
$hListView = _GUICtrlListView_Create($hGUI, "", 30, 20, 340, 50, BitOR($LVS_EDITLABELS, $LVS_REPORT))
_GUICtrlListView_SetExtendedListViewStyle($hListView, $LVS_EX_GRIDLINES)
_GUICtrlListView_InsertColumn($hListView, 0, "1", 50)
_GUICtrlListView_InsertColumn($hListView, 1, "2", 50)
_GUICtrlListView_InsertColumn($hListView, 2, "3", 100)
$ListView =GUICtrlCreateListView("1 |2 |3 ",30, 100, 340, 50)
$hmenu = GUICtrlCreateContextMenu($hListView)
GUICtrlCreateMenuItem("ceshi1", $hmenu)
$menu = GUICtrlCreateContextMenu($ListView)
GUICtrlCreateMenuItem("ceshi2", $menu)
GUISetState()
While GUIGetMsg() <> -3
WEnd
|