Change window icon

This commit is contained in:
elasota
2020-05-18 04:05:18 -04:00
parent 1abb542301
commit d7a769e397
3 changed files with 8 additions and 0 deletions

View File

@@ -15,6 +15,8 @@
#include "GpWindows.h"
#include "resource.h"
#include <stdio.h>
#include <windowsx.h>
@@ -401,6 +403,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
g_gpWindowsGlobals.m_nCmdShow = nCmdShow;
g_gpWindowsGlobals.m_baseDir = GpFileSystem_Win32::GetInstance()->GetBasePath();
g_gpWindowsGlobals.m_hwnd = nullptr;
g_gpWindowsGlobals.m_hIcon = LoadIconW(hInstance, MAKEINTRESOURCEW(IDI_ICON1));
g_gpWindowsGlobals.m_hIconSm = LoadIconW(hInstance, MAKEINTRESOURCEW(IDI_ICON2));
g_gpWindowsGlobals.m_createFiberFunc = GpFiber_Win32::Create;
g_gpWindowsGlobals.m_loadCursorFunc = GpCursor_Win32::Load;

View File

@@ -22,6 +22,8 @@ struct GpWindowsGlobals
LPCSTR m_cmdLine;
LPCWSTR m_baseDir;
HWND m_hwnd;
HICON m_hIcon;
HICON m_hIconSm;
int m_nCmdShow;
IGpFiber *(*m_createFiberFunc)(LPVOID fiber);

View File

@@ -905,6 +905,8 @@ void GpDisplayDriverD3D11::Run()
wc.lpfnWndProc = WinProc;
wc.hInstance = m_osGlobals->m_hInstance;
wc.hCursor = m_arrowCursor;
wc.hIcon = m_osGlobals->m_hIcon;
wc.hIconSm = m_osGlobals->m_hIconSm;
wc.hbrBackground = (HBRUSH)COLOR_WINDOW;
wc.lpszClassName = "GPD3D11WindowClass";