X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..d515343ca219891dd20ebdf0d52246530be9f6fb:/src/msw/fontdlg.cpp diff --git a/src/msw/fontdlg.cpp b/src/msw/fontdlg.cpp index c489e93c64..75fcd09d38 100644 --- a/src/msw/fontdlg.cpp +++ b/src/msw/fontdlg.cpp @@ -5,7 +5,7 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem +// Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -38,8 +38,9 @@ #include "wx/fontdlg.h" -#if !defined(__WIN32__) || defined(__SALFORDC__) || defined(__WXWINE__) - #include +#if !defined(__WIN32__) || defined(__SALFORDC__) +#include +#include #endif #include "wx/msw/private.h" @@ -64,27 +65,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) // wxFontDialog // ---------------------------------------------------------------------------- -wxFontDialog::wxFontDialog() -{ - m_parent = NULL; -} - -wxFontDialog::wxFontDialog(wxWindow *parent, wxFontData *data) -{ - Create(parent, data); -} - -bool wxFontDialog::Create(wxWindow *parent, wxFontData *data) -{ - m_parent = parent; - - wxCHECK_MSG( data, FALSE, _T("no font data in wxFontDialog") ); - - m_fontData = *data; - - return TRUE; -} - int wxFontDialog::ShowModal() { DWORD flags = CF_SCREENFONTS | CF_NOSIMULATIONS; @@ -105,7 +85,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() )