I have a class that is derived from CHTMLView and everything works fine except if I try closing the View. In my code : SendMessage(WM_CLOSE, 0, 0); This closes the window and destroys it, but Then I get the error message: Unhandled Exception in myProgram.exe (SHLWAPI.DLL) at 0xC0000005 Am i closing the window correctly? Thanks in advance