Tao.Platform.Windows SDK Documentation

Wgl.wglGetCurrentContext Method 

The wglGetCurrentContext function obtains a handle to the current OpenGL rendering context of the calling thread.

[Visual Basic]
Public Shared Function wglGetCurrentContext() As IntPtr
[C#]
public static IntPtr wglGetCurrentContext();

Return Value

If the calling thread has a current OpenGL rendering context, wglGetCurrentContext returns a handle to that rendering context. Otherwise, the return value is Zero.

Remarks

The current OpenGL rendering context of a thread is associated with a device context by means of the wglMakeCurrent function. You can use the wglGetCurrentDC function to obtain a handle to the device context associated with the current OpenGL rendering context.

See Also

Wgl Class | Tao.Platform.Windows Namespace | wglCreateContext | wglDeleteContext | wglGetCurrentDC | wglMakeCurrent