detect open window

BlitzMax Forums/BlitzMax Programming/detect open window

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.

hWnd = FindWindow(ClassName$z, Title$z)
Extern "win32"
	Function FindWindow(lpClassName$z, lpWindowName$z) = "FindWindowA@8"
End Extern

AppTitle = "Find Me"
Graphics 320, 240, 0, 60

hWnd = FindWindow("BBDX7Device Window Class", "Find Me")

If Not hWnd Then Notify "Window not found"
(Windows)
Leave the ClassName param null if you want to return any window named "Find Me", regardless of class.