From 5032d41f43ca5630d4a551cf9d5f4551f1af88b6 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 7 Dec 2022 14:30:20 +0100 Subject: [PATCH] pstats: Set window icon for PStats on Windows Just using a stock image from imageres.dll for now, but it makes it a easier to spot and distinguish from other Panda3D apps in the task bar. --- pandatool/src/win-stats/winStatsServer.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandatool/src/win-stats/winStatsServer.cxx b/pandatool/src/win-stats/winStatsServer.cxx index bad24e87b8..90faef49af 100644 --- a/pandatool/src/win-stats/winStatsServer.cxx +++ b/pandatool/src/win-stats/winStatsServer.cxx @@ -725,12 +725,15 @@ register_window_class(HINSTANCE application) { return; } + HMODULE imageres = LoadLibraryExA("imageres.dll", 0, LOAD_LIBRARY_AS_DATAFILE); + WNDCLASS wc; ZeroMemory(&wc, sizeof(WNDCLASS)); wc.style = 0; wc.lpfnWndProc = (WNDPROC)static_window_proc; wc.hInstance = application; + wc.hIcon = LoadIcon(imageres, MAKEINTRESOURCE(150)); wc.hCursor = LoadCursor(nullptr, IDC_ARROW); wc.hbrBackground = (HBRUSH)COLOR_WINDOW; wc.lpszMenuName = nullptr;