Solved

Updating WebBrowser control in a dialog

Posted on 1998-07-23
7
248 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
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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 51
format the code in java 6 101
scoreUp challenge 14 63
wordmultiple challenge 12 140
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

792 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