// 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_
// 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)
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));
SetSize(pos.x, pos.y, size.x, size.y);
+ wxSetCCUnicodeFormat(GetHwnd());
+
return true;
}