isGadget(gadget)

BlitzPlus Forums/BlitzPlus Programming/isGadget(gadget)

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

use FindWindow.

decls
API_FindWindow%(lpClassName%,lpWindowName$):"FindWindowA"
API_IsWindow%(hwnd%):"IsWindow"


blitz+ code
window_test = CreateWindow("Test Window - Default (15)",0,500,400,100,0)

Notify isWindow("Test Window - Default (15)")

; wait until the user closes one of the windows
Repeat
	If WaitEvent()=$803 Then Exit
Forever
End ; bye!

Function isWindow(window_title$)

hwnd = API_FindWindow(0,window_title$)
Return API_IsWindow(hwnd)

End Function