The occasional error with incorrect calculation and centering of the text is in ShortDoorNote!
The old solution was about DrawText(dc,buf,lstrlen(buf),&rcC,DT_CENTER|DT_CALCRECT) This is not sufficient for longer texts (more lines) to place the text perfectly! Unfortunately I had the correct calculation of the square done by the MS Internet. The new own solution is written so that it works with multi-line, especially long texts.
1. Incorrect rectangle calculation / font size DT_CALCRECT solution! (v1.01)
(... see Image-1 Point 1)
2. Correct rectangle calculation / font size own C ++ solution! (v1.02)
(... see Image-1 Point 2)
FAQ 3: Updated on: 24 April 2020 08:28