From 030b954971adc5b731cb4a107139744443709f76 Mon Sep 17 00:00:00 2001 From: Dario Emerson Date: Mon, 25 May 2020 11:48:00 +0200 Subject: [PATCH] Correctly add icon to window on Windows --- cmd/packages/windows/wails.rc | 2 +- lib/renderer/webview/webview.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/packages/windows/wails.rc b/cmd/packages/windows/wails.rc index a0a6bc3f..633bd214 100644 --- a/cmd/packages/windows/wails.rc +++ b/cmd/packages/windows/wails.rc @@ -1,2 +1,2 @@ 100 ICON "$NAME$.ico" -100 24 "$NAME$.exe.manifest" \ No newline at end of file +110 24 "$NAME$.exe.manifest" \ No newline at end of file diff --git a/lib/renderer/webview/webview.h b/lib/renderer/webview/webview.h index 7666dc4f..9d4761ca 100644 --- a/lib/renderer/webview/webview.h +++ b/lib/renderer/webview/webview.h @@ -1410,6 +1410,8 @@ struct webview_priv wc.hInstance = hInstance; wc.lpfnWndProc = wndproc; wc.lpszClassName = classname; + wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(100)); + wc.hIconSm = LoadIcon(hInstance, MAKEINTRESOURCE(100)); RegisterClassEx(&wc); style = WS_OVERLAPPEDWINDOW;