free riched32.dll outside of the wndproc
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5099 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
7d1f948631
commit
c72c1d9520
1 changed files with 3 additions and 3 deletions
|
@ -47,6 +47,8 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, char *cmdParam, int cmd
|
||||||
g_sdata.sigint_event = CreateEvent(NULL, FALSE, FALSE, "makensis win32 signint event");
|
g_sdata.sigint_event = CreateEvent(NULL, FALSE, FALSE, "makensis win32 signint event");
|
||||||
RestoreSymbols();
|
RestoreSymbols();
|
||||||
|
|
||||||
|
HINSTANCE hRichEditDLL = LoadLibrary("RichEd32.dll");
|
||||||
|
|
||||||
if (!InitBranding()) {
|
if (!InitBranding()) {
|
||||||
MessageBox(0,NSISERROR,"Error",MB_ICONEXCLAMATION|MB_OK);
|
MessageBox(0,NSISERROR,"Error",MB_ICONEXCLAMATION|MB_OK);
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -72,6 +74,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, char *cmdParam, int cmd
|
||||||
if (g_sdata.script) GlobalFree(g_sdata.script);
|
if (g_sdata.script) GlobalFree(g_sdata.script);
|
||||||
if (g_sdata.script_cmd_args) GlobalFree(g_sdata.script_cmd_args);
|
if (g_sdata.script_cmd_args) GlobalFree(g_sdata.script_cmd_args);
|
||||||
if (g_sdata.sigint_event) CloseHandle(g_sdata.sigint_event);
|
if (g_sdata.sigint_event) CloseHandle(g_sdata.sigint_event);
|
||||||
|
FreeLibrary(hRichEditDLL);
|
||||||
FinalizeUpdate();
|
FinalizeUpdate();
|
||||||
ExitProcess(msg.wParam);
|
ExitProcess(msg.wParam);
|
||||||
return msg.wParam;
|
return msg.wParam;
|
||||||
|
@ -160,8 +163,6 @@ void ProcessCommandLine()
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
||||||
static HINSTANCE hRichEditDLL = 0;
|
|
||||||
if (!hRichEditDLL) hRichEditDLL= LoadLibrary("RichEd32.dll");
|
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
|
@ -226,7 +227,6 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
||||||
ImageList_Destroy(g_toolbar.imagelistd);
|
ImageList_Destroy(g_toolbar.imagelistd);
|
||||||
ImageList_Destroy(g_toolbar.imagelisth);
|
ImageList_Destroy(g_toolbar.imagelisth);
|
||||||
DestroyTooltips();
|
DestroyTooltips();
|
||||||
FreeLibrary(hRichEditDLL);
|
|
||||||
PostQuitMessage(0);
|
PostQuitMessage(0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue