From 441bc134cf708a022e85bbee5e34f28c2c7b4f37 Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Thu, 18 Aug 2016 07:28:56 -0300 Subject: [PATCH] Tweaks to $EXEICON implementation (libqb) --- internal/c/libqb.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/c/libqb.cpp b/internal/c/libqb.cpp index 3477c8699..71e31c56a 100644 --- a/internal/c/libqb.cpp +++ b/internal/c/libqb.cpp @@ -22342,7 +22342,6 @@ int32 func__printwidth(qbs* text, int32 screenhandle, int32 passed){ #ifdef DEPENDENCY_ICON void sub__icon(int32 handle_icon, int32 handle_window_icon, int32 passed){ - static HANDLE ExeIcon; if (new_error) return; @@ -22376,6 +22375,8 @@ int32 func__printwidth(qbs* text, int32 screenhandle, int32 passed){ #ifdef QB64_WINDOWS while (!window_handle){Sleep(100);} + static HANDLE ExeIcon; + //Attempt to load the first icon embedded in the .exe if (!ExeIcon) ExeIcon = LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(0), IMAGE_ICON,32, 32, 0);