BOOL GetParentClientRect(HWND hWnd,LPRECT lprect)
{
POINT pos = {0};

GetWindowRect(hWnd, lprect);
ClientToScreen(GetParent(hWnd), &pos);
OffsetRect(lprect, -pos.x, -pos.y);
return TRUE;
}