hhctrl.ocx: Release HHInfo on WM_CLOSE message.
This commit is contained in:
parent
803cf4f40c
commit
ae9c043d87
|
@ -627,6 +627,9 @@ static LRESULT CALLBACK Help_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPA
|
||||||
break;
|
break;
|
||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
return Help_OnSize(hWnd);
|
return Help_OnSize(hWnd);
|
||||||
|
case WM_CLOSE:
|
||||||
|
ReleaseHelpViewer((HHInfo *)GetWindowLongPtrW(hWnd, GWLP_USERDATA));
|
||||||
|
return 0;
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
PostQuitMessage(0);
|
PostQuitMessage(0);
|
||||||
break;
|
break;
|
||||||
|
@ -780,6 +783,9 @@ void ReleaseHelpViewer(HHInfo *info)
|
||||||
|
|
||||||
ReleaseWebBrowser(info);
|
ReleaseWebBrowser(info);
|
||||||
|
|
||||||
|
if(info->WinType.hwndHelp)
|
||||||
|
DestroyWindow(info->WinType.hwndHelp);
|
||||||
|
|
||||||
hhctrl_free(info);
|
hhctrl_free(info);
|
||||||
OleUninitialize();
|
OleUninitialize();
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,8 +159,6 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
|
||||||
DispatchMessageW(&msg);
|
DispatchMessageW(&msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReleaseHelpViewer(info);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue