Ooops
November 25, 2020, 05:14:59 AM

Author Topic: [bb] GadgetEnabled() by sswift [ 1+ years ago ]  (Read 556 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] GadgetEnabled() by sswift [ 1+ years ago ]
« on: June 29, 2017, 12:28:38 AM »
Title : GadgetEnabled()
Author : sswift
Posted : 1+ years ago

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

Code :
Code: BlitzBasic
  1. ; -----------------------------------------------------------------------------------------------------------------------------------
  2. ; To use this function, place the following in the file "user32.decls" in your userlibs folder:
  3. ;
  4. ;       .lib "user32.dll"
  5. ;       IsWindowEnabled%(hWnd%):"IsWindowEnabled"
  6. ; -----------------------------------------------------------------------------------------------------------------------------------
  7.  
  8.  
  9. ; -----------------------------------------------------------------------------------------------------------------------------------
  10. ; This function returns true if the specified gadget is enabled.
  11. ; -----------------------------------------------------------------------------------------------------------------------------------
  12. Function GadgetEnabled(Gadget)
  13.  
  14.         Local HWnd
  15.  
  16.         ; Get a windows pointer to the gadget.
  17.                 HWnd = QueryObject(Gadget, 1)
  18.                
  19.         ; Is the gadget enabled?
  20.                 Return IsWindowEnabled(HWnd)
  21.                
  22. End Function


Comments :


danielos(Posted 1+ years ago)

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


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal