MFC IE built-in wackiness browser

I have this modeless MFC dialog in which Internet Explorer web browser control is integrated.

The control is derived directly from CWndusing the ActiveX covers generated by Visual Studio, and I map them to CDialogusing only DDX_Control(pDX, IDC_EXPLORER, m_explorer);.

I have 2 problems.

Problem number 1:

Being weak, I start and stop the dialog as I see fit, using the new / Create (), then DestroyWindow () / delete (in PostNcDestroy).

The malfunction begins when the IE control starts to load Flash videos (regular YouTube material): when it closes, thereby destroying the dialog, the video is still loading! Until full caching. The Flash ActiveX thread still lingers and continues to work even when the parent dialog passed PostNcDestroy and all memory was freed.

What to do? How do you "kill" this child web control and all its threads?

Problem number 2:

The web browser control covers the entire dialog area. I can’t intercept anything OnMouseMove()- in the parent dialog or in the web browser display class! What gives?

Thanks!


"Cleaning"

"delete this" in PostNcDestroy () - and, of course, call the underlying function. Should there be more? What kind? Shouldn't dialogue take care of its children?

DestroyWindow - / , WM_DESTROY, WM_CLOSE, WM_QUIT, - .

№ 2:

, , , , , "":)? OnMouseMove ? CWnd? ...

+5
1

1) myBrowser.navigate( "about: blank" ), .

+3

All Articles