::GetSystemMetrics (SM_CYBORDER)
...comes back with 1 and I know the title bar is taller than ONE pixel :/
I also tried:
RECT r;
r.left = r.top = 0; r.right = r.bottom = 400;
::AdjustWindowRect (& r, WS_OVERLAPPED, FALSE);
_bdW = (uword)(r.right - r.left - 400);
_bdH = (uword)(r.bottom - r.top - 400);
But border w,h came back as 0.
In my WM_SIZE handler, I need to make sure the window's height changes in
"steps" so, for example a whole new line of text could fit in the window
with no "junky partial line space" at the bottom.
But ::MoveWindow needs the dimensions WITH the border space added in.
SOMEbody must have done this before...
Thanks for any help :)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…