Тема: CEF браузер в D3D9 вiкнi.
Я вже 4 година намагаюся засунути браузер (обрав CEF) в вiкно d3d9... Щось не дуже виходить.
Ось код який намагався використати:
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow)
{
    CefMainArgs main_args(hInstance);
    CefRefPtr<ClientApp> app(new ClientApp);
    // Execute the secondary process, if any.
    int exit_code = CefExecuteProcess(main_args, app, nullptr);
    if (exit_code >= 0) {
        exit(exit_code);
    }
    exit(5);
    HWND hwnd = RegisterWindow(hInstance, nCmdShow);
    if (hwnd == 0) {
        return 0;
    }
    RECT rect;
    GetClientRect(hwnd, &rect);
    CefSettings settings;
    CefInitialize(main_args, settings, app.get(), NULL);
    CefWindowInfo        info;
    CefBrowserSettings   b_settings;
    CefRefPtr<CefClient> client(new ClientHandler);
    g_handler = (ClientHandler *)client.get();
    std::string               path = "file://" + GetApplicationDir() + "/html/index.html";
    CefRefPtr<CefCommandLine> command_line = CefCommandLine::GetGlobalCommandLine();
    if (command_line->HasSwitch("url")) {
        path = command_line->GetSwitchValue("url");
    }
    info.SetAsChild(hwnd, rect);
    CefBrowserHost::CreateBrowser(info, client.get(), path, b_settings, NULL);
    int result = 0;
    if (!settings.multi_threaded_message_loop) {
        // Run the CEF message loop. This function will block until the application
        // recieves a WM_QUIT message.
        CefRunMessageLoop();
    }
    else {
        // Create a hidden window for message processing.
        HWND hMessageWnd = CreateMessageWindow(hInstance);
        MSG  msg;
        // Run the application message loop.
        while (GetMessage(&msg, NULL, 0, 0)) {
            TranslateMessage(&msg);
            DispatchMessage(&msg);
        }
        DestroyWindow(hMessageWnd);
        hMessageWnd = NULL;
        result = static_cast<int> (msg.wParam);
    }
    CefShutdown();
    return 0;
}Але CefExecuteProcess завжди == 0.
Може пiдкажете якесь iнше рiшення.
Кородко про те що треба:
Вiдмалювати веб сторiнку в вiкнi гри.
А от як це зробити... Я уявлення не маю.