X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0fa939c29a42e6229e288455e5eea8249d888bd7..c15d9c859c64f28c56d1e61b7d031a74e6018583:/src/msw/button.cpp diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 7fcfa743d4..2763c945b0 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -415,7 +415,8 @@ static void DrawButtonText(HDC hdc, COLORREF colOld = SetTextColor(hdc, col); int modeOld = SetBkMode(hdc, TRANSPARENT); - ::DrawText(hdc, text, text.length(), pRect, DT_CENTER | DT_VCENTER); + // Note: we must have DT_SINGLELINE for DT_VCENTER to work. + ::DrawText(hdc, text, text.length(), pRect, DT_SINGLELINE | DT_CENTER | DT_VCENTER); SetBkMode(hdc, modeOld); SetTextColor(hdc, colOld);