[0126/143727:FATAL:browser_main.cc(187)] Check failed: 0 == CefBrowserContext::DebugObjCt (0 vs. 1)
CefDlgTestX.exe has triggered a breakpoint
The thread 'CompositorTileWorker1/9208' (0x23f8) has exited with code 0 (0x0).
[0126/143731:WARNING:content_browser_client.cc(622)] No browser info matching frame process id 3 and routing id 1
The thread 'Chrome_IOThread' (0x12d4) has exited with code 0 (0x0).
The thread 'Chrome_CacheThread' (0x3ab8) has exited with code 0 (0x0).
The thread 'Chrome_ProcessLauncherThread' (0x3abc) has exited with code 0 (0x0).
The thread 'Chrome_FileUserBlockingThread' (0x39d4) has exited with code 0 (0x0).
The thread 'Chrome_FileThread' (0x2ab0) has exited with code 0 (0x0).
The thread 'Chrome_DBThread' (0x354c) has exited with code 0 (0x0).
The thread 'IndexedDB' (0x2e98) has exited with code 0 (0x0).
The thread 'BrowserBlockingWorker1/7868' (0x1ebc) has exited with code 0 (0x0).
[0126/143732:FATAL:browser_main.cc(201)] Check failed: 0 == CefURLRequestContext::DebugObjCt (0 vs. 1)
CefDlgTestX.exe has triggered a breakpoint
The thread 'VideoCaptureThread' (0x3a58) has exited with code 0 (0x0).
The thread 'AudioThread' (0x3a60) has exited with code 0 (0x0).
The thread 'DnsConfigService' (0x2c5c) has exited with code 0 (0x0).
[0126/143733:FATAL:keyed_service_factory.cc(19)] Check failed: mapping_.empty().
CefDlgTestX.exe has triggered a breakpoint
[0126/143734:FATAL:keyed_service_factory.cc(19)] Check failed: mapping_.empty().
CefDlgTestX.exe has triggered a breakpoint
First-chance exception at 0x00007ffc7058a1c8 in CefDlgTestX.exe: 0x0000071A: Remote procedure call was cancelled.
The thread 'handle-watcher-thread' (0x3834) has exited with code 0 (0x0).
[0126/143735:FATAL:browser_context_impl.cc(48)] Check failed: all_.empty().
CefDlgTestX.exe has triggered a breakpoint
[0126/143736:FATAL:keyed_service_factory.cc(19)] Check failed: mapping_.empty().
CefDlgTestX.exe has triggered a breakpoint
[0126/143737:FATAL:keyed_service_factory.cc(19)] Check failed: mapping_.empty().
CefDlgTestX.exe has triggered a breakpoint
[0126/143737:FATAL:keyed_service_factory.cc(19)] Check failed: mapping_.empty().
CefDlgTestX.exe has triggered a breakpoint
[0126/143738:FATAL:keyed_service_factory.cc(19)] Check failed: mapping_.empty().
CefDlgTestX.exe has triggered a breakpoint
The thread 'Win64 Thread' (0x3940) has exited with code 0 (0x0).
The thread 'Win64 Thread' (0x201c) has exited with code 0 (0x0).
The thread 'PacDhcpLookupWorker3/11396' (0x2c84) has exited with code 0 (0x0).
The thread 'Win64 Thread' (0x2ea4) has exited with code 0 (0x0).
The thread 'Win64 Thread' (0x37a4) has exited with code 0 (0x0).
The thread 'BrokerEvent' (0x3950) has exited with code 0 (0x0).
The thread 'Win64 Thread' (0x38b8) has exited with code 0 (0x0).
The thread 'Win64 Thread' (0x3acc) has exited with code 0 (0x0).
The thread 'Win64 Thread' (0x3884) has exited with code 0 (0x0).
The thread 'Win64 Thread' (0x2f28) has exited with code 0 (0x0).
The thread 'PacDhcpLookupWorker2/1652' (0x674) has exited with code 0 (0x0).
The thread 'Win64 Thread' (0x29fc) has exited with code 0 (0x0).
The thread 'PacDhcpLookupWorker1/4536' (0x11b8) has exited with code 0 (0x0).
The program '[0x2218] CefDlgTestX.exe: Native' has exited with code 0 (0x0).
#include <windows.h>
#include <CommCtrl.h>
#include "MyCefApp.h"
#include "resource.h"
CefRefPtr<MyCefApp> pCefApp;
INT_PTR CALLBACK DialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
case WM_COMMAND:
if (HIWORD(wParam) == BN_CLICKED)
{
//button click event
switch(LOWORD(wParam))
{
case IDC_BUTTON1:
{
MessageBox(hDlg, L"Button1 Click", L"Information", MB_OK|MB_ICONINFORMATION);
}
return TRUE;
case IDC_BUTTON2:
{
MessageBox(hDlg, L"Button2 Click", L"Information", MB_OK|MB_ICONINFORMATION);
}
return TRUE;
case IDCANCEL:
{
SendMessage(hDlg, WM_CLOSE, 0, 0);
}
return TRUE;
}
}
case WM_CLOSE:
if (pCefApp!=NULL)
{
if(pCefApp!=NULL)
{
if (pCefApp->GetCefClient()!=NULL)
{
pCefApp->GetCefClient()->CloseAllBrowsers(false);
}
}
}
if(MessageBox(hDlg, TEXT("Close the program?"), TEXT("Close"),
MB_ICONQUESTION | MB_YESNO) == IDYES)
{
DestroyWindow(hDlg);
}
return TRUE;
case WM_DESTROY:
PostQuitMessage(0);
return TRUE;
}
return FALSE;
}
// Entry point function for all processes.
int APIENTRY wWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow) {
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// Enable High-DPI support on Windows 7 or newer.
CefEnableHighDPISupport();
void* sandbox_info = NULL;
// Provide CEF with command-line arguments.
CefMainArgs main_args(hInstance);
// SimpleApp implements application-level callbacks. It will create the first
// browser instance in OnContextInitialized() after CEF has initialized.
pCefApp = new MyCefApp();
// CEF applications have multiple sub-processes (render, plugin, GPU, etc)
// that share the same executable. This function checks the command-line and,
// if this is a sub-process, executes the appropriate logic.
int exit_code = CefExecuteProcess(main_args, pCefApp.get(), sandbox_info);
if (exit_code >= 0) {
// The sub-process has completed so return here.
return exit_code;
}
// Specify CEF global settings here.
CefSettings settings;
settings.multi_threaded_message_loop = false;
InitCommonControls();
HWND hDlg = CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), 0, DialogProc, 0);
if (hDlg==NULL) return -1;
ShowWindow (hDlg,SW_SHOW);
UpdateWindow (hDlg);
HWND hHTMLGroupBox = GetDlgItem(hDlg, IDC_GROUPBOX1);
RECT htmlRect;
WINDOWINFO wndInfo;
GetWindowInfo(hDlg, &wndInfo);
GetWindowRect(hHTMLGroupBox, &htmlRect);
htmlRect.left-=wndInfo.rcClient.left;
htmlRect.right-=wndInfo.rcClient.left;
htmlRect.top-=wndInfo.rcClient.top;
htmlRect.bottom-=wndInfo.rcClient.top;
ShowWindow(hHTMLGroupBox, SW_HIDE);
pCefApp->SetParentWindow(hDlg, htmlRect);
// Initialize CEF.
CefInitialize(main_args, settings, pCefApp.get(), sandbox_info);
MSG Msg;
while(GetMessage(&Msg, NULL, 0, 0))
{
if(!IsDialogMessage (hDlg, &Msg))
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
CefDoMessageLoopWork();
}
CefDoMessageLoopWork();
CefDoMessageLoopWork();
CefDoMessageLoopWork();
// Shut down CEF.
CefShutdown();
return 0;
}
Users browsing this forum: Google [Bot] and 94 guests