From ad7e243fbd2162b67e61436dad86b3bedee80e91 Mon Sep 17 00:00:00 2001 From: Ove Kaaven Date: Sat, 25 Mar 2000 23:12:57 +0000 Subject: [PATCH] Try to avoid sending a string through mbstowcs() when already Unicode (added #if wxUSE_UNICODE etc). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/tbar95.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index be4524a93a..a14d491a8b 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -707,6 +707,9 @@ bool wxToolBar::MSWOnNotify(int WXUNUSED(idCtrl), } else { +#if wxUSE_UNICODE + ttText->lpszText = (wxChar *)help.c_str(); +#else // VZ: I don't know why it happens, but the versions of // comctl32.dll starting from 4.70 sometimes send TTN_NEEDTEXTW // even to ANSI programs (normally, this message is supposed @@ -733,6 +736,7 @@ bool wxToolBar::MSWOnNotify(int WXUNUSED(idCtrl), dst[lenUnicode] = 0; delete [] pwz; +#endif } }