]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/button.cpp
ensure that we don't get stuck in modal loop forever (part of patch 649438)
[wxWidgets.git] / src / msw / button.cpp
index 98b2176f602297500919d6accafb71f53f57f823..2763c945b07dc6b5171c3e7dea6147fc51b3a494 100644 (file)
@@ -415,8 +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 | DT_SINGLELINE);
+    // 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);