GetWindowRect This function retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen. BOOL GetWindowRect( HWND hWnd, LPRECT lpRect );
LPRECT lpRect
);
This function retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen. BOOL GetWindowRect(
HWND hWnd,
LPRECT lpRect );
if (NULL != hwnd)
{
CRect rect;
::GetWindowRect(hWnd, rect); //rect中的top.left.right.bottom中保存的就是MSN窗口的位置和大小信息
}