From b04eb2064a64160d6227c1deb33b86550d10ebbc Mon Sep 17 00:00:00 2001 From: Martijn van Antwerpen Date: Wed, 20 Nov 2024 12:06:20 +0100 Subject: [PATCH 01/15] Added new welcome dialog --- SpookyView/CDialog.cpp | 17 +++++- SpookyView/CDialog.h | 2 + SpookyView/CIntroDialog.cpp | 72 ++++++++++++++++++++++++ SpookyView/CIntroDialog.h | 18 ++++++ SpookyView/CMainWindow.cpp | 29 +++++----- SpookyView/CMainWindow.h | 3 +- SpookyView/CRegistrySettingsManager.cpp | 4 +- SpookyView/CRegistrySettingsManager.h | 2 +- SpookyView/CSettingsDialog.cpp | 8 +++ SpookyView/ISettingsManager.h | 2 +- SpookyView/Resource.h | 13 ++++- SpookyView/SpookyView.cpp | 2 + SpookyView/SpookyView.h | 2 + SpookyView/SpookyView.rc | 58 ++++++++++++++++++- SpookyView/SpookyView.vcxproj | 3 + SpookyView/SpookyView.vcxproj.filters | 9 +++ SpookyView/notifyicon.bmp | Bin 0 -> 87186 bytes 17 files changed, 217 insertions(+), 27 deletions(-) create mode 100644 SpookyView/CIntroDialog.cpp create mode 100644 SpookyView/CIntroDialog.h create mode 100644 SpookyView/notifyicon.bmp diff --git a/SpookyView/CDialog.cpp b/SpookyView/CDialog.cpp index e562fc0..c3a8f2a 100644 --- a/SpookyView/CDialog.cpp +++ b/SpookyView/CDialog.cpp @@ -5,10 +5,23 @@ CDialog::CDialog(HINSTANCE hInstance) : CWnd(hInstance) { } +BOOL CDialog::hasInitInstance() +{ + return hasInit; +} + BOOL CDialog::InitInstance() { - SetupDialog(); - return Create(); + if (!hasInit) + { + SetupDialog(); + auto created = Create(); + if (created) + { + hasInit = TRUE; + } + } + return hasInit; } void CDialog::SetForeground() diff --git a/SpookyView/CDialog.h b/SpookyView/CDialog.h index 90c2418..77a8cfe 100644 --- a/SpookyView/CDialog.h +++ b/SpookyView/CDialog.h @@ -8,10 +8,12 @@ class CDialog : protected CWnd { public: CDialog(HINSTANCE hInstance); + BOOL hasInitInstance(); BOOL InitInstance(); void SetForeground(); protected: LPCTSTR dialogResource; + BOOL hasInit; virtual BOOL SetupDialog() = 0; virtual BOOL Create() = 0; }; diff --git a/SpookyView/CIntroDialog.cpp b/SpookyView/CIntroDialog.cpp new file mode 100644 index 0000000..13a849d --- /dev/null +++ b/SpookyView/CIntroDialog.cpp @@ -0,0 +1,72 @@ +#include "stdafx.h" +#include "CIntroDialog.h" +#include +#include "ISettingsManager.h" +#include "SpookyView.h" + +CIntroDialog::CIntroDialog(HINSTANCE hInstance, HWND hParent) : CModelessDialog(hInstance, hParent) +{ +}; + +BOOL CIntroDialog::SetupDialog() +{ + key = IDD_INTRO; + this->dialogResource = MAKEINTRESOURCE(IDD_INTRO); + return TRUE; +} + +INT_PTR CALLBACK CIntroDialog::DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (message) + { + case WM_INITDIALOG: + SetStyle(hDlg); + return TRUE; + case WM_COMMAND: + switch (LOWORD(wParam)) { + case IDCLOSE: + ApplyChoice(); + DestroyWindow(hDlg); + return TRUE; + break; + case IDC_BUTTON_INTRO_SETTINGS: + if (!cSettingsDialog) + { + cSettingsDialog = std::make_unique(this->hInstance, mainHwnd); + } + if (!cSettingsDialog->hasInitInstance()) + { + cSettingsDialog->InitInstance(); + } + else + { + cSettingsDialog->SetForeground(); + } + break; + } + break; + } + return FALSE; +} + +void CIntroDialog::SetStyle(HWND hDlg) +{ + ZeroMemory(&introFont, sizeof(LOGFONT)); + introFont.lfHeight = 20; + introFont.lfWeight = FW_BOLD; + HFONT hFont = CreateFontIndirect(&introFont); + if ((HFONT)0 != hFont) + { + HWND introStaticText = GetDlgItem(hDlg, ID_STATIC_INTRO_TITLE); + SetWindowFont(introStaticText, hFont, TRUE); + } +} + +void CIntroDialog::ApplyChoice() +{ + HWND skipIntroCheckbox = GetDlgItem(hWnd, IDC_SKIP_INTRO_CHECKBOX); + if (Button_GetCheck(skipIntroCheckbox)) + { + settingsManager->SetSkipWelcome(TRUE); + } +} diff --git a/SpookyView/CIntroDialog.h b/SpookyView/CIntroDialog.h new file mode 100644 index 0000000..4aa422a --- /dev/null +++ b/SpookyView/CIntroDialog.h @@ -0,0 +1,18 @@ +#ifndef CINTRODIALOG_H +#define CINTRODIALOG_H + +#include "CModelessDialog.h" + +class CIntroDialog :public CModelessDialog +{ +public: + CIntroDialog(HINSTANCE hInstance, HWND hParent); + INT_PTR CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +protected: + BOOL SetupDialog(); + LOGFONT introFont; + void SetStyle(HWND hDlg); + void ApplyChoice(); +}; + +#endif \ No newline at end of file diff --git a/SpookyView/CMainWindow.cpp b/SpookyView/CMainWindow.cpp index 26f8a91..bcca7bf 100644 --- a/SpookyView/CMainWindow.cpp +++ b/SpookyView/CMainWindow.cpp @@ -4,6 +4,7 @@ #include "Resource.h" #include "CLimitSingleInstance.h" #include "CSettingsDialog.h" +#include "CIntroDialog.h" #include "Defines.h" #include "UpdateResponse.h" #include "ISettingsManager.h" @@ -11,7 +12,6 @@ #ifdef UNICODE #include "UnicodeConversion.h" #endif //UNICODE -#include "SpookyView.h" const int SINGLE_CLICK_TIMER = 1; @@ -25,6 +25,10 @@ BOOL CMainWindow::InitInstance() { //Try to create window BOOL canInit = CWindow::InitInstance(0); + if (canInit) + { + mainHwnd = this->hWnd; + } return canInit; } @@ -73,6 +77,9 @@ LRESULT CALLBACK CMainWindow::WndProc(HWND hWnd, UINT message, WPARAM wParam, LP case IDD_ABOUTBOX: cAboutDialog.reset(); break; + case IDD_INTRO: + cIntroDialog.reset(); + break; } return FALSE; #ifdef UNICODE @@ -156,7 +163,10 @@ LRESULT CALLBACK CMainWindow::WndProc(HWND hWnd, UINT message, WPARAM wParam, LP case IDM_SETTINGS: if (!cSettingsDialog) { - cSettingsDialog = std::make_unique(this->hInstance, this->hWnd); + cSettingsDialog = std::make_unique(this->hInstance, mainHwnd); + } + if (!cSettingsDialog->hasInitInstance()) + { cSettingsDialog->InitInstance(); } else @@ -255,18 +265,7 @@ void CMainWindow::CheckIsFirstRun() { if (!settingsManager->GetSkipWelcome()) { - settingsManager->SetSkipWelcome(); - TCHAR titleString[100]; - TCHAR messageString[100]; - LoadString(hInst, IDS_WELCOME_TITLE, titleString, sizeof(titleString) / sizeof(TCHAR)); - if (isWindows10orNewer) - { - LoadString(hInst, IDS_WELCOME_MESSAGE_WIN10, messageString, sizeof(messageString) / sizeof(TCHAR)); - } - else - { - LoadString(hInst, IDS_WELCOME_MESSAGE, messageString, sizeof(messageString) / sizeof(TCHAR)); - } - cNotifyIcon->ShowBalloon(titleString, messageString); + cIntroDialog = std::make_unique(this->hInstance, this->hWnd); + cIntroDialog->InitInstance(); } } \ No newline at end of file diff --git a/SpookyView/CMainWindow.h b/SpookyView/CMainWindow.h index 88d71f2..32af14a 100644 --- a/SpookyView/CMainWindow.h +++ b/SpookyView/CMainWindow.h @@ -4,6 +4,7 @@ #include "CWindow.h" #include "CNotifyIcon.h" #include "CAbout.h" +#include "CIntroDialog.h" #include "CSetupDialog.h" #include "CSettingsDialog.h" #include @@ -30,9 +31,9 @@ class CMainWindow: public CWindow std::unique_ptr cNotifyIcon; HMENU notifyIconContextMenu; std::unique_ptr cSetupDialog; - std::unique_ptr cSettingsDialog; std::unique_ptr cAboutDialog; std::unique_ptr cUpdateAvailableDialog; + std::unique_ptr cIntroDialog; }; #endif \ No newline at end of file diff --git a/SpookyView/CRegistrySettingsManager.cpp b/SpookyView/CRegistrySettingsManager.cpp index 3bf90e6..da43a11 100644 --- a/SpookyView/CRegistrySettingsManager.cpp +++ b/SpookyView/CRegistrySettingsManager.cpp @@ -319,8 +319,8 @@ BOOL CRegistrySettingsManager::GetSkipWelcome() return FALSE; } -void CRegistrySettingsManager::SetSkipWelcome() +void CRegistrySettingsManager::SetSkipWelcome(BOOL state) { - BYTE stateByte = '\x1'; + BYTE stateByte = state ? '\x1' : '\x0'; SaveValue(_T("Software\\Spooky View"), _T("Skip welcome"), REG_BINARY, &stateByte); } diff --git a/SpookyView/CRegistrySettingsManager.h b/SpookyView/CRegistrySettingsManager.h index ef6d757..72ae60c 100644 --- a/SpookyView/CRegistrySettingsManager.h +++ b/SpookyView/CRegistrySettingsManager.h @@ -19,7 +19,7 @@ class CRegistrySettingsManager : public ISettingsManager BOOL GetDisableUpdateCheck(); void SetDisableUpdateCheck(BOOL state); BOOL GetSkipWelcome(); - void SetSkipWelcome(); + void SetSkipWelcome(BOOL state); protected: std::unique_ptr settings; void SaveAlphaSettingsValues(HKEY key, CAlphaSettings values); diff --git a/SpookyView/CSettingsDialog.cpp b/SpookyView/CSettingsDialog.cpp index e492814..dc43ac7 100644 --- a/SpookyView/CSettingsDialog.cpp +++ b/SpookyView/CSettingsDialog.cpp @@ -52,10 +52,18 @@ void CSettingsDialog::ApplySettings() } HWND disableUpdateCheck = GetDlgItem(hWnd, IDC_CHECKBOX_DISABLE_UPDATE_CHECK); settingsManager->SetDisableUpdateCheck(Button_GetCheck(disableUpdateCheck)); + HWND skipIntroCheck = GetDlgItem(hWnd, IDC_CHECKBOX_SKIP_WELCOME); + settingsManager->SetSkipWelcome(Button_GetCheck(skipIntroCheck)); } void CSettingsDialog::SetFormValues(HWND hDlg) { + HWND skipIntroCheckbox = GetDlgItem(hDlg, IDC_CHECKBOX_SKIP_WELCOME); + if (settingsManager->GetSkipWelcome()) + { + Button_SetCheck(skipIntroCheckbox, TRUE); + } + HWND autoStartupCheckbox = GetDlgItem(hDlg, IDC_CHECKBOX_AUTO_STARTUP); #ifdef PACKAGING_STORE ShowWindow(autoStartupCheckbox, SW_HIDE); diff --git a/SpookyView/ISettingsManager.h b/SpookyView/ISettingsManager.h index 231698c..5298b6c 100644 --- a/SpookyView/ISettingsManager.h +++ b/SpookyView/ISettingsManager.h @@ -20,7 +20,7 @@ class ISettingsManager virtual BOOL GetDisableUpdateCheck() = 0; virtual void SetDisableUpdateCheck(BOOL state) = 0; virtual BOOL GetSkipWelcome() = 0; - virtual void SetSkipWelcome() = 0; + virtual void SetSkipWelcome(BOOL state) = 0; }; #endif \ No newline at end of file diff --git a/SpookyView/Resource.h b/SpookyView/Resource.h index b67c6b8..db72daf 100644 --- a/SpookyView/Resource.h +++ b/SpookyView/Resource.h @@ -31,9 +31,12 @@ #define IDS_WELCOME_MESSAGE 125 #define IDS_WELCOME_MESSAGE_WIN10 126 #define IDS_PAUSED 127 +#define IDD_INTRO 127 #define IDS_ERROR_CANNOT_CREATE_MAIN_WINDOW 128 +#define IDD_INTRO1 128 #define IDS_ERROR_CANNOT_CREATE_NOTIFICATION_AREA_ICON 129 #define IDS_ERROR_CANNOT_CREATE_REGISTRY_KEY 130 +#define IDB_NOTIFYICON 131 #define ID_DOWNLOAD 1000 #define IDC_SKIP_VERSION 1001 #define ID_CLOSE 1002 @@ -42,12 +45,18 @@ #define IDC_SPOOK_IMAGE 1004 #define IDC_CHECKBOX_DISABLE_UPDATE_CHECK 1005 #define IDC_STATIC_APP_EXECUTABLE 1006 +#define IDC_CHECKBOX_DISABLE_UPDATE_CHECK2 1006 +#define IDC_CHECKBOX_SKIP_WELCOME 1006 #define IDC_EDIT_EXECUTABLE_NAME 1007 #define IDC_STATIC_FOREGORUND_TRANSPARENT 1008 #define IDC_STATIC_FOREGROUND_OPAQUE 1009 #define IDC_STATIC_BACKGROUND_TRANSPARENT 1010 #define IDC_STATIC_BACKGROUND_OPAQUE 1011 #define IDC_CHECKBOX_SEPARATE_BACKGROUND_VALUE 1012 +#define IDC_INTRO_TEXT 1014 +#define IDC_SKIP_INTRO_CHECKBOX 1015 +#define IDC_BUTTON_INTRO_SETTINGS 1016 +#define ID_STATIC_INTRO_TITLE 1018 #define IDC_LIST_ADD_APPS 40000 #define IDC_LIST_ADD_WINDOWS 40000 #define IDC_LIST_APPS 40000 @@ -82,9 +91,9 @@ #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NO_MFC 1 -#define _APS_NEXT_RESOURCE_VALUE 127 +#define _APS_NEXT_RESOURCE_VALUE 131 #define _APS_NEXT_COMMAND_VALUE 40017 -#define _APS_NEXT_CONTROL_VALUE 1013 +#define _APS_NEXT_CONTROL_VALUE 1019 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/SpookyView/SpookyView.cpp b/SpookyView/SpookyView.cpp index c681069..fe1143d 100644 --- a/SpookyView/SpookyView.cpp +++ b/SpookyView/SpookyView.cpp @@ -10,9 +10,11 @@ // Global Variables: HINSTANCE hInst; // current instance +HWND mainHwnd; // Main window hwnd HICON spookyIcon; PGNSI isImmersive; std::unique_ptr mainWindow; +std::unique_ptr cSettingsDialog; std::unique_ptr settingsManager; UpdateResponse updateResponse; WindowsEnum windowsEnum; diff --git a/SpookyView/SpookyView.h b/SpookyView/SpookyView.h index 77bdfb8..8a66228 100644 --- a/SpookyView/SpookyView.h +++ b/SpookyView/SpookyView.h @@ -8,8 +8,10 @@ extern HICON spookyIcon; extern HINSTANCE hInst; +extern HWND mainHwnd; extern std::unique_ptr settingsManager; extern std::unique_ptr mainWindow; +extern std::unique_ptr cSettingsDialog; extern WindowsEnum windowsEnum; extern PGNSI isImmersive; extern bool isWindows8; diff --git a/SpookyView/SpookyView.rc b/SpookyView/SpookyView.rc index 145a182..02f26fc 100644 --- a/SpookyView/SpookyView.rc +++ b/SpookyView/SpookyView.rc @@ -52,6 +52,8 @@ END IDB_SPOOK BITMAP ".\\spook.bmp" +IDB_NOTIFYICON BITMAP "notifyicon.bmp" + #endif // Neutral resources ///////////////////////////////////////////////////////////////////////////// @@ -154,11 +156,13 @@ CAPTION "Settings" FONT 8, "Ms Shell Dlg", 0, 0, 0x0 BEGIN CONTROL "Start program when this user logs in",IDC_CHECKBOX_AUTO_STARTUP, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,6,127,8 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,6,127,10 PUSHBUTTON "Cancel",IDCANCEL,232,162,50,14 DEFPUSHBUTTON "OK",IDOK,177,162,50,14 CONTROL "Do not check for updates on start",IDC_CHECKBOX_DISABLE_UPDATE_CHECK, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,24,124,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,24,127,10 + CONTROL "Do not show welcome window on startup",IDC_CHECKBOX_SKIP_WELCOME, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,42,227,10 END IDD_SETUP DIALOGEX 0, 0, 474, 318 @@ -201,6 +205,21 @@ BEGIN LTEXT "Message!",IDC_UPDATE_MESSAGE,7,7,245,85,NOT WS_GROUP END +IDD_INTRO DIALOGEX 0, 0, 207, 247 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Spooky View" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "Close",IDCLOSE,150,226,50,14 + LTEXT "Welcome to\nSpooky View",ID_STATIC_INTRO_TITLE,85,7,115,49 + CONTROL IDB_NOTIFYICON,IDC_STATIC,"Static",SS_BITMAP,45,103,121,98 + LTEXT "Double-click this app's icon in the notification area or open it again to set up the app.",IDC_INTRO_TEXT,7,77,193,19 + CONTROL "Do not show this window again",IDC_SKIP_INTRO_CHECKBOX, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,211,115,10 + CONTROL IDB_SPOOK,IDC_STATIC,"Static",SS_BITMAP,7,7,67,62 + PUSHBUTTON "Open settings...",IDC_BUTTON_INTRO_SETTINGS,7,226,82,14 +END + ///////////////////////////////////////////////////////////////////////////// // @@ -277,6 +296,14 @@ BEGIN TOPMARGIN, 7 BOTTOMMARGIN, 118 END + + IDD_INTRO, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 200 + TOPMARGIN, 7 + BOTTOMMARGIN, 240 + END END #endif // APSTUDIO_INVOKED @@ -413,11 +440,13 @@ CAPTION "Instellingen" FONT 8, "Ms Shell Dlg", 0, 0, 0x0 BEGIN CONTROL "Start programma bij aanmelden",IDC_CHECKBOX_AUTO_STARTUP, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,6,230,8 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,6,230,10 PUSHBUTTON "Annuleren",IDCANCEL,232,162,50,14 DEFPUSHBUTTON "OK",IDOK,177,162,50,14 CONTROL "Geen controle op updates bij starten",IDC_CHECKBOX_DISABLE_UPDATE_CHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,24,227,10 + CONTROL "Toon welkomstsvenster niet bij opstarten",IDC_CHECKBOX_SKIP_WELCOME, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,42,227,10 END IDD_SETUP DIALOGEX 0, 0, 474, 318 @@ -460,6 +489,21 @@ BEGIN LTEXT "Bericht!",IDC_UPDATE_MESSAGE,7,7,245,85,NOT WS_GROUP END +IDD_INTRO DIALOGEX 0, 0, 207, 247 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Spooky View" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "Sluiten",IDCLOSE,150,226,50,14 + LTEXT "Welkom bij\nSpooky View",ID_STATIC_INTRO_TITLE,85,7,115,49 + CONTROL IDB_NOTIFYICON,IDC_STATIC,"Static",SS_BITMAP,45,103,121,98 + LTEXT "Dubbeklik op het icoon van deze app in het systeemvak of open het nogmaals om de app in te stellen.",IDC_INTRO_TEXT,7,77,193,19 + CONTROL "Toon dit venster niet opnieuw",IDC_SKIP_INTRO_CHECKBOX, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,211,111,10 + CONTROL IDB_SPOOK,IDC_STATIC,"Static",SS_BITMAP,7,7,67,62 + PUSHBUTTON "Open instellingen...",IDC_BUTTON_INTRO_SETTINGS,7,226,82,14 +END + ///////////////////////////////////////////////////////////////////////////// // @@ -536,6 +580,14 @@ BEGIN TOPMARGIN, 7 BOTTOMMARGIN, 118 END + + IDD_INTRO, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 200 + TOPMARGIN, 7 + BOTTOMMARGIN, 240 + END END #endif // APSTUDIO_INVOKED diff --git a/SpookyView/SpookyView.vcxproj b/SpookyView/SpookyView.vcxproj index 9cebf91..f6b6a3b 100644 --- a/SpookyView/SpookyView.vcxproj +++ b/SpookyView/SpookyView.vcxproj @@ -475,6 +475,7 @@ + @@ -512,6 +513,7 @@ + @@ -554,6 +556,7 @@ + diff --git a/SpookyView/SpookyView.vcxproj.filters b/SpookyView/SpookyView.vcxproj.filters index 52d2b7d..e65169d 100644 --- a/SpookyView/SpookyView.vcxproj.filters +++ b/SpookyView/SpookyView.vcxproj.filters @@ -156,6 +156,9 @@ Header Files\Function + + Header Files\Classes\Windows + @@ -233,6 +236,9 @@ Source Files\Function + + Source Files\Classes\Windows + @@ -246,6 +252,9 @@ Resource Files + + Resource Files + diff --git a/SpookyView/notifyicon.bmp b/SpookyView/notifyicon.bmp new file mode 100644 index 0000000000000000000000000000000000000000..111c4cb0f5a8f955769150bd94cf2cc66e27ee9c GIT binary patch literal 87186 zcmeI53)G%fb?1Y#)^w&9TRWpwJ5y(-wQB3MS{1z1RuM04?X**EYrE=bFY0QYT2Zl1 zZ|V|J5S5F9Ttfg6LAeD&$PGxsEnJgu34w4+NCM;@5{Hc`+Xl@^5rJL zI_$O2K6~%8pR@nZKIeJ9H}8Ak?;i8+{U(+F_UHeX^8YmcpUnUJO?p0b(xg9QeD1R+ z)&Hvi^2EC3kFR~;d+S#~A6s)j%oFP#czo^s(#O`^2SbyowCJ}DldX@Swp>@Cdczg% zd+Ql3esrY}Z@NtYO$^I%`~3|M)_4l9f6R>y2A{f(H;16e^{l=Um7P=*Ms0MFD@3jB z!lU#34XjVO5W6kIsGfBNzx9!Op$gTPhdR5lwLVe9D$aEkid(@>vEydpH|LgN8>Omwa$ zROOh(FXJp9hh%M$WEmR>C9dqa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HIX-7a`LTwV?g~z&0cPIuDh>c1Vo6DfJn*c7@?X_N*2vI zbIEm=x?o8~^1u=@M3=^>D+=%O(~W{^N?3Kf&}1e)TU+$qwlvHvx{VVUcNsm?MZqwH zKmd{>h8}ba4N^pt9+1c3t#i*OrC@{`dpNhd79-=T9d*C!GY{J-T0HPAO*dag-cA=FOX??$hqJwN zlBWtr+Ja(P89(iPJbd?ccP>S-%HPn!Y#SQf(qM#-H;WPYC`^Re*D$ii7-aU`BXOQ-6 zGHKG1EBim_I}u!rW;?-3(KF9|K5-@(0VY9;n~r(2j!cA(wjYUzVY<7|tiJvb1?^*Q zTRYmPo9*k!Xc?ZkyqDw&b|(&vc-V^=84Wvo03(40OyDpkMkWq{C-pEvQ1r}`;fXWB zh)hSDQ|Ux1h_<6*Vel Date: Wed, 20 Nov 2024 12:12:34 +0100 Subject: [PATCH 02/15] Fixed typo --- SpookyView/SpookyView.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpookyView/SpookyView.rc b/SpookyView/SpookyView.rc index 02f26fc..ae20528 100644 --- a/SpookyView/SpookyView.rc +++ b/SpookyView/SpookyView.rc @@ -445,7 +445,7 @@ BEGIN DEFPUSHBUTTON "OK",IDOK,177,162,50,14 CONTROL "Geen controle op updates bij starten",IDC_CHECKBOX_DISABLE_UPDATE_CHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,24,227,10 - CONTROL "Toon welkomstsvenster niet bij opstarten",IDC_CHECKBOX_SKIP_WELCOME, + CONTROL "Toon welkomstvenster niet bij opstarten",IDC_CHECKBOX_SKIP_WELCOME, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,42,227,10 END From ac3d3956d43db21545b807cb25237f1a0a3897dd Mon Sep 17 00:00:00 2001 From: Martijn van Antwerpen Date: Wed, 20 Nov 2024 12:15:04 +0100 Subject: [PATCH 03/15] Added newline in header --- SpookyView/SpookyView.rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SpookyView/SpookyView.rc b/SpookyView/SpookyView.rc index ae20528..5115fa9 100644 --- a/SpookyView/SpookyView.rc +++ b/SpookyView/SpookyView.rc @@ -211,7 +211,7 @@ CAPTION "Spooky View" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Close",IDCLOSE,150,226,50,14 - LTEXT "Welcome to\nSpooky View",ID_STATIC_INTRO_TITLE,85,7,115,49 + LTEXT "Welcome to\n\nSpooky View",ID_STATIC_INTRO_TITLE,85,7,115,49 CONTROL IDB_NOTIFYICON,IDC_STATIC,"Static",SS_BITMAP,45,103,121,98 LTEXT "Double-click this app's icon in the notification area or open it again to set up the app.",IDC_INTRO_TEXT,7,77,193,19 CONTROL "Do not show this window again",IDC_SKIP_INTRO_CHECKBOX, @@ -495,7 +495,7 @@ CAPTION "Spooky View" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Sluiten",IDCLOSE,150,226,50,14 - LTEXT "Welkom bij\nSpooky View",ID_STATIC_INTRO_TITLE,85,7,115,49 + LTEXT "Welkom bij\n\nSpooky View",ID_STATIC_INTRO_TITLE,85,7,115,49 CONTROL IDB_NOTIFYICON,IDC_STATIC,"Static",SS_BITMAP,45,103,121,98 LTEXT "Dubbeklik op het icoon van deze app in het systeemvak of open het nogmaals om de app in te stellen.",IDC_INTRO_TEXT,7,77,193,19 CONTROL "Toon dit venster niet opnieuw",IDC_SKIP_INTRO_CHECKBOX, From 636cbab9553fd84c53bb65c4da4925d9e5703e44 Mon Sep 17 00:00:00 2001 From: Martijn van Antwerpen Date: Wed, 20 Nov 2024 12:26:51 +0100 Subject: [PATCH 04/15] Make window closable with close button --- SpookyView/CIntroDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpookyView/CIntroDialog.cpp b/SpookyView/CIntroDialog.cpp index 13a849d..c7eaa3c 100644 --- a/SpookyView/CIntroDialog.cpp +++ b/SpookyView/CIntroDialog.cpp @@ -24,11 +24,11 @@ INT_PTR CALLBACK CIntroDialog::DlgProc(HWND hDlg, UINT message, WPARAM wParam, L return TRUE; case WM_COMMAND: switch (LOWORD(wParam)) { + case IDCANCEL: case IDCLOSE: ApplyChoice(); DestroyWindow(hDlg); return TRUE; - break; case IDC_BUTTON_INTRO_SETTINGS: if (!cSettingsDialog) { From d29523b8a55f71f992af46da7e363eb6ca9e8d5d Mon Sep 17 00:00:00 2001 From: Martijn van Antwerpen Date: Wed, 20 Nov 2024 12:45:23 +0100 Subject: [PATCH 05/15] Added apps button in welcome screen --- SpookyView/CIntroDialog.cpp | 14 ++++++++++++++ SpookyView/CMainWindow.cpp | 5 ++++- SpookyView/Resource.h | 4 ++-- SpookyView/SpookyView.cpp | 1 + SpookyView/SpookyView.h | 1 + SpookyView/SpookyView.rc | 22 ++++++++++++---------- 6 files changed, 34 insertions(+), 13 deletions(-) diff --git a/SpookyView/CIntroDialog.cpp b/SpookyView/CIntroDialog.cpp index c7eaa3c..a4c3937 100644 --- a/SpookyView/CIntroDialog.cpp +++ b/SpookyView/CIntroDialog.cpp @@ -43,6 +43,20 @@ INT_PTR CALLBACK CIntroDialog::DlgProc(HWND hDlg, UINT message, WPARAM wParam, L cSettingsDialog->SetForeground(); } break; + case IDC_BUTTON_SETUP_APPS: + if (!cSetupDialog) + { + cSetupDialog = std::make_unique(this->hInstance, mainHwnd); + } + if (!cSetupDialog->hasInitInstance()) + { + cSetupDialog->InitInstance(); + } + else + { + cSetupDialog->SetForeground(); + } + break; } break; } diff --git a/SpookyView/CMainWindow.cpp b/SpookyView/CMainWindow.cpp index bcca7bf..622eba9 100644 --- a/SpookyView/CMainWindow.cpp +++ b/SpookyView/CMainWindow.cpp @@ -236,7 +236,10 @@ void CMainWindow::OpenSetupDialog() { if (!cSetupDialog) { - cSetupDialog = std::make_unique(this->hInstance, this->hWnd); + cSetupDialog = std::make_unique(this->hInstance, mainHwnd); + } + if (!cSetupDialog->hasInitInstance()) + { cSetupDialog->InitInstance(); } else diff --git a/SpookyView/Resource.h b/SpookyView/Resource.h index db72daf..5e156a0 100644 --- a/SpookyView/Resource.h +++ b/SpookyView/Resource.h @@ -33,7 +33,6 @@ #define IDS_PAUSED 127 #define IDD_INTRO 127 #define IDS_ERROR_CANNOT_CREATE_MAIN_WINDOW 128 -#define IDD_INTRO1 128 #define IDS_ERROR_CANNOT_CREATE_NOTIFICATION_AREA_ICON 129 #define IDS_ERROR_CANNOT_CREATE_REGISTRY_KEY 130 #define IDB_NOTIFYICON 131 @@ -57,6 +56,7 @@ #define IDC_SKIP_INTRO_CHECKBOX 1015 #define IDC_BUTTON_INTRO_SETTINGS 1016 #define ID_STATIC_INTRO_TITLE 1018 +#define IDC_BUTTON_SETUP_APPS 1020 #define IDC_LIST_ADD_APPS 40000 #define IDC_LIST_ADD_WINDOWS 40000 #define IDC_LIST_APPS 40000 @@ -93,7 +93,7 @@ #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 131 #define _APS_NEXT_COMMAND_VALUE 40017 -#define _APS_NEXT_CONTROL_VALUE 1019 +#define _APS_NEXT_CONTROL_VALUE 1021 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/SpookyView/SpookyView.cpp b/SpookyView/SpookyView.cpp index fe1143d..ebd8700 100644 --- a/SpookyView/SpookyView.cpp +++ b/SpookyView/SpookyView.cpp @@ -15,6 +15,7 @@ HICON spookyIcon; PGNSI isImmersive; std::unique_ptr mainWindow; std::unique_ptr cSettingsDialog; +std::unique_ptr cSetupDialog; std::unique_ptr settingsManager; UpdateResponse updateResponse; WindowsEnum windowsEnum; diff --git a/SpookyView/SpookyView.h b/SpookyView/SpookyView.h index 8a66228..c5e179e 100644 --- a/SpookyView/SpookyView.h +++ b/SpookyView/SpookyView.h @@ -12,6 +12,7 @@ extern HWND mainHwnd; extern std::unique_ptr settingsManager; extern std::unique_ptr mainWindow; extern std::unique_ptr cSettingsDialog; +extern std::unique_ptr cSetupDialog; extern WindowsEnum windowsEnum; extern PGNSI isImmersive; extern bool isWindows8; diff --git a/SpookyView/SpookyView.rc b/SpookyView/SpookyView.rc index 5115fa9..79c50f5 100644 --- a/SpookyView/SpookyView.rc +++ b/SpookyView/SpookyView.rc @@ -205,19 +205,20 @@ BEGIN LTEXT "Message!",IDC_UPDATE_MESSAGE,7,7,245,85,NOT WS_GROUP END -IDD_INTRO DIALOGEX 0, 0, 207, 247 +IDD_INTRO DIALOGEX 0, 0, 207, 255 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Spooky View" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "Close",IDCLOSE,150,226,50,14 + DEFPUSHBUTTON "Close",IDCLOSE,150,234,50,14 LTEXT "Welcome to\n\nSpooky View",ID_STATIC_INTRO_TITLE,85,7,115,49 CONTROL IDB_NOTIFYICON,IDC_STATIC,"Static",SS_BITMAP,45,103,121,98 LTEXT "Double-click this app's icon in the notification area or open it again to set up the app.",IDC_INTRO_TEXT,7,77,193,19 CONTROL "Do not show this window again",IDC_SKIP_INTRO_CHECKBOX, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,211,115,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,238,115,10 CONTROL IDB_SPOOK,IDC_STATIC,"Static",SS_BITMAP,7,7,67,62 - PUSHBUTTON "Open settings...",IDC_BUTTON_INTRO_SETTINGS,7,226,82,14 + PUSHBUTTON "Open settings...",IDC_BUTTON_INTRO_SETTINGS,118,211,82,14 + PUSHBUTTON "Setup apps...",IDC_BUTTON_SETUP_APPS,7,211,82,14 END @@ -302,7 +303,7 @@ BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 200 TOPMARGIN, 7 - BOTTOMMARGIN, 240 + BOTTOMMARGIN, 248 END END #endif // APSTUDIO_INVOKED @@ -489,19 +490,20 @@ BEGIN LTEXT "Bericht!",IDC_UPDATE_MESSAGE,7,7,245,85,NOT WS_GROUP END -IDD_INTRO DIALOGEX 0, 0, 207, 247 +IDD_INTRO DIALOGEX 0, 0, 207, 255 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Spooky View" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "Sluiten",IDCLOSE,150,226,50,14 + DEFPUSHBUTTON "Sluiten",IDCLOSE,150,234,50,14 LTEXT "Welkom bij\n\nSpooky View",ID_STATIC_INTRO_TITLE,85,7,115,49 CONTROL IDB_NOTIFYICON,IDC_STATIC,"Static",SS_BITMAP,45,103,121,98 LTEXT "Dubbeklik op het icoon van deze app in het systeemvak of open het nogmaals om de app in te stellen.",IDC_INTRO_TEXT,7,77,193,19 CONTROL "Toon dit venster niet opnieuw",IDC_SKIP_INTRO_CHECKBOX, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,211,111,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,238,111,10 CONTROL IDB_SPOOK,IDC_STATIC,"Static",SS_BITMAP,7,7,67,62 - PUSHBUTTON "Open instellingen...",IDC_BUTTON_INTRO_SETTINGS,7,226,82,14 + PUSHBUTTON "Open instellingen...",IDC_BUTTON_INTRO_SETTINGS,118,211,82,14 + PUSHBUTTON "Stel apps in...",IDC_BUTTON_SETUP_APPS,7,211,82,14 END @@ -586,7 +588,7 @@ BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 200 TOPMARGIN, 7 - BOTTOMMARGIN, 240 + BOTTOMMARGIN, 248 END END #endif // APSTUDIO_INVOKED From 5884e3d5400e9978c6bb850fe4abc217a796f116 Mon Sep 17 00:00:00 2001 From: Martijn van Antwerpen Date: Wed, 20 Nov 2024 12:55:58 +0100 Subject: [PATCH 06/15] Removed unused text and methods --- SpookyView/AppMain.cpp | 35 ----------------------------------- SpookyView/AppMain.h | 1 - SpookyView/CMainWindow.cpp | 16 ---------------- SpookyView/CMainWindow.h | 1 - SpookyView/Resource.h | 6 ------ SpookyView/SpookyView.cpp | 1 - SpookyView/SpookyView.h | 1 - SpookyView/SpookyView.rc | 16 ---------------- 8 files changed, 77 deletions(-) diff --git a/SpookyView/AppMain.cpp b/SpookyView/AppMain.cpp index 099d99a..7284e98 100644 --- a/SpookyView/AppMain.cpp +++ b/SpookyView/AppMain.cpp @@ -56,7 +56,6 @@ int AppMain::Run() return FALSE; } GetIsWindows8(); - GetIsWindows10orNewer(); windowsEnum.CreateHook(); settingsManager = std::make_unique(); if (!settingsManager->Init()) @@ -164,37 +163,3 @@ void AppMain::GetIsWindows8() OutputDebugString(isWindows8 ? _T("Running on Windows 8 or 8.1\r\n") : _T("Not running on Windows 8 or 8.1\r\n")); #endif } - -void AppMain::GetIsWindows10orNewer() -{ - OSVERSIONINFOEX osvi; - DWORDLONG dwlConditionMask = 0; - - // Initialize the OSVERSIONINFOEX structure. - - ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); - osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - osvi.dwMajorVersion = 10; - osvi.dwMinorVersion = 0; - osvi.wServicePackMajor = 0; - osvi.wServicePackMinor = 0; - - // Initialize the condition mask. - - VER_SET_CONDITION(dwlConditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL); - VER_SET_CONDITION(dwlConditionMask, VER_MINORVERSION, VER_GREATER_EQUAL); - VER_SET_CONDITION(dwlConditionMask, VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL); - VER_SET_CONDITION(dwlConditionMask, VER_SERVICEPACKMINOR, VER_GREATER_EQUAL); - - // Perform the test. - - isWindows10orNewer = VerifyVersionInfo( - &osvi, - VER_MAJORVERSION | VER_MINORVERSION | - VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - dwlConditionMask - ); -#ifdef _DEBUG - OutputDebugString(isWindows10orNewer ? _T("Running on Windows 10 or newer\r\n") : _T("Not running on Windows 10 or newer\r\n")); -#endif -} diff --git a/SpookyView/AppMain.h b/SpookyView/AppMain.h index 151ec1c..ac44418 100644 --- a/SpookyView/AppMain.h +++ b/SpookyView/AppMain.h @@ -9,7 +9,6 @@ class AppMain void LoadFunctionAdresses(); void SendAlreadyRunningNotify(); void GetIsWindows8(); - void GetIsWindows10orNewer(); }; #endif \ No newline at end of file diff --git a/SpookyView/CMainWindow.cpp b/SpookyView/CMainWindow.cpp index 622eba9..ba45965 100644 --- a/SpookyView/CMainWindow.cpp +++ b/SpookyView/CMainWindow.cpp @@ -248,22 +248,6 @@ void CMainWindow::OpenSetupDialog() } } -void CMainWindow::ShowAlreadyRunningBalloon() -{ - TCHAR titleString[100]; - TCHAR messageString[100]; - LoadString(hInst, IDS_ALREADY_RUNNING, titleString, sizeof(titleString) / sizeof(TCHAR)); - if (isWindows10orNewer) - { - LoadString(hInst, DS_ALREADY_RUNNING_HINT_WIN10, messageString, sizeof(messageString) / sizeof(TCHAR)); - } - else - { - LoadString(hInst, DS_ALREADY_RUNNING_HINT, messageString, sizeof(messageString) / sizeof(TCHAR)); - } - cNotifyIcon->ShowBalloon(titleString, messageString); -} - void CMainWindow::CheckIsFirstRun() { if (!settingsManager->GetSkipWelcome()) diff --git a/SpookyView/CMainWindow.h b/SpookyView/CMainWindow.h index 32af14a..59ecfdb 100644 --- a/SpookyView/CMainWindow.h +++ b/SpookyView/CMainWindow.h @@ -22,7 +22,6 @@ class CMainWindow: public CWindow void OpenContextMenu(); void OpenSetupDialog(); void CloseWindow(); - void ShowAlreadyRunningBalloon(); HMENU GetContextMenu(); //Members TCHAR pausedString[80]; diff --git a/SpookyView/Resource.h b/SpookyView/Resource.h index 5e156a0..2718260 100644 --- a/SpookyView/Resource.h +++ b/SpookyView/Resource.h @@ -22,14 +22,8 @@ #define IDS_ERROR_CANNOT_SAVE_SETTINGS 119 #define IDD_ADD_WINDOW 120 #define IDS_ERROR_TITLE 120 -#define IDS_ALREADY_RUNNING 121 #define IDB_SPOOK 122 -#define DS_ALREADY_RUNNING_HINT_WIN10 122 -#define DS_ALREADY_RUNNING_HINT 123 #define IDI_SPOOKYVIEW 124 -#define IDS_WELCOME_TITLE 124 -#define IDS_WELCOME_MESSAGE 125 -#define IDS_WELCOME_MESSAGE_WIN10 126 #define IDS_PAUSED 127 #define IDD_INTRO 127 #define IDS_ERROR_CANNOT_CREATE_MAIN_WINDOW 128 diff --git a/SpookyView/SpookyView.cpp b/SpookyView/SpookyView.cpp index ebd8700..44db3a3 100644 --- a/SpookyView/SpookyView.cpp +++ b/SpookyView/SpookyView.cpp @@ -20,7 +20,6 @@ std::unique_ptr settingsManager; UpdateResponse updateResponse; WindowsEnum windowsEnum; bool isWindows8; -bool isWindows10orNewer; int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPTSTR lpCmdLine, _In_ int nCmdShow) { diff --git a/SpookyView/SpookyView.h b/SpookyView/SpookyView.h index c5e179e..a3a720d 100644 --- a/SpookyView/SpookyView.h +++ b/SpookyView/SpookyView.h @@ -16,7 +16,6 @@ extern std::unique_ptr cSetupDialog; extern WindowsEnum windowsEnum; extern PGNSI isImmersive; extern bool isWindows8; -extern bool isWindows10orNewer; extern UpdateResponse updateResponse; #endif \ No newline at end of file diff --git a/SpookyView/SpookyView.rc b/SpookyView/SpookyView.rc index 79c50f5..dec809a 100644 --- a/SpookyView/SpookyView.rc +++ b/SpookyView/SpookyView.rc @@ -339,14 +339,6 @@ BEGIN IDS_ERROR_CANNOT_SAVE_SETTINGS "Could not save settings. Modifications are not stored." IDS_ERROR_TITLE "Error" - IDS_ALREADY_RUNNING "Spooky View is already running" - DS_ALREADY_RUNNING_HINT_WIN10 - "Right click on the icon in the notification area to configure this application." - DS_ALREADY_RUNNING_HINT "Right click on this icon to configure this application." - IDS_WELCOME_TITLE "Welcome to Spooky View" - IDS_WELCOME_MESSAGE "Right click on this icon to configure this application." - IDS_WELCOME_MESSAGE_WIN10 - "Right click on the icon in the notification area to configure this application." IDS_PAUSED "Paused" END @@ -624,14 +616,6 @@ BEGIN IDS_ERROR_CANNOT_SAVE_SETTINGS "Kon instellingen niet opslaan. Wijzigingen zijn niet opgeslagen." IDS_ERROR_TITLE "Fout" - IDS_ALREADY_RUNNING "Spooky View is al actief" - DS_ALREADY_RUNNING_HINT_WIN10 - "Klik met de rechtermuisknop op het icoon in het systeemvak om dit programma in te stellen." - DS_ALREADY_RUNNING_HINT "Klik met de rechtermuisknop op dit icoon om dit programma in te stellen." - IDS_WELCOME_TITLE "Welkom bij Spooky View" - IDS_WELCOME_MESSAGE "Klik met de rechtermuisknop op dit icoon om dit programma in te stellen." - IDS_WELCOME_MESSAGE_WIN10 - "Klik met de rechtermuisknop op het icoon in het systeemvak om dit programma in te stellen." IDS_PAUSED "Gepauzeerd" END From c90116ce8c722fdb98f002fad74cce0163a83b35 Mon Sep 17 00:00:00 2001 From: Martijn van Antwerpen Date: Wed, 20 Nov 2024 13:10:05 +0100 Subject: [PATCH 07/15] Use global variable --- SpookyView/CMainWindow.h | 1 - 1 file changed, 1 deletion(-) diff --git a/SpookyView/CMainWindow.h b/SpookyView/CMainWindow.h index 59ecfdb..1197d45 100644 --- a/SpookyView/CMainWindow.h +++ b/SpookyView/CMainWindow.h @@ -29,7 +29,6 @@ class CMainWindow: public CWindow BOOL hasDoubleClicked; std::unique_ptr cNotifyIcon; HMENU notifyIconContextMenu; - std::unique_ptr cSetupDialog; std::unique_ptr cAboutDialog; std::unique_ptr cUpdateAvailableDialog; std::unique_ptr cIntroDialog; From 7231f399f0869353cba5e94e7cbf5cfc1ca6aa0c Mon Sep 17 00:00:00 2001 From: Martijn van Antwerpen Date: Wed, 20 Nov 2024 13:45:58 +0100 Subject: [PATCH 08/15] Update version number --- SpookyView/SpookyView.rc | 16 ++++++++-------- StorePackaging/Package.appxmanifest | 2 +- WiXSetup/Product.wxs | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/SpookyView/SpookyView.rc b/SpookyView/SpookyView.rc index dec809a..8ff9ea6 100644 --- a/SpookyView/SpookyView.rc +++ b/SpookyView/SpookyView.rc @@ -117,7 +117,7 @@ BEGIN LTEXT "https://www.tyndomyn.net",IDC_STATIC,12,78,130,8 LTEXT "Based on an idea by Mikey",IDC_STATIC,12,102,130,8 LTEXT "Spooky View",IDC_STATIC,12,6,130,8,SS_NOPREFIX - LTEXT "1.0.6.0 (Nicely spoken release)",IDC_STATIC,12,18,136,18 + LTEXT "1.0.7.0 (A warm welcome release)",IDC_STATIC,12,18,136,18 LTEXT "Copyright (c) 2022 Martijn van Antwerpen",IDC_STATIC,12,66,138,8 DEFPUSHBUTTON "Close",IDOK,180,114,50,14,WS_GROUP CONTROL IDB_SPOOK,IDC_SPOOK_IMAGE,"Static",SS_BITMAP,162,6,67,62 @@ -228,8 +228,8 @@ END // 1 VERSIONINFO - FILEVERSION 1,0,6,0 - PRODUCTVERSION 1,0,6,0 + FILEVERSION 1,0,7,0 + PRODUCTVERSION 1,0,7,0 FILEFLAGSMASK 0x2L #ifdef _DEBUG FILEFLAGS 0x1L @@ -247,12 +247,12 @@ BEGIN VALUE "Comments", "This application is licensed under the GNU GPL v3.0 or later" VALUE "CompanyName", "TynDomyn.net" VALUE "FileDescription", "Spooky View" - VALUE "FileVersion", "1.0.6.0 (Nicely spoken release)" + VALUE "FileVersion", "1.0.7.0 (A warm welcome release)" VALUE "InternalName", "Spooky View" VALUE "LegalCopyright", "(c) Martijn van Antwerpen" VALUE "OriginalFilename", "Spookyview.exe" VALUE "ProductName", "Spooky View" - VALUE "ProductVersion", "1.0.6.0 (Nicely spoken release)" + VALUE "ProductVersion", "1.0.7.0 (A warm welcome release)" END END BLOCK "VarFileInfo" @@ -394,7 +394,7 @@ BEGIN LTEXT "https://www.tyndomyn.net",IDC_STATIC,12,78,130,8 LTEXT "Gebaseerd op een idee van Mikey",IDC_STATIC,12,102,130,8 LTEXT "Spooky View",IDC_STATIC,12,6,130,8,SS_NOPREFIX - LTEXT "1.0.6.0 (Nicely spoken release)",IDC_STATIC,12,18,136,18 + LTEXT "1.0.7.0 (A warm welcome release)",IDC_STATIC,12,18,136,18 LTEXT "Copyright (c) 2022 Martijn van Antwerpen",IDC_STATIC,12,66,138,8 DEFPUSHBUTTON "Sluiten",IDOK,180,114,50,14,WS_GROUP CONTROL IDB_SPOOK,IDC_SPOOK_IMAGE,"Static",SS_BITMAP,162,6,67,62 @@ -524,12 +524,12 @@ BEGIN VALUE "Comments", "Deze toepassing valt onder de GNU GPL v3.0-licentie of hoger" VALUE "CompanyName", "TynDomyn.net" VALUE "FileDescription", "Spooky View" - VALUE "FileVersion", "1.0.6.0 (Nicely spoken release)" + VALUE "FileVersion", "1.0.7.0 (A warm welcome release)" VALUE "InternalName", "Spooky View" VALUE "LegalCopyright", "(c) Martijn van Antwerpen" VALUE "OriginalFilename", "Spookyview.exe" VALUE "ProductName", "Spooky View" - VALUE "ProductVersion", "1.0.6.0 (Nicely spoken release)" + VALUE "ProductVersion", "1.0.7.0 (A warm welcome release)" END END BLOCK "VarFileInfo" diff --git a/StorePackaging/Package.appxmanifest b/StorePackaging/Package.appxmanifest index 30d8d6f..b2b499b 100644 --- a/StorePackaging/Package.appxmanifest +++ b/StorePackaging/Package.appxmanifest @@ -1,6 +1,6 @@  - + Spooky View LittleTijn diff --git a/WiXSetup/Product.wxs b/WiXSetup/Product.wxs index 4f28dce..d75d0ae 100644 --- a/WiXSetup/Product.wxs +++ b/WiXSetup/Product.wxs @@ -1,5 +1,5 @@  - + From 1251014556b016fbd3f31740ad30e5b3b247a896 Mon Sep 17 00:00:00 2001 From: Martijn van Antwerpen Date: Wed, 20 Nov 2024 13:58:33 +0100 Subject: [PATCH 09/15] Added menu item for intro --- SpookyView/CMainWindow.cpp | 15 +++++++++++++++ SpookyView/Resource.h | 3 ++- SpookyView/SpookyView.rc | 26 ++++++++++++++------------ 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/SpookyView/CMainWindow.cpp b/SpookyView/CMainWindow.cpp index ba45965..0aef1f1 100644 --- a/SpookyView/CMainWindow.cpp +++ b/SpookyView/CMainWindow.cpp @@ -193,6 +193,21 @@ LRESULT CALLBACK CMainWindow::WndProc(HWND hWnd, UINT message, WPARAM wParam, LP } return FALSE; + case IDM_INTRO: + if (!cIntroDialog) + { + cIntroDialog = std::make_unique(this->hInstance, mainHwnd); + } + if (!cIntroDialog->hasInitInstance()) + { + cIntroDialog->InitInstance(); + } + else + { + cIntroDialog->SetForeground(); + } + return false; + case IDM_EXIT: DestroyWindow(this->hWnd); return FALSE; diff --git a/SpookyView/Resource.h b/SpookyView/Resource.h index 2718260..1316190 100644 --- a/SpookyView/Resource.h +++ b/SpookyView/Resource.h @@ -79,6 +79,7 @@ #define IDC_STATIC_APPS 40014 #define IDC_STATIC_TRANSPARENCY 40015 #define IDC_SLIDER_BACKGROUND 40016 +#define IDM_INTRO 40019 // Next default values for new objects // @@ -86,7 +87,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 131 -#define _APS_NEXT_COMMAND_VALUE 40017 +#define _APS_NEXT_COMMAND_VALUE 40020 #define _APS_NEXT_CONTROL_VALUE 1021 #define _APS_NEXT_SYMED_VALUE 101 #endif diff --git a/SpookyView/SpookyView.rc b/SpookyView/SpookyView.rc index 8ff9ea6..1e00a3c 100644 --- a/SpookyView/SpookyView.rc +++ b/SpookyView/SpookyView.rc @@ -92,13 +92,14 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US IDC_SPOOKYVIEW MENUEX BEGIN - POPUP "ContextMenu", 0,MFT_STRING,MFS_ENABLED + POPUP "ContextMenu", 0, MFT_STRING, MFS_ENABLED BEGIN - MENUITEM "&Open...", IDM_OPEN,MFT_STRING,MFS_ENABLED | MFS_UNCHECKED | MFS_UNHILITE | MFS_DEFAULT - MENUITEM "Settings...", IDM_SETTINGS,MFT_STRING,MFS_ENABLED - MENUITEM "&About...", IDM_ABOUT,MFT_STRING,MFS_ENABLED - MENUITEM "&Pause", IDM_PAUSE,MFT_STRING,MFS_ENABLED - MENUITEM "&Exit", IDM_EXIT,MFT_STRING,MFS_ENABLED + MENUITEM "&Open...", IDM_OPEN, MFT_STRING, MFS_ENABLED | MFS_UNCHECKED | MFS_UNHILITE | MFS_DEFAULT + MENUITEM "Settings...", IDM_SETTINGS, MFT_STRING, MFS_ENABLED + MENUITEM "Introduction...", IDM_INTRO, MFT_STRING, MFS_ENABLED + MENUITEM "&About...", IDM_ABOUT, MFT_STRING, MFS_ENABLED + MENUITEM "&Pause", IDM_PAUSE, MFT_STRING, MFS_ENABLED + MENUITEM "&Exit", IDM_EXIT, MFT_STRING, MFS_ENABLED END END @@ -369,13 +370,14 @@ LANGUAGE LANG_DUTCH, SUBLANG_DUTCH IDC_SPOOKYVIEW MENUEX BEGIN - POPUP "ContextMenu", 0,MFT_STRING,MFS_ENABLED + POPUP "ContextMenu", 0, MFT_STRING, MFS_ENABLED BEGIN - MENUITEM "&Openen...", IDM_OPEN,MFT_STRING,MFS_ENABLED | MFS_UNCHECKED | MFS_UNHILITE | MFS_DEFAULT - MENUITEM "Instellingen...", IDM_SETTINGS,MFT_STRING,MFS_ENABLED - MENUITEM "&Over...", IDM_ABOUT,MFT_STRING,MFS_ENABLED - MENUITEM "&Pauzeren", IDM_PAUSE,MFT_STRING,MFS_ENABLED - MENUITEM "&Sluiten", IDM_EXIT,MFT_STRING,MFS_ENABLED + MENUITEM "&Openen...", IDM_OPEN, MFT_STRING, MFS_ENABLED | MFS_UNCHECKED | MFS_UNHILITE | MFS_DEFAULT + MENUITEM "Instellingen...", IDM_SETTINGS, MFT_STRING, MFS_ENABLED + MENUITEM "Introductie...", IDM_INTRO, MFT_STRING, MFS_ENABLED + MENUITEM "&Over...", IDM_ABOUT, MFT_STRING, MFS_ENABLED + MENUITEM "&Pauzeren", IDM_PAUSE, MFT_STRING, MFS_ENABLED + MENUITEM "&Sluiten", IDM_EXIT, MFT_STRING, MFS_ENABLED END END From ec628731c01f887e6a65b17b1f4a2d72b405884c Mon Sep 17 00:00:00 2001 From: Martijn van Antwerpen Date: Wed, 20 Nov 2024 14:00:52 +0100 Subject: [PATCH 10/15] Changed text --- SpookyView/SpookyView.rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SpookyView/SpookyView.rc b/SpookyView/SpookyView.rc index 1e00a3c..a252e3f 100644 --- a/SpookyView/SpookyView.rc +++ b/SpookyView/SpookyView.rc @@ -214,7 +214,7 @@ BEGIN DEFPUSHBUTTON "Close",IDCLOSE,150,234,50,14 LTEXT "Welcome to\n\nSpooky View",ID_STATIC_INTRO_TITLE,85,7,115,49 CONTROL IDB_NOTIFYICON,IDC_STATIC,"Static",SS_BITMAP,45,103,121,98 - LTEXT "Double-click this app's icon in the notification area or open it again to set up the app.",IDC_INTRO_TEXT,7,77,193,19 + LTEXT "Double-click this app's icon in the notification area or open the app again to set it up.",IDC_INTRO_TEXT,7,77,193,19 CONTROL "Do not show this window again",IDC_SKIP_INTRO_CHECKBOX, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,238,115,10 CONTROL IDB_SPOOK,IDC_STATIC,"Static",SS_BITMAP,7,7,67,62 @@ -492,7 +492,7 @@ BEGIN DEFPUSHBUTTON "Sluiten",IDCLOSE,150,234,50,14 LTEXT "Welkom bij\n\nSpooky View",ID_STATIC_INTRO_TITLE,85,7,115,49 CONTROL IDB_NOTIFYICON,IDC_STATIC,"Static",SS_BITMAP,45,103,121,98 - LTEXT "Dubbeklik op het icoon van deze app in het systeemvak of open het nogmaals om de app in te stellen.",IDC_INTRO_TEXT,7,77,193,19 + LTEXT "Dubbeklik op het icoon van deze app in het systeemvak of open de app nogmaals om deze in te stellen.",IDC_INTRO_TEXT,7,77,193,19 CONTROL "Toon dit venster niet opnieuw",IDC_SKIP_INTRO_CHECKBOX, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,238,111,10 CONTROL IDB_SPOOK,IDC_STATIC,"Static",SS_BITMAP,7,7,67,62 From 01a692daf7b1149c2b823a48092fdf7135a74b2d Mon Sep 17 00:00:00 2001 From: Martijn van Antwerpen Date: Wed, 20 Nov 2024 14:04:27 +0100 Subject: [PATCH 11/15] Set state of checkbox on selected value --- SpookyView/CIntroDialog.cpp | 11 +++++++++-- SpookyView/CIntroDialog.h | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/SpookyView/CIntroDialog.cpp b/SpookyView/CIntroDialog.cpp index a4c3937..af16d67 100644 --- a/SpookyView/CIntroDialog.cpp +++ b/SpookyView/CIntroDialog.cpp @@ -20,7 +20,7 @@ INT_PTR CALLBACK CIntroDialog::DlgProc(HWND hDlg, UINT message, WPARAM wParam, L switch (message) { case WM_INITDIALOG: - SetStyle(hDlg); + SetupWindow(hDlg); return TRUE; case WM_COMMAND: switch (LOWORD(wParam)) { @@ -63,8 +63,9 @@ INT_PTR CALLBACK CIntroDialog::DlgProc(HWND hDlg, UINT message, WPARAM wParam, L return FALSE; } -void CIntroDialog::SetStyle(HWND hDlg) +void CIntroDialog::SetupWindow(HWND hDlg) { + //Set font of header ZeroMemory(&introFont, sizeof(LOGFONT)); introFont.lfHeight = 20; introFont.lfWeight = FW_BOLD; @@ -74,6 +75,12 @@ void CIntroDialog::SetStyle(HWND hDlg) HWND introStaticText = GetDlgItem(hDlg, ID_STATIC_INTRO_TITLE); SetWindowFont(introStaticText, hFont, TRUE); } + //Set state of checkbox + HWND skipIntroCheckbox = GetDlgItem(hDlg, IDC_SKIP_INTRO_CHECKBOX); + if (settingsManager->GetSkipWelcome()) + { + Button_SetCheck(skipIntroCheckbox, TRUE); + } } void CIntroDialog::ApplyChoice() diff --git a/SpookyView/CIntroDialog.h b/SpookyView/CIntroDialog.h index 4aa422a..70a41b3 100644 --- a/SpookyView/CIntroDialog.h +++ b/SpookyView/CIntroDialog.h @@ -11,7 +11,7 @@ class CIntroDialog :public CModelessDialog protected: BOOL SetupDialog(); LOGFONT introFont; - void SetStyle(HWND hDlg); + void SetupWindow(HWND hDlg); void ApplyChoice(); }; From 6bb32230c8c210222c3ae926c31f29a75c7f78ee Mon Sep 17 00:00:00 2001 From: Martijn van Antwerpen Date: Wed, 20 Nov 2024 14:33:21 +0100 Subject: [PATCH 12/15] Set checkbox in intro on selected value in settings --- SpookyView/CIntroDialog.cpp | 14 +++++++++----- SpookyView/CIntroDialog.h | 1 + SpookyView/CMainWindow.cpp | 3 ++- SpookyView/CMainWindow.h | 1 - SpookyView/CRegistrySettingsManager.cpp | 4 ++-- SpookyView/CRegistrySettingsManager.h | 2 +- SpookyView/CSettingsDialog.cpp | 7 ++++++- SpookyView/SpookyView.cpp | 1 + SpookyView/SpookyView.h | 1 + 9 files changed, 23 insertions(+), 11 deletions(-) diff --git a/SpookyView/CIntroDialog.cpp b/SpookyView/CIntroDialog.cpp index af16d67..18d280d 100644 --- a/SpookyView/CIntroDialog.cpp +++ b/SpookyView/CIntroDialog.cpp @@ -77,7 +77,8 @@ void CIntroDialog::SetupWindow(HWND hDlg) } //Set state of checkbox HWND skipIntroCheckbox = GetDlgItem(hDlg, IDC_SKIP_INTRO_CHECKBOX); - if (settingsManager->GetSkipWelcome()) + BOOL skipValue = settingsManager->GetSkipWelcome(); + if (skipValue == 1) { Button_SetCheck(skipIntroCheckbox, TRUE); } @@ -86,8 +87,11 @@ void CIntroDialog::SetupWindow(HWND hDlg) void CIntroDialog::ApplyChoice() { HWND skipIntroCheckbox = GetDlgItem(hWnd, IDC_SKIP_INTRO_CHECKBOX); - if (Button_GetCheck(skipIntroCheckbox)) - { - settingsManager->SetSkipWelcome(TRUE); - } + settingsManager->SetSkipWelcome(Button_GetCheck(skipIntroCheckbox)); +} + +void CIntroDialog::setSkipWelcomeCheckbox(BOOL state) +{ + HWND skipIntroCheckbox = GetDlgItem(hWnd, IDC_SKIP_INTRO_CHECKBOX); + Button_SetCheck(skipIntroCheckbox, state); } diff --git a/SpookyView/CIntroDialog.h b/SpookyView/CIntroDialog.h index 70a41b3..1f33ab0 100644 --- a/SpookyView/CIntroDialog.h +++ b/SpookyView/CIntroDialog.h @@ -8,6 +8,7 @@ class CIntroDialog :public CModelessDialog public: CIntroDialog(HINSTANCE hInstance, HWND hParent); INT_PTR CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); + void setSkipWelcomeCheckbox(BOOL state); protected: BOOL SetupDialog(); LOGFONT introFont; diff --git a/SpookyView/CMainWindow.cpp b/SpookyView/CMainWindow.cpp index 0aef1f1..2033f54 100644 --- a/SpookyView/CMainWindow.cpp +++ b/SpookyView/CMainWindow.cpp @@ -265,7 +265,8 @@ void CMainWindow::OpenSetupDialog() void CMainWindow::CheckIsFirstRun() { - if (!settingsManager->GetSkipWelcome()) + int skipValue = settingsManager->GetSkipWelcome(); + if (skipValue == 0 || skipValue == -1) { cIntroDialog = std::make_unique(this->hInstance, this->hWnd); cIntroDialog->InitInstance(); diff --git a/SpookyView/CMainWindow.h b/SpookyView/CMainWindow.h index 1197d45..5df622f 100644 --- a/SpookyView/CMainWindow.h +++ b/SpookyView/CMainWindow.h @@ -31,7 +31,6 @@ class CMainWindow: public CWindow HMENU notifyIconContextMenu; std::unique_ptr cAboutDialog; std::unique_ptr cUpdateAvailableDialog; - std::unique_ptr cIntroDialog; }; #endif \ No newline at end of file diff --git a/SpookyView/CRegistrySettingsManager.cpp b/SpookyView/CRegistrySettingsManager.cpp index da43a11..30a4883 100644 --- a/SpookyView/CRegistrySettingsManager.cpp +++ b/SpookyView/CRegistrySettingsManager.cpp @@ -309,14 +309,14 @@ void CRegistrySettingsManager::SetDisableUpdateCheck(BOOL state) SaveValue(_T("Software\\Spooky View"), _T("Disable update check"), REG_BINARY, &stateByte); } -BOOL CRegistrySettingsManager::GetSkipWelcome() +int CRegistrySettingsManager::GetSkipWelcome() { BYTE keyData[1]; if (ReadValue(_T("Software\\Spooky View"), _T("Skip welcome"), REG_BINARY, keyData, sizeof(keyData))) { return keyData[0]; } - return FALSE; + return -1; } void CRegistrySettingsManager::SetSkipWelcome(BOOL state) diff --git a/SpookyView/CRegistrySettingsManager.h b/SpookyView/CRegistrySettingsManager.h index 72ae60c..7ae1731 100644 --- a/SpookyView/CRegistrySettingsManager.h +++ b/SpookyView/CRegistrySettingsManager.h @@ -18,7 +18,7 @@ class CRegistrySettingsManager : public ISettingsManager BOOL ShouldSkipVersion(tstring versionNumber); BOOL GetDisableUpdateCheck(); void SetDisableUpdateCheck(BOOL state); - BOOL GetSkipWelcome(); + int GetSkipWelcome(); void SetSkipWelcome(BOOL state); protected: std::unique_ptr settings; diff --git a/SpookyView/CSettingsDialog.cpp b/SpookyView/CSettingsDialog.cpp index dc43ac7..cd0567e 100644 --- a/SpookyView/CSettingsDialog.cpp +++ b/SpookyView/CSettingsDialog.cpp @@ -54,12 +54,17 @@ void CSettingsDialog::ApplySettings() settingsManager->SetDisableUpdateCheck(Button_GetCheck(disableUpdateCheck)); HWND skipIntroCheck = GetDlgItem(hWnd, IDC_CHECKBOX_SKIP_WELCOME); settingsManager->SetSkipWelcome(Button_GetCheck(skipIntroCheck)); + if (cIntroDialog && cIntroDialog->hasInitInstance()) + { + cIntroDialog->setSkipWelcomeCheckbox(Button_GetCheck(skipIntroCheck)); + } } void CSettingsDialog::SetFormValues(HWND hDlg) { HWND skipIntroCheckbox = GetDlgItem(hDlg, IDC_CHECKBOX_SKIP_WELCOME); - if (settingsManager->GetSkipWelcome()) + int skipValue = settingsManager->GetSkipWelcome(); + if (skipValue == 1) { Button_SetCheck(skipIntroCheckbox, TRUE); } diff --git a/SpookyView/SpookyView.cpp b/SpookyView/SpookyView.cpp index 44db3a3..556af75 100644 --- a/SpookyView/SpookyView.cpp +++ b/SpookyView/SpookyView.cpp @@ -16,6 +16,7 @@ PGNSI isImmersive; std::unique_ptr mainWindow; std::unique_ptr cSettingsDialog; std::unique_ptr cSetupDialog; +std::unique_ptr cIntroDialog; std::unique_ptr settingsManager; UpdateResponse updateResponse; WindowsEnum windowsEnum; diff --git a/SpookyView/SpookyView.h b/SpookyView/SpookyView.h index a3a720d..fc472d1 100644 --- a/SpookyView/SpookyView.h +++ b/SpookyView/SpookyView.h @@ -13,6 +13,7 @@ extern std::unique_ptr settingsManager; extern std::unique_ptr mainWindow; extern std::unique_ptr cSettingsDialog; extern std::unique_ptr cSetupDialog; +extern std::unique_ptr cIntroDialog; extern WindowsEnum windowsEnum; extern PGNSI isImmersive; extern bool isWindows8; From e0baad27db09f54522912a78e21113ad34d6348b Mon Sep 17 00:00:00 2001 From: Martijn van Antwerpen Date: Wed, 20 Nov 2024 14:45:18 +0100 Subject: [PATCH 13/15] Prevent settings transparency on own process --- SpookyView/WindowsEnum.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SpookyView/WindowsEnum.cpp b/SpookyView/WindowsEnum.cpp index c3617fd..454452b 100644 --- a/SpookyView/WindowsEnum.cpp +++ b/SpookyView/WindowsEnum.cpp @@ -283,6 +283,10 @@ BOOL WindowsEnum::GetWindowProcessAndClass(HWND hwnd) { BOOL result = FALSE; GetWindowThreadProcessId(hwnd, &processId); + if (processId == GetCurrentProcessId()) + { + return FALSE; + } HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, processId); if (hProcess != NULL) { From c2d5795c8cf0b3cdf101cd8fc3bea0ece78fb052 Mon Sep 17 00:00:00 2001 From: Martijn van Antwerpen Date: Wed, 20 Nov 2024 14:46:23 +0100 Subject: [PATCH 14/15] Update changelog --- Changelog.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index 50247b4..fab67be 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -145,4 +145,9 @@ and for preparation of the GUI. 1.0.6 (Nicely spoken release) - Added Dutch translation - Added user language to updater request -- Upgrade installer creator from WiX 4.0.0-rc.1 to 4.0.5 \ No newline at end of file +- Upgrade installer creator from WiX 4.0.0-rc.1 to 4.0.5 + +1.0.7 (A warm welcome release) +- Added new welcome screen +- Removed notification area balloons on first start +- Prevent setting transparency on Spooky View itself \ No newline at end of file From ceb2aaca8bbe3f0b5781c4508d69be5645ac88e0 Mon Sep 17 00:00:00 2001 From: Martijn van Antwerpen Date: Wed, 20 Nov 2024 14:52:22 +0100 Subject: [PATCH 15/15] Update version number --- SpookyView/SpookyView.rc | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/SpookyView/SpookyView.rc b/SpookyView/SpookyView.rc index a252e3f..bb853f9 100644 --- a/SpookyView/SpookyView.rc +++ b/SpookyView/SpookyView.rc @@ -92,14 +92,14 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US IDC_SPOOKYVIEW MENUEX BEGIN - POPUP "ContextMenu", 0, MFT_STRING, MFS_ENABLED + POPUP "ContextMenu", 0,MFT_STRING,MFS_ENABLED BEGIN - MENUITEM "&Open...", IDM_OPEN, MFT_STRING, MFS_ENABLED | MFS_UNCHECKED | MFS_UNHILITE | MFS_DEFAULT - MENUITEM "Settings...", IDM_SETTINGS, MFT_STRING, MFS_ENABLED - MENUITEM "Introduction...", IDM_INTRO, MFT_STRING, MFS_ENABLED - MENUITEM "&About...", IDM_ABOUT, MFT_STRING, MFS_ENABLED - MENUITEM "&Pause", IDM_PAUSE, MFT_STRING, MFS_ENABLED - MENUITEM "&Exit", IDM_EXIT, MFT_STRING, MFS_ENABLED + MENUITEM "&Open...", IDM_OPEN,MFT_STRING,MFS_ENABLED | MFS_UNCHECKED | MFS_UNHILITE | MFS_DEFAULT + MENUITEM "Settings...", IDM_SETTINGS,MFT_STRING,MFS_ENABLED + MENUITEM "Introduction...", IDM_INTRO,MFT_STRING,MFS_ENABLED + MENUITEM "&About...", IDM_ABOUT,MFT_STRING,MFS_ENABLED + MENUITEM "&Pause", IDM_PAUSE,MFT_STRING,MFS_ENABLED + MENUITEM "&Exit", IDM_EXIT,MFT_STRING,MFS_ENABLED END END @@ -370,14 +370,14 @@ LANGUAGE LANG_DUTCH, SUBLANG_DUTCH IDC_SPOOKYVIEW MENUEX BEGIN - POPUP "ContextMenu", 0, MFT_STRING, MFS_ENABLED + POPUP "ContextMenu", 0,MFT_STRING,MFS_ENABLED BEGIN - MENUITEM "&Openen...", IDM_OPEN, MFT_STRING, MFS_ENABLED | MFS_UNCHECKED | MFS_UNHILITE | MFS_DEFAULT - MENUITEM "Instellingen...", IDM_SETTINGS, MFT_STRING, MFS_ENABLED - MENUITEM "Introductie...", IDM_INTRO, MFT_STRING, MFS_ENABLED - MENUITEM "&Over...", IDM_ABOUT, MFT_STRING, MFS_ENABLED - MENUITEM "&Pauzeren", IDM_PAUSE, MFT_STRING, MFS_ENABLED - MENUITEM "&Sluiten", IDM_EXIT, MFT_STRING, MFS_ENABLED + MENUITEM "&Openen...", IDM_OPEN,MFT_STRING,MFS_ENABLED | MFS_UNCHECKED | MFS_UNHILITE | MFS_DEFAULT + MENUITEM "Instellingen...", IDM_SETTINGS,MFT_STRING,MFS_ENABLED + MENUITEM "Introductie...", IDM_INTRO,MFT_STRING,MFS_ENABLED + MENUITEM "&Over...", IDM_ABOUT,MFT_STRING,MFS_ENABLED + MENUITEM "&Pauzeren", IDM_PAUSE,MFT_STRING,MFS_ENABLED + MENUITEM "&Sluiten", IDM_EXIT,MFT_STRING,MFS_ENABLED END END @@ -507,8 +507,8 @@ END // 1 VERSIONINFO - FILEVERSION 1,0,6,0 - PRODUCTVERSION 1,0,6,0 + FILEVERSION 1,0,7,0 + PRODUCTVERSION 1,0,7,0 FILEFLAGSMASK 0x2L #ifdef _DEBUG FILEFLAGS 0x1L