mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Set title bar icon for CEF window.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "handler.h"
|
||||
#include "resource.h"
|
||||
|
||||
#include <include/cef_app.h>
|
||||
#include <include/cef_runnable.h>
|
||||
@@ -85,6 +86,13 @@ namespace loot {
|
||||
void LootHandler::OnAfterCreated(CefRefPtr<CefBrowser> browser) {
|
||||
assert(CefCurrentlyOn(TID_UI));
|
||||
|
||||
// Set the title bar icon.
|
||||
HWND hWnd = browser->GetHost()->GetWindowHandle();
|
||||
HANDLE hIcon = LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(MAINICON), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
|
||||
HANDLE hIconSm = LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(MAINICON), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
|
||||
SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
|
||||
SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)hIconSm);
|
||||
|
||||
// Add to the list of existing browsers.
|
||||
browser_list_.push_back(browser);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* LOOT
|
||||
|
||||
A load order optimisation tool for Oblivion, Skyrim, Fallout 3 and
|
||||
Fallout: New Vegas.
|
||||
|
||||
Copyright (C) 2014 WrinklyNinja
|
||||
|
||||
This file is part of LOOT.
|
||||
|
||||
LOOT is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
LOOT is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with LOOT. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LOOT_GUI_RESOURCE__
|
||||
#define __LOOT_GUI_RESOURCE__
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define MAINICON 101
|
||||
|
||||
#endif
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include <windows.h>
|
||||
#include "gui/resource.h"
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 0,6,0,0
|
||||
PRODUCTVERSION 0,6,0,0
|
||||
|
||||
Reference in New Issue
Block a user