Solved

Updating WebBrowser control in a dialog

Posted on 1998-07-23
7
253 Views
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);
ASSERT(pWeb);
pWeb->Invalidate();
pWeb->UpdateWindow();
pWeb->Refresh();
} //OnPaint  
0
Comment
Question by:kahmed
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 23

Expert Comment

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

Author Comment

by:kahmed
ID: 1319677
yes
0
 

Author Comment

by:kahmed
ID: 1319678
Adjusted points to 45
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:NotJeff
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
perfectly.

Jeff
0
 

Author Comment

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

Accepted Solution

by:
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?
0
 

Author Comment

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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

717 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