|
发表于 2016-9-1 08:26:07
|
显示全部楼层
本帖最后由 chzj589 于 2016-9-1 08:28 编辑
回复 chzj589
嗯,看到了,只是我还是希望右键菜单是创建在Item上的,就是右键点击“以分组服务 ...
imutraveler 发表于 2016-8-31 17:10
要右键点击“以分组服务器列表”没有反映,修改WM_COMMAND加个判断就可以:
Func WM_COMMAND($hWnd, $msg, $WParam, $LParam)
#forceref $hWnd, $Msg
Local $nNotifyCode = BitShift($WParam, 16)
Local $nID = BitAND($WParam, 0x0000FFFF)
Local $hCtrl = $LParam
Switch $nID
Case $exit
Switch $nNotifyCode
Case 0
Exit
EndSwitch
Case $rclk
Switch $nNotifyCode
Case 0
$Strn1 = "已分组服务器列表"
$Strn2 = GUICtrlRead($TreeView, 1)
$Strnspin1 = StringSplit($Strn2, "|")
If $Strn1 = $Strnspin1[1] Then
MsgBox(48, '提示', '请选择要更新的条目', 1)
Else
MsgBox(0, "编辑", "确认要编辑分组!" & GUICtrlRead($TreeView, 1), 1)
Form2()
EndIf
EndSwitch
Case $rclka
Switch $nNotifyCode
Case 0
$Strn1 = "已分组服务器列表"
$Strn2 = GUICtrlRead($TreeView, 1)
$Strnspin1 = StringSplit($Strn2, "|")
If $Strn1 = $Strnspin1[1] Then
MsgBox(48, '提示', '请选择要删除的条目', 1)
Else
MsgBox(0, "删除", "确认要删除分组?" & GUICtrlRead($TreeView, 1))
EndIf
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_COMMAND |
|