How do I do this in Max2D when initialized with the Graphics command?
Getting windows handle of main window
BlitzMax Forums/BlitzMax Programming/Getting windows handle of main window I got an almost working video capture module :)
Method 1 (Can sometimes fail if other window is active):
Graphics 640, 480, 0, 60 Local hWnd:Int = GetActiveWindow()Method 2 (Direct3D Only)
Graphics 640, 480, 0, 60 Local hWnd:Int = Primarydevice.hwndMethod 3 (Error proof)
Graphics 640, 480, 0, 60 If cfgRenderer = 1 Then ' OpenGL tmpClass$ = "BBGLContext Window Class" ElseIf cfgRenderer = 2 Then ' Direct3D tmpClass$ = "BBDX7Device Window Class" EndIf Local hWnd% = FindWindow(tmpClass$, "BlitzMax Application")