Article ID: 179421
Article Last Modified on 8/18/2005
// CMyFormView is derived from CFormView.
// m_browser is a CWnd-derived class that wraps the webbrowser control.
void CMyFormView::OnSize(UINT nType, int cx, int cy)
{
CFormView::OnSize(nType, cx, cy);
// Ensure m_browser has valid HWND before doing anything
if ( m_browser.GetSafeHwnd() )
{
// Resize WebBrowser control to fill the client area
m_browser.MoveWindow(0, 0, cx, cy);
// Force processing of WM_PAINT
m_browser.UpdateWindow();
}
}
Additional query words: web browser shdocvw.dll
Keywords: kbbug kbfix KB179421