MFC嵌入cef3
2014-10-24 15:38
330 查看
全局变量:
重写MFC启动代码:
在MFC中void CMainFrame::OnClose()添加以下代码
?
CefRefPtr<ClientApp> CefApp=NULL;
重写MFC启动代码:
//添加以下代码,开始 CefMainArgs main_args;//(hInstance); CefApp = new ClientApp(); // Execute the secondary process, if any. int exit_code = CefExecuteProcess(main_args, CefApp.get(), NULL); if (exit_code >= 0) return exit_code; // Parse command line arguments. The passed in values are ignored on Windows. // AppInitCommandLine(0, NULL); CefSettings settings; settings.multi_threaded_message_loop=true; //settings // Populate the settings based on command line arguments. // AppGetSettings(settings); // Initialize CEF. if(!CefInitialize(main_args, settings, CefApp.get(), NULL)) { ASSERT(0); } //结束 CWinThread *pThread = AfxGetThread();//获取主线程指针 CWinApp *pApp = AfxGetApp(); AfxWinInit(); .... pApp->InitApplication(); ... pThread->InitInstance();//初始化应用程序实例 ... nReturnCode = pThread->Run();//开始消息循环
CefShutdown();
return nReturnCode; }
在MFC中void CMainFrame::OnClose()添加以下代码
?
相关文章推荐
- CEF3自研究笔记 三、将CEF嵌入到MFC对话框程序中去
- CEF方面的研究(三) 将CEF嵌入MFC对话框程序
- CEF嵌入到单文档mfc
- MFC应用程序中嵌入一个谷歌cef浏览器
- 嵌入CEF到MFC程序
- MFC对话框程序嵌入CEF并加入flash插件
- 转:CEF嵌入到单文档mfc
- 201506022 CEF嵌入MFC对话框程序
- CEF方面的研究(四) CEF嵌入MFC对话框关闭崩溃问题解决办法
- 20150622 CEF嵌入MFC对话框程序
- MFC嵌入cef1
- 将cef3嵌入到mfc对话框中,当程序退出时报错,怎么解决?
- MFC嵌入cef3 WTL嵌入cef3
- MFC单文档中嵌入CEF(Chromium Embedded Framework)使用多进程
- 嵌入Chrome cef到MFC CView
- CEF 嵌入到MFC的流程,包括启动CEF以及CEF程序的关闭流程。
- MFC嵌入CEF关闭程序时崩溃的解决方法
- 嵌入Chrome cef到MFC CView
- MFC嵌入浏览器框架CEF
- 如何使用 MFC 嵌入并自动化 Microsoft Excel 工作表