wglGetCurrentDC function
Applies to: desktop apps only
The wglGetCurrentDC function obtains a handle to the device context that is associated with the current OpenGL rendering context of the calling thread.
Syntax
HDC WINAPI wglGetCurrentDC(void);
Parameters
This function has no parameters.
Return value
If the calling thread has a current OpenGL rendering context, the function returns a handle to the device context associated with that rendering context by means of the wglMakeCurrent function. Otherwise, the return value is NULL.
Remarks
You associate a device context with an OpenGL rendering context when it calls the wglMakeCurrent function. You can use the wglGetCurrentContext function to obtain a handle to the calling thread's current OpenGL rendering context.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- OpenGL on Windows
- WGL Functions
- wglCreateContext
- wglDeleteContext
- wglGetCurrentContext
- wglMakeCurrent
Send comments about this topic to Microsoft
Build date: 3/6/2012