You should be able to get the hwnd and such by wrapping a call to Graphics(), e.g.,
?Win32
Const HDC_OFF% = 7
Const HWND_OFF% = 8
Const HGLRC_OFF% = 9
Function InitGraphics:TGraphics( width%, height%, depth%=0, hertz%=60, flags%=0 )
Local gfx:TGLGraphics=TGLGraphics(GLGraphics(width, height, depth, hertz, flags))
Local data:Int Ptr = Int Ptr(gfx._context)
Print "HDC: "+data[HDC_OFF]
Print "HWND: "+data[HWND_OFF]
Return gfx
End Function
? Bearing in mind that this is untested since I'm not under Windows. Either way, work-arounds will have to do, since there likely will not be direct access to it, since the point is to keep that all abstracted away from the user.
It may be worth it to simply write your own TGraphics/TGraphicsDriver types instead. It's not very complex, just takes a bit more time.
|