Fix confusion with LOGFONT{A,W} parameters to MSW GetTheme[Sys]Font().
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 30 Oct 2010 23:50:22 +0000 (23:50 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 30 Oct 2010 23:50:22 +0000 (23:50 +0000)
commit3120eccfe2b3f02207c4d14f14f76dfd319db309
tree9df7614a4bdd711052fa8ee4427b5c0b0f3cc18e
parentabaa31e7eab9de0b7d8d279602e809ebae7c3cad
Fix confusion with LOGFONT{A,W} parameters to MSW GetTheme[Sys]Font().

Change the signature of GetThemeFont() and GetThemeSysFont() methods of
wxUxThemeEngine to take an artificial wxUxThemeFont::Ptr type instead of
LOGFONT which allows the broken code to compile correctly and even work in
Unicode builds but crashed in ANSI ones under Windows Vista/7 as these
functions expect a LOGFONTW and not LOGFONTA even in non-Unicode build under
these systems.

This generalizes the previous fix/workaround for the same problem in
wxStaticBox so remove it now and use wxUxThemeFont both there and in
wxMenuItem to avoid crashes when using owner-drawn menus in ANSI build.

Closes #12364.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/msw/uxtheme.h
src/msw/menuitem.cpp
src/msw/statbox.cpp