From c5a3429d9a058ac493903ea2ed85b7d487d1830d Mon Sep 17 00:00:00 2001 From: Daniel Collins Date: Sun, 18 Sep 2011 22:47:45 +0000 Subject: [PATCH] Fix ipxconfig icon loading. --- src/ipxconfig.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ipxconfig.cpp b/src/ipxconfig.cpp index 98d24c5..14dc528 100644 --- a/src/ipxconfig.cpp +++ b/src/ipxconfig.cpp @@ -570,19 +570,21 @@ static void init_windows() { die("Failed to initialise common controls"); } - WNDCLASS wclass; + WNDCLASSEX wclass; + wclass.cbSize = sizeof(wclass); wclass.style = 0; wclass.lpfnWndProc = &main_wproc; wclass.cbClsExtra = 0; wclass.cbWndExtra = 0; wclass.hInstance = GetModuleHandle(NULL); - wclass.hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(50), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE); + wclass.hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(50), IMAGE_ICON, 32, 32, LR_SHARED); wclass.hCursor = LoadCursor(NULL, IDC_ARROW); wclass.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1); wclass.lpszMenuName = NULL; wclass.lpszClassName = "ipxconfig_class"; + wclass.hIconSm = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(50), IMAGE_ICON, 16, 16, LR_SHARED); - if(!RegisterClass(&wclass)) { + if(!RegisterClassEx(&wclass)) { die("Failed to register ipxconfig_class: " + w32_errmsg(GetLastError())); }