diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index a17f29c5..3faad037 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -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);