]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/button.cpp
wxFileDialog cleanup, extracted common code to fldlgcmn.cpp (patch 754187)
[wxWidgets.git] / src / msw / button.cpp
index 7fcfa743d405fbc1f71d96ef249efe51339a25f6..2763c945b07dc6b5171c3e7dea6147fc51b3a494 100644 (file)
@@ -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);