From 2e771cb838a8d22a73d5316e9fecde25ede316a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 8 Mar 2008 23:04:06 +0000 Subject: [PATCH] fixed 'Select All' context menu in wxTextCtrl with wxTE_RICH style git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/textctrl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index f20fd9c970..c8173d7fc7 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -1305,6 +1305,13 @@ void wxTextCtrl::DoSetSelection(long from, long to, int flags) #if wxUSE_RICHEDIT if ( IsRich() ) { + // if from and to are both -1, it means (in wxWidgets) that all text + // should be selected, translate this into Windows convention + if ( (from == -1) && (to == -1) ) + { + from = 0; + } + CHARRANGE range; range.cpMin = from; range.cpMax = to; -- 2.45.2