From 7fff086d9d70bea4efbcfafe31d9710d06629482 Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 14 Sep 2002 09:43:15 +0000 Subject: [PATCH] Sets the log window width before logging starts, faster, and works when calling a DLL that logs something before any other command git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1012 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/Ui.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index 33a7b1b4..4a36af1a 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -1291,7 +1291,6 @@ void NSISCALL update_status_text(const char *text1, const char *text2) { static char tmp[NSIS_MAX_STRLEN]; static LVITEM new_item = {LVIF_TEXT,0,0,0,0,tmp}; - RECT r; if (insthwnd) { if (mystrlen(text1)+mystrlen(text2) >= sizeof(tmp)) return; @@ -1302,8 +1301,6 @@ void NSISCALL update_status_text(const char *text1, const char *text2) new_item.iItem=ListView_GetItemCount(insthwnd); ListView_InsertItem(insthwnd, &new_item); ListView_EnsureVisible(insthwnd, new_item.iItem, 0); - GetClientRect(insthwnd,&r); - ListView_SetColumnWidth(insthwnd, 0, r.right-r.left); } if ((ui_st_updateflag&2)) SetWindowText(insthwnd2,tmp); } @@ -1355,6 +1352,7 @@ static BOOL CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa { if (uMsg == WM_INITDIALOG) { + RECT r; DWORD id; int num=0; int x=0; @@ -1383,6 +1381,8 @@ static BOOL CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa } // Changed by Amir Szekely 26th July 2002 ListView_InsertColumn(insthwnd, 0, &lvc); + GetClientRect(insthwnd,&r); + ListView_SetColumnWidth(insthwnd, 0, r.right-r.left); #define LVS_EX_LABELTIP 0x00004000 // listview unfolds partly hidden labels if it does not have infotip text ListView_SetExtendedListViewStyleEx(insthwnd, LVS_EX_LABELTIP, LVS_EX_LABELTIP); if (lb_bg >= 0) {