上回分解到从CEF官网下载最新版的CEF3并使用CMake将其制作成适合我们VS版本的工程,这回我们开始研究CEF3中自带的两个例程中的CEFSimple(简单例程)。
CEF中的例程是基于win32程序的,没有使用MFC,使我们更容易看清楚CEF3的初始化应用过程。我使用的是CEF3的3.2171.1979_windows32版本。
// Entry point function for all processes.
int APIENTRY wWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow) {
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
void* sandbox_info = NULL;
#if defined(CEF_USE_SANDBOX)
// Manage the life span of the sandbox information object. This is necessary
// for sandbox support on Windows. See cef_sandbox_win.h for complete details.
CefScopedSandboxInfo scoped_sandbox;
sandbox_info = scoped_sandbox.sandbox_info();
#endif
// Provide CEF with command-line arguments.
CefMainArgs main_args(hInstance);
// SimpleApp implements application-level callbacks. It

本文将介绍如何从CEF3的CEFSimple例程开始,理解CEF3的初始化过程。CEFSimple是一个基于win32的简单示例,未使用MFC,便于深入学习CEF3的使用。我们将使用CEF3的3.2171.1979_windows32版本进行研究。
最低0.47元/天 解锁文章
2830

被折叠的 条评论
为什么被折叠?



