[win] online-installer: refactoring setIcon

This commit is contained in:
SimplestStudio
2024-12-27 12:15:11 +02:00
parent e9ddb63021
commit 6215c2a004

View File

@ -210,7 +210,7 @@ void Window::showMaximized()
void Window::setIcon(int id)
{
HMODULE hInstance = GetModuleHandle(NULL);
HICON hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(id));
HICON hIcon = (HICON)LoadImage(hInstance, MAKEINTRESOURCE(id), IMAGE_ICON, 96, 96, LR_DEFAULTCOLOR | LR_SHARED);
SendMessage(m_hWnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
SendMessage(m_hWnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
}