From 6189c91047f04b7a1b52be4989cfe89dc9be0fef Mon Sep 17 00:00:00 2001 From: kichik Date: Thu, 12 Dec 2002 15:51:03 +0000 Subject: [PATCH] SetFont "MS Shell Dlg" adds the DS_SHELLFONT style git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1941 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/DialogTemplate.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Source/DialogTemplate.cpp b/Source/DialogTemplate.cpp index 7f0fa5bf..28a7f66b 100644 --- a/Source/DialogTemplate.cpp +++ b/Source/DialogTemplate.cpp @@ -251,13 +251,21 @@ void CDialogTemplate::RemoveItem(WORD wId) { // Sets the font of the dialog void CDialogTemplate::SetFont(char* szFaceName, WORD wFontSize) { - m_dwStyle &= ~DS_SHELLFONT; + if (lstrcmp(szFaceName, "MS Shell Dlg")) { + // not MS Shell Dlg + m_dwStyle &= ~DS_SHELLFONT; + m_bExtended = false; + } + else { + // MS Shell Dlg + m_dwStyle |= DS_SHELLFONT; + m_bExtended = true; + } m_dwStyle |= DS_SETFONT; if (m_szFont) delete [] m_szFont; m_szFont = new char[lstrlen(szFaceName)]; lstrcpy(m_szFont, szFaceName); m_sFontSize = wFontSize; - m_bExtended = false; } // Adds an item to the dialog