• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 258
  • Last Modified:

Updating WebBrowser control in a dialog

I have a dialog application with IE webbrowser control 3.02.
I can navigate, refresh,...etc.
The problem is whenever My dialog is minimized or covered by other windows, the browser control is not re-painted when my dialog gets the focus or maximized. I get grey color in the control space.

That means my dialog's OnPaint() is updating all controls execpt webbrowser. Does any one know why and how to force my webbrowser control to be updated when the dialig gets the focus?

Here is the code I added to the end of OnPaint() and did not work (I have the problem with ond without adding that code):

.............
..............
CWebBrowser* pWeb = (CWebBrowser*)GetDlgItem(IDC_EXPLORER1);
ASSERT(pWeb);
pWeb->Invalidate();
pWeb->UpdateWindow();
pWeb->Refresh();
} //OnPaint  
0
kahmed
Asked:
kahmed
1 Solution
 
chensuCommented:
Did you call the base class OnPaint CDialog::OnPaint() in your dialog's OnPaint()?
0
 
kahmedAuthor Commented:
yes
0
 
kahmedAuthor Commented:
Adjusted points to 45
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
NotJeffCommented:
Is it possible for you to update to IE 4.0+?   I was having the same problems you were along with some others.  I tried fixing them like you, but it just wouldn't work.  I
installed IE 4.0 and readded the control to my project and everything worked
perfectly.

Jeff
0
 
kahmedAuthor Commented:
I have 4.x version that works fine. But I need to support customers with IE 3.x. Any ideas??
0
 
Tommy HuiCommented:
Does the control have WS_CLIPSIBLINGS on it and does the dialog have the style WS_CLIPCHILDREN?
0
 
kahmedAuthor Commented:
No I use the default for the dialog and control
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now