y += GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYBORDER); x += 2 * GetSystemMetrics(SM_CXBORDER);