X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eedc82f4e96c7f8f0b24addbfd6b4429c9587631..90af251453884b7dab2a353280b9061a3ac02b5e:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index c4c015a3df..6c52d71047 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -461,7 +461,12 @@ WXDWORD wxTextCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const if ( style & wxTE_DONTWRAP ) { // automatically scroll the control horizontally as necessary - msStyle |= WS_HSCROLL; + // + // NB: ES_AUTOHSCROLL is needed for richedit controls or they don't + // show horz scrollbar at all, even in spite of WS_HSCROLL, and as + // it doesn't seem to do any harm for plain edit controls, add it + // always + msStyle |= WS_HSCROLL | ES_AUTOHSCROLL; } if ( style & wxTE_READONLY ) @@ -1927,7 +1932,7 @@ bool wxTextCtrl::AcceptsFocus() const wxSize wxTextCtrl::DoGetBestSize() const { int cx, cy; - wxGetCharSize(GetHWND(), &cx, &cy, &GetFont()); + wxGetCharSize(GetHWND(), &cx, &cy, GetFont()); int wText = DEFAULT_ITEM_WIDTH;