ProgramWhen the chtmlview class is used to implement browser functions, an exception warning will be output in the window when the window size is adjusted. For example, my warning is as follows:
Warning: constructing coleexception, scode = disp_e_membernotfound ($80020003 ).
The most likely exception at 0x7c80bef7 in htmltest.exe: Microsoft C ++ exception: the coleexception at the memory position 0x0012de68.
Warning: constructing coleexception, scode = disp_e_membernotfound ($80020003 ).
The most likely exception at 0x7c80bef7 in htmltest.exe: Microsoft C ++ exception: the coleexception at the memory position 0x0012de68.
This is because chtmlview processes the wm_size message. After rewriting the wm_size message, the problem can be solved as follows:
Void cmylogshview: onsize (uint ntype, int CX, int CY)
{
Cformview: onsize (ntype, CX, CY); // note that cformview must be used here
// Todo: Add a message processing program hereCode
If (: iswindow (m_wndbrowser.m_hwnd ))
{
Crect rect;
Getclientrect (rect );
: Adjustwindowrectex (rect, getstyle (), false, ws_ex_clientedge );
M_wndbrowser.setwindowpos (null,
Rect. Left,
Rect. Top,
Rect. Width (),
Rect. Height (),
Swp_noactivate | swp_nozorder );
}
}