Blitz3D Window HWND

Blitz3D Forums/Blitz3D Programming/Blitz3D Window HWND

dirkduck(Posted 2003) [#1]
Hey everyone. Does anyone know how to, through a DLL (I don't think it can be done without one?), get the hwnd of the Blitz3D main window? Thanks.


soja(Posted 2003) [#2]
Assuming it's B3D (that only runs when it's in the foreground), this userlib declaration should work:

.lib "user32.dll"
u32_GetForegroundWindow%():"GetForegroundWindow"

There are other (perhaps more exact) ways, of course, using functions in user32.dll, but that was just one off the top of my head.


dirkduck(Posted 2003) [#3]
Thanks, that seems to do it!


JaviCervera(Posted 2003) [#4]
.lib "user32.dll"
FindWindow%(class$,name$):"FindWindowA"

The class$ parameter must be "Blitz Runtime Class", and name$ is the title of the window.