Now always loads RichEdit2 if present
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@884 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
42cea14dde
commit
52892d7e6d
8 changed files with 20 additions and 4 deletions
|
@ -645,12 +645,22 @@ DWORD CALLBACK StreamLicense(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
|
|||
static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static HWND hwLicense;
|
||||
static HINSTANCE hRichEditDLL;
|
||||
static HINSTANCE hRichEditDLL, hRichEdit2DLL;
|
||||
static int new_richedit;
|
||||
if (!hRichEdit2DLL) hRichEdit2DLL=LoadLibrary("RichEd20.dll");
|
||||
if (!hRichEditDLL) hRichEditDLL=LoadLibrary("RichEd32.dll");
|
||||
if (!hRichEdit2DLL) {
|
||||
// fake richedit2
|
||||
WNDCLASS phony_richedit2 = {0,};
|
||||
phony_richedit2.lpszClassName = "RichEdit20A";
|
||||
RegisterClass(&phony_richedit2);
|
||||
}
|
||||
else new_richedit=10; // edit2 is 1010 while edit1 is 1000
|
||||
if (uMsg == WM_INITDIALOG)
|
||||
{
|
||||
EDITSTREAM es={(DWORD)STR(LANG_LICENSE_DATA),0,StreamLicense};
|
||||
hwLicense=GetDlgItem(hwndDlg,IDC_EDIT1);
|
||||
hwLicense=GetDlgItem(hwndDlg,IDC_EDIT1+new_richedit);
|
||||
ShowWindow(hwLicense, SW_SHOW);
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue