The GetDesktopWindow function returns a handle to the desktop window. The desktop window covers the entire screen. The desktop window is the area on top of which other windows are painted.
Syntax
HWND GetDesktopWindow(VOID);
Return Value
The return value is a handle to the desktop window.
Example
For an example, see Initializing a Dialog Box.
Function Information
Minimum DLL Versionuser32.dllHeaderDeclared in Winuser.h, include Windows.hImport libraryUser32.libMinimum operating systems Windows 95, Windows NT 3.1
See Also
Windows Overview, GetWindow
Friend Declare Function GetDesktopWindow Lib "user32.dll" () As Int32
<DllImport("user32.dll", CharSet:=CharSet.Auto, ExactSpelling:=True)> _Public Shared Function GetDesktopWindow() As IntPtr End Function
[DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]public static extern IntPtr GetDesktopWindow();