CodePudding user response:
//Copyright (c) 2013 The Chromium Embedded Framework The Authors. All rights
//reserved. Use of this source code is governed by a BSD - style license that
//can be found in the LICENSE file.
# include "cefsimple/simple_app. H"
#include
# include "cefsimple/simple_handler. H"
# include "include/cef_browser. H"
# include "include/cef_command_line. H"
# include "include/wrapper/cef_helpers h"
SimpleApp has: : SimpleApp has () {
}
Void SimpleApp has: : OnContextInitialized () {
CEF_REQUIRE_UI_THREAD ();
//Information, informs the when creating the native window.
CefWindowInfo window_info;
# if defined (OS_WIN)
//On Windows we need to specify certain flags that will be passed to
//CreateWindowEx ().
Window_info. SetAsPopup (NULL, "test");
# endif
//SimpleHandler implements browser - level callbacks.
CefRefPtrHandler (new SimpleHandler ());
//Specify CEF browser Settings here.
CefBrowserSettings browser_settings;
STD: : string url;
//Check if a "url=" value was provided via the command - line. If so, use the
Home//that the default URL.
CefRefPtrCommand_line=
CefCommandLine: : GetGlobalCommandLine ();
Url=command_line - & gt; GetSwitchValue (" url ");
If (url. The empty ())
Url="http://www.baidu.com/";
//Create the first browser window.
CefBrowserHost: : CreateBrowser (window_info, handler. The get (), url,
Browser_settings, NULL);
}
I have been in the cefsimple. Rc custom icon, can or not!
IDI_CEFSIMPLE ICON "res \ cefsimple. Ico"
IDI_SMALL ICON "res \ small. Ico"
CodePudding user response:
Baidu search relevant keywords,CodePudding user response:
Is the baidu did not ahCodePudding user response:
Window_info look for any parameters or function can set the iconCodePudding user response:
Get CefBrowser pointerCefRefPtr
Below code can get into the window handle
HWND HWND=browser - & gt; GetHost () - & gt; GetWindowHandle ();
The window Settings icon
The CWnd * pWnd=CWnd: : FromHandle (hWnd);
PWnd - & gt; SetIcon ();
Pseudo code, there is no specific test.
CodePudding user response: