添加 $WS_CHILD 样式后,子窗的 INPUT控件无法输入,有解决的办法吗??
如果拿掉 $WS_CHILD 那就可以输入,是原本就这样吗?? 有解决的办法吗??
我觉得 父子窗口 拿掉 $WS_CHILD 这个样式后 会变得比较不稳 ,所以寻求不拿掉 $WS_CHILD 样式的解决方法
#include <GuiConstants.au3>
#include <WindowsConstants.au3>
#include <winapi.au3>
Opt("GUIOnEventMode", 1)
$WinMain = GUICreate("Main", 1000,750,-1,-1, $WS_MAXIMIZEBOX + $WS_MINIMIZEBOX + $WS_SIZEBOX)
GUISetOnEvent($GUI_EVENT_CLOSE,"GUI_COMMAND")
GUISetState(@SW_SHOW, $WinMain)
$WinMainSub=GUICreate("A視窗", 300,300, 200, 200, BitOR($WS_CHILD, $WS_CAPTION),-1, $WinMain)
_WinAPI_SetParent($WinMainSub, $WinMain)
$A=GUICtrlCreateInput("",10,10,150,20)
GUISetState(@SW_SHOW, $WinMainSub)
While 1
Sleep(20)
WEnd
Func GUI_COMMAND()
Switch @GUI_CtrlId
Case $GUI_EVENT_CLOSE
Switch @GUI_WINHANDLE
Case $WinMain
Exit
Case Else
GUIDelete(@GUI_WINHANDLE)
EndSwitch
EndSwitch
EndFunc
|