Return key now works on licence page at the same time as the "give initial focus to licence text" patch :)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@955 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
3a65507878
commit
68a95feae8
1 changed files with 15 additions and 1 deletions
|
@ -673,7 +673,7 @@ static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
|
|||
hwLicense=GetDlgItem(hwndDlg,IDC_EDIT1);
|
||||
SendMessage(hwLicense,EM_AUTOURLDETECT,TRUE,0);
|
||||
SendMessage(hwLicense,EM_SETBKGNDCOLOR,0,g_inst_header->license_bg>=0?g_inst_header->license_bg:GetSysColor(COLOR_BTNFACE));
|
||||
SendMessage(hwLicense,EM_SETEVENTMASK,0,ENM_LINK);
|
||||
SendMessage(hwLicense,EM_SETEVENTMASK,0,ENM_LINK|ENM_KEYEVENTS);
|
||||
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);
|
||||
|
@ -704,6 +704,20 @@ static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
|
|||
SetCursor(LoadCursor(0,IDC_HAND));
|
||||
}
|
||||
}
|
||||
// nmhdr.code==EN_MSGFILTER but I noticed that the 3e8 value I *was*
|
||||
// getting contains the bits set by EN_MSGFILTER so I figured I'd set
|
||||
// this to & EN_MSGFILTER and pray :) Since it only works when return
|
||||
// is pressed *and* in that case both these tests pass I figure that
|
||||
// must be correct... wish it was documented somewhere gawd damnit!
|
||||
else if (((MSGFILTER*)lParam)->nmhdr.code&EN_MSGFILTER)
|
||||
{
|
||||
if (((MSGFILTER*)lParam)->msg==WM_KEYDOWN &&
|
||||
((MSGFILTER*)lParam)->wParam==VK_RETURN)
|
||||
{
|
||||
SendMessage(g_hwnd,WM_NOTIFY_OUTER_NEXT,1,0);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (uMsg == WM_CLOSE) {
|
||||
SendMessage(g_hwnd,WM_CLOSE,0,0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue