From 0cfe9dcb735c9f4849f959c02ac023550d5c7c6f Mon Sep 17 00:00:00 2001 From: sunjammerx Date: Fri, 6 Sep 2002 17:29:34 +0000 Subject: [PATCH] License control gets focus first -- please can someone test this :D.. the Ui.c code gets a bit hairy git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@939 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/Ui.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index ad7a0fc2..6d7bf886 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -595,8 +595,17 @@ static BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l #else ShowWindow(hwndtmp,m_page?SW_SHOWNA:SW_HIDE); #endif - EnableWindow(hwndtmp, (m_page==1&&islp) || (m_page==2&&(islp||iscp))); + EnableWindow(hwndtmp, (m_page==1&&islp) || (m_page==2&&(islp||iscp))); +//XGE 5th September 2002 - Do *not* move the focus to the OK button if we are +//on the license page, instead we want the focus left alone because in +//WM_INITDIALOG it is given to the richedit control. +#ifdef NSIS_CONFIG_LICENSEPAGE + if (m_page != 0) + SetFocus(GetDlgItem(hwndDlg,IDOK)); +#else SetFocus(GetDlgItem(hwndDlg,IDOK)); +#endif +//XGE End } } if (uMsg == WM_COMMAND) @@ -671,6 +680,10 @@ static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM dwRead=0; SendMessage(hwLicense,EM_STREAMIN,(((char*)es.dwCookie)[0]=='{')?SF_RTF:SF_TEXT,(LPARAM)&es); SetUITextFromLang(hwndDlg,IDC_INTROTEXT,g_inst_header->common.intro_text_id,LANGID_LICENSE_TEXT); + //XGE 5th September 2002 - place the initial focus in the richedit control + SetFocus(hwLicense); + return FALSE; + //End Xge } else if (uMsg == WM_NOTIFY) { ENLINK *enlink=(ENLINK *)lParam;