From 848793f5b51e28cb88fac216e023a3d64bd6e485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20=22Magnetic-Fox=22=20W=C4=99grzyn?= Date: Sun, 10 Sep 2023 22:17:46 +0200 Subject: [PATCH] Experiments with icon --- WinAPI_test.wpj | 4 ++-- icon1.ico | Bin 0 -> 2734 bytes main.cpp | 2 +- menuitems.h | 2 ++ resources.rc | 2 ++ 5 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 icon1.ico diff --git a/WinAPI_test.wpj b/WinAPI_test.wpj index 78f237a..31acc67 100644 --- a/WinAPI_test.wpj +++ b/WinAPI_test.wpj @@ -30,8 +30,8 @@ VComponent WRect 0 0 -5717 -4314 +5712 +4304 0 0 9 diff --git a/icon1.ico b/icon1.ico new file mode 100644 index 0000000000000000000000000000000000000000..d6fd9276aa1b735a587a96f2b448ba65703f59ea GIT binary patch literal 2734 zcmeHJF;Buk6n=ow02T2MNJruXi@}6}3H}D7qq`0l9du}DqJts+gEF|=fewT&{sAW) zjYDT*4d?gnS|e=}HF40`2j6}7zIWy5%e%f36{tj}StquqBGDeWUe|uJK(tdLYPGa~ zuujxpBWhxe3G{#hL4XNdn{5I?M1;_U5mWL!56l6nz9c2j0DM^DA-8{>0n~sDj3Yk? zT{nGVq-(??Q zo%7TJhCrMr!m}dV#E<8x>ZYx>xskPfmGz2~GNq?4s3_gIOPbbG>kX}!#|ew{i+D-D#v+$0}&#yRR910 literal 0 HcmV?d00001 diff --git a/main.cpp b/main.cpp index 790f8a7..199cd31 100644 --- a/main.cpp +++ b/main.cpp @@ -31,7 +31,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); + wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1)); wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); wc.lpszMenuName = NULL; diff --git a/menuitems.h b/menuitems.h index 3f258e6..7f29785 100644 --- a/menuitems.h +++ b/menuitems.h @@ -7,4 +7,6 @@ #define ID_PLIK_ZAKONCZ 100 #define ID_POMOC_O 101 +#define IDI_ICON1 10 + #endif diff --git a/resources.rc b/resources.rc index 2701a29..634fe0d 100644 --- a/resources.rc +++ b/resources.rc @@ -26,6 +26,8 @@ FILETYPE 0x1L END } +IDI_ICON1 ICON "icon1.ico" + IDR_MENU1 MENU BEGIN POPUP "&Plik"