本帖最后由 kk_lee69 于 2016-5-8 00:10 编辑
如何检测 父子窗口的 子窗 状态是 隐藏 还是显示呢??
如 下面程序代码
使用WinGetState 无法检测出 子窗的状态
求解!!
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <ListviewConstants.au3>
#Include <Constants.au3>
#include <WindowsConstants.au3>
#Include <WinAPIEx.au3>
$main_GUI = GUICreate("Tab Sample", 400, 320, -1, -1,$WS_MAXIMIZEBOX+ $WS_MINIMIZEBOX+ $WS_SIZEBOX);, BitOr($GUI_SS_DEFAULT_GUI,$WS_CLIPSIBLINGS))
$button1 = GUICtrlCreateButton("显示", 10, 270, 70, 20)
$button2 = GUICtrlCreateButton("隐藏", 100, 270, 70, 20)
$button3 = GUICtrlCreateButton("检测", 220, 270, 70, 20)
GUISetState()
$child1= GUICreate("child1", 370, 215, 15, 40, BitOr($WS_CHILD,$WS_TABSTOP), -1, $main_GUI)
GUISetBkColor(0x257788); just for dimensing the child
GUISetState()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $button1
GUISetState(@SW_SHOW, $child1)
Case $button2
GUISetState(@SW_HIDE, $child1)
Case $button3
MsgBox(0,"",BitAND(WinGetState("child1"),2))
EndSwitch
WEnd
|