Recent mfc cef have made a multi-tab browser too. When using the package obtained after the browser period of time (more than 1 minute 2 minutes)
When you close the browser entire package in the form x too, the entire form again playing out.
Phenomenon is probably an exe program after you kill it restarted.
Later, compared with that of other examples too, we found a place may cause mfc application restart:
// CmhtBrowserApp configured CmhtBrowserApp :: CmhtBrowserApp () { // support restart manager m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART; // the TODO: code configured to add here, // all significant initialization in InitInstance }
The above is a code has:
// support Restart Manager
m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;
The information that is checked mfc restart function, or when mfc application encounters a catastrophic situation will restart mfc application crashes.
My aim is not to restart after closing mfc application, so annotated start following modules:
// CmhtBrowserApp construction CmhtBrowserApp :: CmhtBrowserApp () { // Support Restart Manager // http://blog.itpub.net/9899936/viewspace-666739/ // after closing and re-open most likely because too mfc a catastrophic situation add20190613 restart the program by_songgp @ m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART; // the TODO: here configured to add the code, // all significant initialization in InitInstance }
Reference: http: //blog.itpub.net/9899936/viewspace-666739/