Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
The MFC(VS2008 version) modal dialog popup window over CHTMLView is causing an issue of repainting the view (CHTMLView) window.

The actual implementation is, the MFC C++ modal dialog popup window is being launched over the webpage on a button click function. The webpage is launched in the CHTMLView class and the button click function written in JavaScript of the webpage is using the ActiveX call to invoke the C++ modal dialog popup window.

The issue is, when the Dialog popup window is moved over the webpage in CHTMLView window, it is causing its area occupied over the CHTMLView window unpainted and this leaves multiple view of the dialog left all over the CHTMLView window, this applies to the multiple window of CHTMLView kept opened behind the dialog.

I am not sure of how this could be dealt at this moment, because, we have the function working for sometime and all of sudden it is causing this issue now.

The CHTMLView is being compiled using VS2008 version of MFC dll and it uses IE v11 and the Java runtime environment version is v7. The CHTMLView runs on windows7.

Appreciate your valuable technical advice/suggestion here.

What I have tried:

Tried sending the WM_PAINT message by calling CWnd::Invalidate() and also with CWnd::UpdateWindow() from the CWnd::OnMove() function, a handler to the ON_WM_MOVE event of the Modal Dialog popup window (CDialog class), but this solution doesn't work.
Posted
Updated 16-Aug-16 4:48am

1 solution

A simple CHtmlView::Refresh() should do the job. :-O
 
Share this answer
 
Comments
Member 10768503 16-Aug-16 12:07pm    
I can try this, but I am not sure this will work with other HTMLView windows kept opened behind the dialog. And another point with this Refresh() function is, it will cause the webpage loaded again on the CHTMLView and this might lead to lose the data already captured.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900