Prev Next

WindowFromDC info  Overview  Group

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

   );

Parameters

hDC
Identifies the device context from which a handle for the associated window is to be retrieved.

Return Values

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.

See Also

GetDC, GetDCEx, GetWindowDC