]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxSetCCUnicodeFormat() and use it in wxTreeCtrl/wxToolBar; also replaced SendMe...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 20 Mar 2004 12:39:04 +0000 (12:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 20 Mar 2004 12:39:04 +0000 (12:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/wrapcctl.h
src/msw/listctrl.cpp
src/msw/tbar95.cpp
src/msw/treectrl.cpp

index fb26166ee09b0217dd0eb5445e50fb2242ed436a..188377baca51e68b11b98502bb58532e1f99377d 100644 (file)
 // define things which might be missing from our commctrl.h
 #include "wx/msw/missing.h"
 
+// Set Unicode format for a common control
+inline void wxSetCCUnicodeFormat(HWND hwnd)
+{
+    SendMessage(hwnd, CCM_SETUNICODEFORMAT,
+#if wxUSE_UNICODE
+                TRUE
+#else
+                FALSE
+#endif
+                , 0);
+}
+
 #endif // _WX_MSW_WRAPCCTL_H_
 
index d0e958ffc37f0fbc57b8a6d1c2d88f7ae6dbc0f3..693df7dc4f98ae2466eda4781211d142babe35a2 100644 (file)
@@ -353,9 +353,7 @@ bool wxListCtrl::Create(wxWindow *parent,
 
     // explicitly say that we want to use Unicode because otherwise we get ANSI
     // versions of _some_ messages (notably LVN_GETDISPINFOA) in MSLU build
-#if wxUSE_UNICODE
-    ::SendMessage(GetHwnd(), LVM_SETUNICODEFORMAT, TRUE, 0);
-#endif
+    wxSetCCUnicodeFormat(GetHwnd());
 
     // for comctl32.dll v 4.70+ we want to have this attribute because it's
     // prettier (and also because wxGTK does it like this)
index d782709dd225f66c6fd801265ea2ddfd6b030365..ab987ad5a3ada3913228200f0a90aa9b2dee17a0 100644 (file)
@@ -240,6 +240,8 @@ bool wxToolBar::Create(wxWindow *parent,
     if ( !MSWCreateToolbar(pos, size) )
         return FALSE;
 
+    wxSetCCUnicodeFormat(GetHwnd());
+
     // set up the colors and fonts
     SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_MENUBAR));
     SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
index 56ac64cba65466ab2ee7060ac028e4d2e43a8941..cd18d9d3f370563c432e2365414da14953b268a9 100644 (file)
@@ -757,6 +757,8 @@ bool wxTreeCtrl::Create(wxWindow *parent,
 
     SetSize(pos.x, pos.y, size.x, size.y);
 
+    wxSetCCUnicodeFormat(GetHwnd());
+
     return true;
 }