winhlp32: Restore the original window proc for the richedit control before freeing the winhelp window memory.

This commit is contained in:
Rob Shearman 2009-11-08 14:07:50 +01:00 committed by Alexandre Julliard
parent b960b967c9
commit dd4804c413
1 changed files with 5 additions and 0 deletions

View File

@ -541,6 +541,7 @@ static void WINHELP_DeleteWindow(WINHELP_WINDOW* win)
{ {
WINHELP_WINDOW** w; WINHELP_WINDOW** w;
BOOL bExit; BOOL bExit;
HWND hTextWnd;
for (w = &Globals.win_list; *w; w = &(*w)->next) for (w = &Globals.win_list; *w; w = &(*w)->next)
{ {
@ -562,6 +563,10 @@ static void WINHELP_DeleteWindow(WINHELP_WINDOW* win)
if (win == Globals.active_popup) if (win == Globals.active_popup)
Globals.active_popup = NULL; Globals.active_popup = NULL;
hTextWnd = GetDlgItem(win->hMainWnd, CTL_ID_TEXT);
SetWindowLongPtr(hTextWnd, GWLP_WNDPROC,
(LONG_PTR)win->origRicheditWndProc);
WINHELP_DeleteButtons(win); WINHELP_DeleteButtons(win);
if (win->page) WINHELP_DeletePageLinks(win->page); if (win->page) WINHELP_DeletePageLinks(win->page);