GetWindow
The GetWindow function retrieves a handle to a window that has the specified relationship (Z order or owner) to the specified window.
HWND GetWindow(
HWND hWnd, // handle to original window
UINT uCmd // relationship flag
);
GetDesktopWindow
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 all icons and other windows are painted.
HWND GetDesktopWindow(VOID)
注释:GetDesktopWindow该函数返回桌面窗口的句柄;GetWindow该函数返回与指定窗口有特定关系(如Z序或所有者)的窗口句柄。
该特定的关系是通过UINT uCmd 值体现的.
下面来解释一下什么叫桌面窗口的句柄:桌面也是个窗口,成为桌面窗口,它是由windows操作系统创建的和管理的.