Click to Rate and Give Feedback
MSDN
MSDN Library
Windows GDI
 WindowFromDC
Windows GDI
WindowFromDC

The WindowFromDC function returns a handle to the window associated with the specified display device context (DC). Output functions that use the specified device context draw into this window.

HWND WindowFromDC(
  HDC hDC   // handle to window
);

Parameters

hDC
[in] Handle to the device context from which a handle to the associated window is to be retrieved.

Return Values

The return value is a handle to the window associated with the specified DC. If no window is associated with the specified DC, the return value is NULL.

Requirements

  Windows NT/2000/XP/Vista: Included in Windows NT 3.1 and later.
  Windows 95/98/Me: Included in Windows 95 and later.
  Header: Declared in Winuser.h; include Windows.h.
  Library: Use User32.lib.

See Also

Painting and Drawing Overview, Painting and Drawing Functions, GetDC, GetDCEx, GetWindowDC


Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker