如何选择SysTreeView32内的选项
答案:2 悬赏:60 手机版
解决时间 2021-02-25 17:52
- 提问者网友:骑士
- 2021-02-25 11:41
如何选择SysTreeView32内的选项
最佳答案
- 五星知识达人网友:胯下狙击手
- 2021-02-25 13:15
#include
$Win="番茄花园 Windows 主题资源包 2.7.0.0 安装 ";;窗口名称
If Not WinExists($Win) Then
MsgBox(0,"","不存在的窗口对像.")
Exit
EndIf
$hWnd=ControlGetHandle($Win,"","[id:1032]");;,[id:1032]控件句柄
Local $sItem
$hStart = _GUICtrlTreeView_GetFirstItem($hWnd)
MsgBox(0,"","全部取消 .")
$fCheck = False
While $hStart <> 0x00000000
_GUICtrlTreeView_SetChecked($hWnd,$hStart,$fCheck)
$hStart = _GUICtrlTreeView_GetNext($hWnd, $hStart)
WEnd
MsgBox(0,"","全部选择.")
$hStart = _GUICtrlTreeView_GetFirstItem($hWnd)
$fCheck = True
While $hStart <> 0x00000000
_GUICtrlTreeView_SetChecked($hWnd,$hStart,$fCheck)
$hStart = _GUICtrlTreeView_GetNext($hWnd, $hStart)
WEnd
Exit
$Win="番茄花园 Windows 主题资源包 2.7.0.0 安装 ";;窗口名称
If Not WinExists($Win) Then
MsgBox(0,"","不存在的窗口对像.")
Exit
EndIf
$hWnd=ControlGetHandle($Win,"","[id:1032]");;,[id:1032]控件句柄
Local $sItem
$hStart = _GUICtrlTreeView_GetFirstItem($hWnd)
MsgBox(0,"","全部取消 .")
$fCheck = False
While $hStart <> 0x00000000
_GUICtrlTreeView_SetChecked($hWnd,$hStart,$fCheck)
$hStart = _GUICtrlTreeView_GetNext($hWnd, $hStart)
WEnd
MsgBox(0,"","全部选择.")
$hStart = _GUICtrlTreeView_GetFirstItem($hWnd)
$fCheck = True
While $hStart <> 0x00000000
_GUICtrlTreeView_SetChecked($hWnd,$hStart,$fCheck)
$hStart = _GUICtrlTreeView_GetNext($hWnd, $hStart)
WEnd
Exit
全部回答
- 1楼网友:第幾種人
- 2021-02-25 14:22
向tree控件的某节点位置发向两次如下的消息已过无效
::sendmessage(getparent(htreewnd), wm_lbuttondown, 0, (lparam)makelong(pt.y ,pt.x ));
::sendmessage(getparent(htreewnd), wm_lbuttonup, 0, (lparam)makelong(pt.y ,pt.x ));
向tree控件发送如下消息 有效果 但无法产生双击事件
::sendmessage(htreewnd,wm_lbuttondown,0,(lparam)makelong(pt.y ,pt.x ));
sleep(50);
::sendmessage(htreewnd,wm_lbuttondown,0,(lparam)makelong(pt.y ,pt.x ));
另外本人也试了nm_dblclk消息 nm_dblclk消息本人第一次用,代码如下,结果无效 不知是因为有错误 还是确实此方法无效
//以下是向tree发送一个wm_notify消息,目的是想触发双击事件 但不成
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯