Fix for bug whereby owner-drawn buttons didn't draw multiline labels correctly

Backported from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-04-06 16:23:09 +00:00
parent a5243c0dbe
commit 846173c976
2 changed files with 2 additions and 2 deletions

View File

@@ -215,6 +215,7 @@ wxMSW:
- use ES_DISABLENOSCROLL to work around the vertical scrollbar bug in - use ES_DISABLENOSCROLL to work around the vertical scrollbar bug in
wxTE_RICH2 text control wxTE_RICH2 text control
- fixes for wxLocale::Init and Borland C++ - fixes for wxLocale::Init and Borland C++
- Fix for bug whereby owner-drawn buttons didn't draw multiline labels correctly
wxMotif: wxMotif:

View File

@@ -415,8 +415,7 @@ static void DrawButtonText(HDC hdc,
COLORREF colOld = SetTextColor(hdc, col); COLORREF colOld = SetTextColor(hdc, col);
int modeOld = SetBkMode(hdc, TRANSPARENT); int modeOld = SetBkMode(hdc, TRANSPARENT);
DrawText(hdc, text, text.length(), pRect, ::DrawText(hdc, text, text.length(), pRect, DT_CENTER | DT_VCENTER);
DT_CENTER | DT_VCENTER | DT_SINGLELINE);
SetBkMode(hdc, modeOld); SetBkMode(hdc, modeOld);
SetTextColor(hdc, colOld); SetTextColor(hdc, colOld);