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:
kichik 2002-09-03 11:25:47 +00:00
parent 42cea14dde
commit 52892d7e6d
8 changed files with 20 additions and 4 deletions

View file

@ -28,6 +28,7 @@
#define IDC_CHECK1 1008
#define IDC_MJF 1008
#define IDC_VERSION 1009
#define IDC_EDIT2 1010
#define IDC_DIRCAPTION 1011
#define IDC_STATUSTEXT 1014
#define IDC_LICTEXT 1015

View file

@ -59,7 +59,9 @@ BEGIN
ICON IDI_ICON2,IDC_ULICON,0,0,20,20
LTEXT "",IDC_INTROTEXT,25,0,241,23
CONTROL "",IDC_EDIT1,"RICHEDIT",ES_MULTILINE | ES_READONLY |
WS_BORDER | WS_VSCROLL,0,24,266,105
WS_BORDER | WS_VSCROLL | NOT WS_VISIBLE,0,24,266,105
CONTROL "",IDC_EDIT2,"RichEdit20A",ES_MULTILINE | ES_READONLY |
WS_BORDER | WS_VSCROLL | NOT WS_VISIBLE,0,24,266,105
END
IDD_DIR DIALOG DISCARDABLE 0, 0, 266, 130

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -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);

View file

@ -28,6 +28,7 @@
#define IDC_CHECK1 1008
#define IDC_MJF 1008
#define IDC_VERSION 1009
#define IDC_EDIT2 1010
#define IDC_DIRCAPTION 1011
#define IDC_STATUSTEXT 1014
#define IDC_LICTEXT 1015

View file

@ -38,7 +38,9 @@ BEGIN
ICON IDI_ICON2,IDC_ULICON,0,0,20,20
LTEXT "",IDC_INTROTEXT,25,0,241,23
CONTROL "",IDC_EDIT1,"RICHEDIT",ES_MULTILINE | ES_READONLY |
WS_BORDER | WS_VSCROLL,0,24,266,105
WS_BORDER | WS_VSCROLL | NOT WS_VISIBLE,0,24,266,105
CONTROL "",IDC_EDIT2,"RichEdit20A",ES_MULTILINE | ES_READONLY |
WS_BORDER | WS_VSCROLL | NOT WS_VISIBLE,0,24,266,105
END
#endif