X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/01dba85a7fc9a1103f866c7c3a5cc72f21c0784e..449d48f9e15e1430805aed3b33e55000754ad926:/src/msw/fontdlg.cpp diff --git a/src/msw/fontdlg.cpp b/src/msw/fontdlg.cpp index 972f0e4534..b15e0adcbd 100644 --- a/src/msw/fontdlg.cpp +++ b/src/msw/fontdlg.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: fontdlg.cpp +// Name: src/msw/fontdlg.cpp // Purpose: wxFontDialog class // Author: Julian Smart // Modified by: @@ -28,6 +28,8 @@ #pragma hdrstop #endif +#if wxUSE_FONTDLG + #ifndef WX_PRECOMP #include "wx/defs.h" #include "wx/utils.h" @@ -52,9 +54,7 @@ // wxWin macros // ---------------------------------------------------------------------------- -#if !USE_SHARED_LIBRARY - IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) -#endif +IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) // ============================================================================ // implementation @@ -105,7 +105,13 @@ int wxFontDialog::ShowModal() wxFillLogFont(&logFont, &m_fontData.initialFont); } - chooseFontStruct.rgbColors = wxColourToRGB(m_fontData.fontColour); + if ( m_fontData.fontColour.Ok() ) + { + chooseFontStruct.rgbColors = wxColourToRGB(m_fontData.fontColour); + + // need this for the colour to be taken into account + flags |= CF_EFFECTS; + } // CF_ANSIONLY flag is obsolete for Win32 if ( !m_fontData.GetAllowSymbols() ) @@ -158,3 +164,5 @@ int wxFontDialog::ShowModal() return wxID_CANCEL; } } + +#endif // wxUSE_FONTDLG