The WindowFromDC function returns the handle of the window associated with the given display device context (DC). Output functions that use the given device context draw into this window.
HWND WindowFromDC(
HDC hDC |
// handle of window |
); |
The return value is the handle of the window associated with the given DC. If no window is associated with the given DC, the return value is NULL.