This function returns the current hwnd that is bound to an OpenGL context. A window is current if it was the last window to be bound to an OpenGL context by calling pglMakeCurrent.
#include <pgl.h> HAB hab; HWND hwnd; hwnd = pglGetCurrentWindow(hab);