Updating WebBrowser control in a dialog

Posted on 1998-07-23
Last Modified: 2013-11-20
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);
} //OnPaint  
Question by:kahmed
LVL 23

Expert Comment

ID: 1319676
Did you call the base class OnPaint CDialog::OnPaint() in your dialog's OnPaint()?

Author Comment

ID: 1319677

Author Comment

ID: 1319678
Adjusted points to 45
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.


Expert Comment

ID: 1319679
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


Author Comment

ID: 1319680
I have 4.x version that works fine. But I need to support customers with IE 3.x. Any ideas??
LVL 15

Accepted Solution

Tommy Hui earned 50 total points
ID: 1319681
Does the control have WS_CLIPSIBLINGS on it and does the dialog have the style WS_CLIPCHILDREN?

Author Comment

ID: 1319682
No I use the default for the dialog and control

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Perl Awk Need Help 3 94
sameEnds challenge 3 107
bigDiff challenge 17 75
sum67 challenge 35 89
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now