Code archives/BlitzPlus Gui/GadgetEnabled()

This code has been declared by its author to be Public Domain code.

Download source code

GadgetEnabled() by sswift2005
Tells you if a gadget or window is currently enabled.
; -----------------------------------------------------------------------------------------------------------------------------------
; 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

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


Code Archives Forum