?
Solved

Updating WebBrowser control in a dialog

Posted on 1998-07-23
7
Medium Priority
?
255 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 100 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

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month12 days, 21 hours left to enroll

777 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