::GetSystemMetrics (SM_CYBORDER)
...comes back with 1 and I know the title bar is taller than ONE pixel :/
I also tried:
RECT r;
You have another solution... You can pre calculate the border by calling a dedicated function while in WM_CREATE and WM_INITDIALOG messages. And refresh the values when you change your window style or when menu split in two rows.
RECT cRect, wRect, oRect;
GetWindowRect(hWnd, &wRect);
GetClientRect(hWnd, &cRect);
MapWindowPoints(hWnd, NULL, (LPPOINT)&cRect, 2);
oRect.left = cRect.left - wRect.left;
oRect.top = cRect.top - wRect.top;
oRect.right = wRect.right - cRect.right;
oRect.bottom = wRect.bottom - cRect.bottom;