[bb] GadgetEnabled() by sswift [ 1+ years ago ]

Started by BlitzBot, June 29, 2017, 00:28:38

Previous topic - Next topic

BlitzBot

Title : GadgetEnabled()
Author : sswift
Posted : 1+ years ago

Description : Tells you if a gadget or window is currently enabled.

Code :
Code (blitzbasic) Select
; -----------------------------------------------------------------------------------------------------------------------------------
; To use this function, place the following in the file "user32.decls" in your userlibs folder:
;
; .lib "user32.dll"
; IsWindowEnabled%(hWnd%):"IsWindowEnabled"
; -----------------------------------------------------------------------------------------------------------------------------------


; -----------------------------------------------------------------------------------------------------------------------------------
; This function returns true if the specified gadget is enabled.
; -----------------------------------------------------------------------------------------------------------------------------------
Function GadgetEnabled(Gadget)

Local HWnd

; Get a windows pointer to the gadget.
HWnd = QueryObject(Gadget, 1)

; Is the gadget enabled?
Return IsWindowEnabled(HWnd)

End Function


Comments :


danielos(Posted 1+ years ago)

 exactly what I was searching for, thanks! :-)