diff --git a/Aerofoil/GpMain_Win32.cpp b/Aerofoil/GpMain_Win32.cpp index 7fcb0a5..94175d4 100644 --- a/Aerofoil/GpMain_Win32.cpp +++ b/Aerofoil/GpMain_Win32.cpp @@ -15,6 +15,8 @@ #include "GpWindows.h" +#include "resource.h" + #include #include @@ -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; diff --git a/GpCommon/GpWindows.h b/GpCommon/GpWindows.h index c0ded57..a9d05fd 100644 --- a/GpCommon/GpWindows.h +++ b/GpCommon/GpWindows.h @@ -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); diff --git a/GpDisplayDriver_D3D11/GpDisplayDriverD3D11.cpp b/GpDisplayDriver_D3D11/GpDisplayDriverD3D11.cpp index 80a8be6..5514e67 100644 --- a/GpDisplayDriver_D3D11/GpDisplayDriverD3D11.cpp +++ b/GpDisplayDriver_D3D11/GpDisplayDriverD3D11.cpp @@ -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";