WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Control Manager
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Get Enable State of Child Window

Keywords: 	cEnable 

Question:

Which function can return the state of a child window? To my understanding WinState only works with parent windows...

Answer:

I guess cEnable state will tell you if a window or control is enabled to accept input or not.

There is a way involving getting the HWND of the window, converting it to a Hex string (See WILX extender) and strcat'ting some characters in front to turn the hwnd of a control into a WinID number that then WinState can check the hidden/unhidden status on.

Something like:

winid=WInIdGet("WinBatch Studio") ; WinState likes these
hwnd=DllHwnd("WinBatch Studio") ; Control manager uses this kind
Message(winid,hwnd) ; show the two different types
;Convert
AddExtender("WILX34I.DLL")
hexnum=xBaseConvert(hwnd,10,16) ; convert to hex
hexnum=StrFixLeft(hexnum,"0",8)
hexnum=strcat("#WIN$ID#",hexnum)
Message(winid,hexnum)

Message("WinState",WinState(hexnum))



Article ID:   W12505
Filename:   Get Enable State of Child Window.txt
File Created: 2017:07:28:12:58:26
Last Updated: 2001:03:02:13:35:54