int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME);
In fact, the above result might be equal to:
GetClientRect(hWnd, &rcClient);
GetWindowRect(hWnd, &rcWind);
int border_thickness = ((rcWind.right - rcWind.left) - rcClient.right) / 2;
but GetSystemMetrics(SM_CXSIZEFRAME)
is easier to be used.