From 3ebe1d6d6179c5e6071d81b12b2c0a3fd5cfc5d5 Mon Sep 17 00:00:00 2001 From: kichik Date: Tue, 3 Apr 2007 10:57:17 +0000 Subject: [PATCH] applied patch #1683186 - [InstallOptions] support for linebreaks in link control git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5035 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/InstallOptions/InstallerOptions.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Contrib/InstallOptions/InstallerOptions.cpp b/Contrib/InstallOptions/InstallerOptions.cpp index b20092fb..036b0b38 100644 --- a/Contrib/InstallOptions/InstallerOptions.cpp +++ b/Contrib/InstallOptions/InstallerOptions.cpp @@ -526,7 +526,7 @@ int WINAPI ReadSettings(void) { // Label Text - convert newline pField->pszText = myGetProfileStringDup("TEXT"); - if (pField->nType == FIELD_LABEL) + if (pField->nType == FIELD_LABEL || pField->nType == FIELD_LINK) ConvertNewLines(pField->pszText); // Dir request - root folder @@ -766,7 +766,7 @@ BOOL CALLBACK cfgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) RECT rc = lpdis->rcItem; // Calculate needed size of the control - DrawText(lpdis->hDC, pField->pszText, -1, &rc, DT_VCENTER | DT_SINGLELINE | DT_CALCRECT); + DrawText(lpdis->hDC, pField->pszText, -1, &rc, DT_VCENTER | DT_WORDBREAK | DT_CALCRECT); // Make some more room so the focus rect won't cut letters off rc.right = min(rc.right + 2, lpdis->rcItem.right); @@ -785,7 +785,7 @@ BOOL CALLBACK cfgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) SetTextColor(lpdis->hDC, (COLORREF) pField->hImage); // Draw the text - DrawText(lpdis->hDC, pField->pszText, -1, &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE | (bRTL ? DT_RTLREADING : 0)); + DrawText(lpdis->hDC, pField->pszText, -1, &rc, DT_CENTER | DT_VCENTER | DT_WORDBREAK | (bRTL ? DT_RTLREADING : 0)); } // Draw the focus rect if needed