From 8be4c6a45df1d8890eef7881adaf782f8c68fdbf Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 14 Jan 2006 15:55:37 +0000 Subject: [PATCH] size optimization git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4482 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/Ui.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index 48c77eb8..67b816e7 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -699,6 +699,11 @@ skipPage: #ifdef NSIS_CONFIG_LICENSEPAGE +static void NSISCALL LoadAndSetCursor(LPCTSTR lpCursorName) +{ + SetCursor(LoadCursor(0, lpCursorName)); +} + #define _RICHEDIT_VER 0x0200 #include #undef _RICHEDIT_VER @@ -772,13 +777,13 @@ static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM }; if (tr.chrg.cpMax-tr.chrg.cpMin < sizeof(ps_tmpbuf)) { SendMessage(hwLicense,EM_GETTEXTRANGE,0,(LPARAM)&tr); - SetCursor(LoadCursor(0,IDC_WAIT)); + LoadAndSetCursor(IDC_WAIT); ShellExecute(hwndDlg,"open",tr.lpstrText,NULL,NULL,SW_SHOWNORMAL); - SetCursor(LoadCursor(0,IDC_ARROW)); + LoadAndSetCursor(IDC_ARROW); } } if (enlink->msg==WM_SETCURSOR) { - SetCursor(LoadCursor(0,IDC_HAND)); + LoadAndSetCursor(IDC_HAND); } } //Ximon Eighteen 8th September 2002 Capture return key presses in the rich