From 0aca5082abff77403cbff922e40e1393f3aa65a0 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 15 Oct 2015 17:03:36 +0200 Subject: [PATCH] Replace LoadIcon with LoadImage Fixes #585. --- src/win32_window.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/win32_window.c b/src/win32_window.c index 9239dd6c..5f60b9b6 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -715,11 +715,15 @@ GLFWbool _glfwRegisterWindowClass(void) wc.lpszClassName = _GLFW_WNDCLASSNAME; // Load user-provided icon if available - wc.hIcon = LoadIconW(GetModuleHandleW(NULL), L"GLFW_ICON"); + wc.hIcon = LoadImageW(GetModuleHandleW(NULL), + L"GLFW_ICON", IMAGE_ICON, + 0, 0, LR_DEFAULTSIZE | LR_SHARED); if (!wc.hIcon) { // No user-provided icon found, load default icon - wc.hIcon = LoadIconW(NULL, IDI_WINLOGO); + wc.hIcon = LoadImageW(NULL, + IDI_APPLICATION, IMAGE_ICON, + 0, 0, LR_DEFAULTSIZE | LR_SHARED); } if (!RegisterClassW(&wc))