This article was previously published under Q220021
On This Page
SYMPTOMS
In an AppWizard-generated MDI application with more than two view windows overlapping each other, if the user clicks in the client area of the MDI frame window other than the view, such that the view loses the focus, and then clicks back in the client area of the view, the CHtmlView does not repaint correctly. However, if the user clicks the nonclient area of the view, the CHtmlView repaints correctly.
The WS_CLIPCHILDREN style is not set for CHtmlView, and therefore, on activating the view by clicking the view area, CHtmlView does not send a message to the embedded Web Browser control to repaint itself.
To work around this problem, in PreCreateWindow of CHtmlView, add the WS_CLIPCHILDREN style. Following is a code example:
BOOL CSampleView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
cs.style |= WS_CLIPCHILDREN;
return CHtmlView::PreCreateWindow(cs);
}
Contact Microsoft Phone Numbers, Support Options and Pricing, Online Help, and more.
Customer Service For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
Newsgroups Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.