The solution uses combined power GetWindowRect()and MapWindowPoints().
GetWindowRect() , . . MapWindowPoints() , , . "" , . - "" Windows, " ". Desktop HWND_DESKTOP, WinUser.h ( Windows.h). , Win32 GetParent(). , MapWindowPoints().
RECT YourClass::GetLocalCoordinates(HWND hWnd) const
{
RECT Rect;
GetWindowRect(hWnd, &Rect);
MapWindowPoints(HWND_DESKTOP, GetParent(hWnd), (LPPOINT) &Rect, 2);
return Rect;
}
MapWindowPoints() :
int MapWindowPoints(
_In_ HWND hWndFrom,
_In_ HWND hWndTo,
_Inout_ LPPOINT lpPoints,
_In_ UINT cPoints
);
MapWindowPoints() hWndFrom hWndTo. (HWND_DESKTOP) (GetParent(hWnd)). RECT (hWnd) .