]> repos.lx-s.de Git - winmute.git/commitdiff
Remade project with small cleanups. No more MFC dependency
authorAlexander Steinhöfer <alexander@steinhoefer.net>
Fri, 25 Feb 2022 13:39:57 +0000 (14:39 +0100)
committerAlexander Steinhöfer <alexander@steinhoefer.net>
Fri, 25 Feb 2022 13:39:57 +0000 (14:39 +0100)
46 files changed:
.gitattributes
Dist/tools/chocolateyinstall.ps1 [moved from Build/tools/chocolateyinstall.ps1 with 100% similarity]
ScreensaverNotify/ScreensaverNotify.cpp
ScreensaverNotify/ScreensaverNotify.h
ScreensaverNotify/ScreensaverNotify.vcxproj
ScreensaverNotify/ScreensaverNotify.vcxproj.filters
ScreensaverNotify/ScreensaverNotify.vcxproj.user
ScreensaverNotify32/ScreensaverNotify32.vcxproj
ScreensaverProxy32/ScreensaverNotifierProxy.cpp
ScreensaverProxy32/ScreensaverNotifierProxy.h
ScreensaverProxy32/ScreensaverProxy.cpp
ScreensaverProxy32/ScreensaverProxy32.vcxproj
ScreensaverProxy32/ScreensaverProxy32.vcxproj.filters
ScreensaverProxy32/ScreensaverProxy32.vcxproj.user
WinMute.sln
WinMute/AboutDlg.cpp
WinMute/Log.cpp
WinMute/Log.h
WinMute/MMNotificationClient.cpp
WinMute/MMNotificationClient.h
WinMute/QuietHoursDlg.cpp
WinMute/ScreensaverNotifier.cpp
WinMute/ScreensaverNotifier.h
WinMute/Settings.cpp
WinMute/Settings.h
WinMute/TrayIcon.cpp
WinMute/TrayIcon.h
WinMute/Utility.cpp
WinMute/VersionHelper.h
WinMute/VistaAudio.cpp
WinMute/VistaAudioSessionEvents.cpp
WinMute/VistaAudioSessionEvents.h
WinMute/WinAudio.h
WinMute/WinMain.cpp
WinMute/WinMute.cpp
WinMute/WinMute.h
WinMute/WinMute.rc [moved from WinMute/res.rc with 57% similarity]
WinMute/WinMute.vcxproj
WinMute/WinMute.vcxproj.filters
WinMute/WinMute.vcxproj.user
WinMute/common.cpp [moved from WinMute/StdAfx.cpp with 95% similarity]
WinMute/common.h [moved from WinMute/StdAfx.h with 71% similarity]
WinMute/icons/app.ico [moved from WinMute/app.ico with 100% similarity]
WinMute/icons/tray_bright.ico [moved from WinMute/tray_bright.ico with 100% similarity]
WinMute/icons/tray_dark.ico [moved from WinMute/tray_dark.ico with 100% similarity]
WinMute/resource.h

index 45205ba9ecc500bb53868716c1b2bd324b87c696..46c18213f472ed358b2cb2f835cb6023fa837141 100644 (file)
@@ -20,6 +20,7 @@
 *.vcxproj.filters text eol=crlf
 *.vcxproj.users text eol=crlf
 *.rc text eol=crlf
+resource.h text eol=crlf
 
 # Denote all files that are truly binary and should not be modified.
 *.png binary
index 9a1c91c78a9f4ae5c046ea60a4ddbe25678f6071..fd8c3ea21bf588ea20de913cc2ec32e70a9f46c9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  ScreensaverNotify DLL
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@ static HINSTANCE hglobInstance_ = nullptr;
 
 static LRESULT CALLBACK MsgHookProc(UINT code, WPARAM wParam, LPARAM lParam)
 {
-   MSG const * const msg = reinterpret_cast<LPMSG>(lParam);
+   MSG const* const msg = reinterpret_cast<LPMSG>(lParam);
    if (msg->message == WM_SYSCOMMAND) {
       if (msg->wParam == SC_SCREENSAVE) {
          PostMessage(hNotifyWnd_, notifyWndMsgId_, wParam, lParam);
@@ -85,7 +85,7 @@ extern "C" {
          0);
       if (hook_ == nullptr) {
          MessageBoxW(NULL, _T("Failed to install hook"), _T("WinMute"),
-                     MB_ICONERROR);
+            MB_ICONERROR);
       }
       return hook_ != nullptr;
    }
index 474477e31175a49f1f3e88f548b204a782d4d83b..de2c1fa5f23386fb38855210eafe6fa5658645f8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  ScreensaverNotify DLL
-           Copyright (c) 2017, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -33,12 +33,13 @@ POSSIBILITY OF SUCH DAMAGE.
 
 #pragma once
 
+#define WIN32_LEAND_AND_MEAN
 #include <Windows.h>
 
 #ifdef WINMUTEDLL_EXPORTS
-   #define WINMUTEDLL_API __declspec(dllexport)
+#  define WINMUTEDLL_API __declspec(dllexport)
 #else
-   #define WINMUTEDLL_API __declspec(dllimport)
+#  define WINMUTEDLL_API __declspec(dllimport)
 #endif
 
 extern "C" {
index e264a8ef809bd702a947f857dfe4a36e66b88a0e..a9de32842bbe21f57d54eee572dbf2acc9cc3d0d 100644 (file)
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|x64">
-      <Configuration>Debug</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|x64">
       <Configuration>Release</Configuration>
       <Platform>x64</Platform>
     </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{A48C241D-70F5-4919-BE06-8C5BE99CCC23}</ProjectGuid>
+    <VCProjectVersion>16.0</VCProjectVersion>
     <Keyword>Win32Proj</Keyword>
+    <ProjectGuid>{238ed265-3248-4042-be8a-2ede6c481cbc}</ProjectGuid>
     <RootNamespace>ScreensaverNotify</RootNamespace>
-    <ProjectName>ScreensaverNotify</ProjectName>
     <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
     <CharacterSet>Unicode</CharacterSet>
     <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
+    <UseDebugLibraries>false</UseDebugLibraries>
     <PlatformToolset>v143</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
     <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
+    <UseDebugLibraries>true</UseDebugLibraries>
     <PlatformToolset>v143</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
     <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
   </ImportGroup>
+  <ImportGroup Label="Shared">
+  </ImportGroup>
   <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <LinkIncremental>true</LinkIncremental>
-    <OutDir>$(SolutionDir)Bin\$(PlatformShortName)\</OutDir>
-    <TargetName>$(ProjectName)</TargetName>
-    <IntDir>$(SolutionDir).buildtmp\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
-    <CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <RunCodeAnalysis>true</RunCodeAnalysis>
-    <EnableCppCoreCheck>false</EnableCppCoreCheck>
-    <EnableExperimentalCppCoreCheck>false</EnableExperimentalCppCoreCheck>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <TargetName>$(ProjectName)</TargetName>
-    <LinkIncremental>true</LinkIncremental>
-    <OutDir>$(SolutionDir)Bin\$(PlatformShortName)\</OutDir>
-    <IntDir>$(SolutionDir).buildtmp\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
-    <CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <RunCodeAnalysis>true</RunCodeAnalysis>
-    <EnableCppCoreCheck>false</EnableCppCoreCheck>
-    <EnableExperimentalCppCoreCheck>false</EnableExperimentalCppCoreCheck>
+    <OutDir>$(SolutionDir)Bin\</OutDir>
+    <IntDir>$(SolutionDir)Build\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <LinkIncremental>false</LinkIncremental>
-    <OutDir>$(SolutionDir)Bin\$(PlatformShortName)\</OutDir>
-    <TargetName>$(ProjectName)</TargetName>
-    <IntDir>$(SolutionDir).buildtmp\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
-    <CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <RunCodeAnalysis>true</RunCodeAnalysis>
-    <EnableCppCoreCheck>false</EnableCppCoreCheck>
-    <EnableExperimentalCppCoreCheck>false</EnableExperimentalCppCoreCheck>
+    <OutDir>$(SolutionDir)Bin\</OutDir>
+    <IntDir>$(SolutionDir)Build\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LinkIncremental>true</LinkIncremental>
+    <OutDir>$(SolutionDir)Bin\</OutDir>
+    <IntDir>$(SolutionDir)Build\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <TargetName>$(ProjectName)</TargetName>
     <LinkIncremental>false</LinkIncremental>
-    <OutDir>$(SolutionDir)Bin\$(PlatformShortName)\</OutDir>
-    <IntDir>$(SolutionDir).buildtmp\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
-    <CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <RunCodeAnalysis>true</RunCodeAnalysis>
-    <EnableCppCoreCheck>false</EnableCppCoreCheck>
-    <EnableExperimentalCppCoreCheck>false</EnableExperimentalCppCoreCheck>
+    <OutDir>$(SolutionDir)Bin\</OutDir>
+    <IntDir>$(SolutionDir)Build\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <PrecompiledHeader>NotUsing</PrecompiledHeader>
       <WarningLevel>Level4</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WINMUTEDLL_EXPORTS;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <SDLCheck>true</SDLCheck>
-      <MultiProcessorCompilation>false</MultiProcessorCompilation>
+      <PreprocessorDefinitions>WINMUTEDLL_EXPORTS;WIN32;_DEBUG;SCREENSAVERNOTIFY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ConformanceMode>true</ConformanceMode>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <PrecompiledHeaderFile>
+      </PrecompiledHeaderFile>
+      <LanguageStandard>stdcpp20</LanguageStandard>
       <TreatWarningAsError>true</TreatWarningAsError>
-      <EnablePREfast>true</EnablePREfast>
       <DiagnosticsFormat>Caret</DiagnosticsFormat>
-      <LanguageStandard>stdcpp17</LanguageStandard>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableUAC>false</EnableUAC>
     </Link>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <PrecompiledHeader>NotUsing</PrecompiledHeader>
       <WarningLevel>Level4</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WINMUTEDLL_EXPORTS;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
       <SDLCheck>true</SDLCheck>
-      <MultiProcessorCompilation>false</MultiProcessorCompilation>
+      <PreprocessorDefinitions>WINMUTEDLL_EXPORTS;WIN32;NDEBUG;SCREENSAVERNOTIFY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ConformanceMode>true</ConformanceMode>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <PrecompiledHeaderFile>
+      </PrecompiledHeaderFile>
+      <LanguageStandard>stdcpp20</LanguageStandard>
       <TreatWarningAsError>true</TreatWarningAsError>
-      <EnablePREfast>true</EnablePREfast>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <DiagnosticsFormat>Caret</DiagnosticsFormat>
-      <LanguageStandard>stdcpp17</LanguageStandard>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
       <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableUAC>false</EnableUAC>
     </Link>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <ClCompile>
       <WarningLevel>Level4</WarningLevel>
-      <PrecompiledHeader>NotUsing</PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>WINMUTEDLL_EXPORTS;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <SDLCheck>true</SDLCheck>
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <PreprocessorDefinitions>WINMUTEDLL_EXPORTS;_DEBUG;SCREENSAVERNOTIFY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ConformanceMode>true</ConformanceMode>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <PrecompiledHeaderFile>
+      </PrecompiledHeaderFile>
+      <LanguageStandard>stdcpp20</LanguageStandard>
       <TreatWarningAsError>true</TreatWarningAsError>
-      <EnablePREfast>true</EnablePREfast>
       <DiagnosticsFormat>Caret</DiagnosticsFormat>
-      <LanguageStandard>stdcpp17</LanguageStandard>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
+      <EnableUAC>false</EnableUAC>
     </Link>
-    <PostBuildEvent>
-      <Command>copy "$(TargetPath)" "$(SolutionDir)dist\bin\$(PlatformShortName)\$(TargetFileName)"</Command>
-    </PostBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <ClCompile>
       <WarningLevel>Level4</WarningLevel>
-      <PrecompiledHeader>NotUsing</PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>WINMUTEDLL_EXPORTS;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <SDLCheck>true</SDLCheck>
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <PreprocessorDefinitions>WINMUTEDLL_EXPORTS;NDEBUG;SCREENSAVERNOTIFY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ConformanceMode>true</ConformanceMode>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <PrecompiledHeaderFile>
+      </PrecompiledHeaderFile>
+      <LanguageStandard>stdcpp20</LanguageStandard>
       <TreatWarningAsError>true</TreatWarningAsError>
-      <EnablePREfast>true</EnablePREfast>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <DiagnosticsFormat>Caret</DiagnosticsFormat>
-      <LanguageStandard>stdcpp20</LanguageStandard>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableUAC>false</EnableUAC>
     </Link>
-    <PostBuildEvent>
-      <Command>copy "$(TargetPath)" "$(SolutionDir)dist\bin\$(PlatformShortName)\$(TargetFileName)"</Command>
-    </PostBuildEvent>
   </ItemDefinitionGroup>
   <ItemGroup>
-    <ClInclude Include="ScreensaverNotify.h" />
+    <ClCompile Include="ScreensaverNotify.cpp" />
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="ScreensaverNotify.cpp" />
+    <ClInclude Include="ScreensaverNotify.h" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
index 96422cc7ea8bd3ae88083a67c35e2e153c9ca726..6ed92224c60d81290c1623fdcfcd7f9a30249c03 100644 (file)
@@ -3,7 +3,7 @@
   <ItemGroup>
     <Filter Include="Source Files">
       <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+      <Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
     </Filter>
   </ItemGroup>
   <ItemGroup>
index a375ae35270b9e7049abfd799ff08be32da2d880..88a550947edbc3c5003a41726f0749201fdb6822 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup />
 </Project>
\ No newline at end of file
index 170e804d904a5d8d304858802e7ba220a3f414ab..6e9ef6e3b1066483996a0624e02fb0107e30850d 100644 (file)
@@ -21,7 +21,7 @@
   <PropertyGroup Label="Globals">
     <VCProjectVersion>16.0</VCProjectVersion>
     <Keyword>Win32Proj</Keyword>
-    <ProjectGuid>{2e31ff98-3cc4-4b3a-8bb1-2efde1331c9a}</ProjectGuid>
+    <ProjectGuid>{ab1f1ada-1d35-4052-867c-430d69d1ad4c}</ProjectGuid>
     <RootNamespace>ScreensaverNotify32</RootNamespace>
     <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <LinkIncremental>true</LinkIncremental>
-    <IntDir>$(SolutionDir).buildtmp\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
-    <OutDir>$(SolutionDir)Bin\x64\</OutDir>
+    <OutDir>$(SolutionDir)Bin\</OutDir>
+    <IntDir>$(SolutionDir)Build\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <LinkIncremental>false</LinkIncremental>
-    <IntDir>$(SolutionDir).buildtmp\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
-    <OutDir>$(SolutionDir)Bin\x64\</OutDir>
+    <OutDir>$(SolutionDir)Bin\</OutDir>
+    <IntDir>$(SolutionDir)Build\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <LinkIncremental>true</LinkIncremental>
-    <IntDir>$(SolutionDir).buildtmp\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
-    <OutDir>$(SolutionDir)Bin\x64\</OutDir>
+    <OutDir>$(SolutionDir)Bin\</OutDir>
+    <IntDir>$(SolutionDir)Build\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <LinkIncremental>false</LinkIncremental>
-    <IntDir>$(SolutionDir).buildtmp\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
-    <OutDir>$(SolutionDir)Bin\x64\</OutDir>
+    <OutDir>$(SolutionDir)Bin\</OutDir>
+    <IntDir>$(SolutionDir)Build\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <SDLCheck>true</SDLCheck>
       <PreprocessorDefinitions>WINMUTEDLL_EXPORTS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ConformanceMode>true</ConformanceMode>
+      <LanguageStandard>stdcpp20</LanguageStandard>
+      <TreatWarningAsError>true</TreatWarningAsError>
       <DiagnosticsFormat>Caret</DiagnosticsFormat>
-      <LanguageStandard>stdcpp17</LanguageStandard>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
       <SDLCheck>true</SDLCheck>
       <PreprocessorDefinitions>WINMUTEDLL_EXPORTS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ConformanceMode>true</ConformanceMode>
+      <LanguageStandard>stdcpp20</LanguageStandard>
+      <TreatWarningAsError>true</TreatWarningAsError>
       <DiagnosticsFormat>Caret</DiagnosticsFormat>
-      <LanguageStandard>stdcpp17</LanguageStandard>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
       <GenerateDebugInformation>true</GenerateDebugInformation>
     </Link>
-    <PostBuildEvent>
-      <Command>copy "$(TargetPath)" "$(SolutionDir)dist\bin\$(PlatformShortName)\$(TargetFileName)"</Command>
-    </PostBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <ClCompile>
       <SDLCheck>true</SDLCheck>
       <PreprocessorDefinitions>WINMUTEDLL_EXPORTS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ConformanceMode>true</ConformanceMode>
+      <LanguageStandard>stdcpp20</LanguageStandard>
+      <TreatWarningAsError>true</TreatWarningAsError>
       <DiagnosticsFormat>Caret</DiagnosticsFormat>
-      <LanguageStandard>stdcpp17</LanguageStandard>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
       <SDLCheck>true</SDLCheck>
       <PreprocessorDefinitions>WINMUTEDLL_EXPORTS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ConformanceMode>true</ConformanceMode>
-      <DiagnosticsFormat>Caret</DiagnosticsFormat>
       <LanguageStandard>stdcpp20</LanguageStandard>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <DiagnosticsFormat>Caret</DiagnosticsFormat>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
       <GenerateDebugInformation>true</GenerateDebugInformation>
     </Link>
-    <PostBuildEvent>
-      <Command>copy "$(TargetPath)" "$(SolutionDir)dist\bin\$(PlatformShortName)\$(TargetFileName)"</Command>
-    </PostBuildEvent>
   </ItemDefinitionGroup>
   <ItemGroup>
     <ClCompile Include="..\ScreensaverNotify\ScreensaverNotify.cpp" />
index 917aa5a60b45577afcbb67f5a754f9eea26b849a..1b781556f1cea291f6961e4a2b28547506deebc0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,8 @@ ScreensaverNotifierProxy::ScreensaverNotifierProxy() :
    notifyWndMsg_(0),
    regHook_(nullptr),
    unregHook_(nullptr)
-{ }
+{
+}
 
 ScreensaverNotifierProxy::~ScreensaverNotifierProxy()
 {
index e862c3fce95f76d273643a336e893885b754d7d5..e4b21a575ccb4b7387ce5b16d7a35f31196b7238 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
index 621bd4f16ad41413700b45f7c8fc2254466c544a..5af470f9155f699d4ff26627b87186a14dbc3ee9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -75,7 +75,7 @@ void PrintWindowsError(const char* lpszFunction, DWORD lastError)
             lastError,
             reinterpret_cast<TCHAR*>(lpMsgBuf));
          MessageBox(nullptr, static_cast<LPCTSTR>(lpDisplayBuf),
-                   "WinMute - ScreensaverProxy", MB_OK | MB_ICONERROR);
+            "WinMute - ScreensaverProxy", MB_OK | MB_ICONERROR);
          LocalFree(lpDisplayBuf);
       }
       LocalFree(lpMsgBuf);
index 446ea7f5d0639214c796aa603dbf1aff0829799f..c3bdb638024840622434acb2ce6598c4598bad0e 100644 (file)
@@ -21,7 +21,7 @@
   <PropertyGroup Label="Globals">
     <VCProjectVersion>16.0</VCProjectVersion>
     <Keyword>Win32Proj</Keyword>
-    <ProjectGuid>{b3023843-584d-4dbb-9041-19e1f8b6f13e}</ProjectGuid>
+    <ProjectGuid>{7214696d-b598-435d-8622-ad4ae3755d28}</ProjectGuid>
     <RootNamespace>ScreensaverProxy32</RootNamespace>
     <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <LinkIncremental>true</LinkIncremental>
-    <OutDir>$(SolutionDir)Bin\x64\</OutDir>
-    <IntDir>$(SolutionDir).buildtmp\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)Bin\</OutDir>
+    <IntDir>$(SolutionDir)Build\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <LinkIncremental>false</LinkIncremental>
-    <OutDir>$(SolutionDir)Bin\x64\</OutDir>
-    <IntDir>$(SolutionDir).buildtmp\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)Bin\</OutDir>
+    <IntDir>$(SolutionDir)Build\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <LinkIncremental>true</LinkIncremental>
-    <OutDir>$(SolutionDir)Bin\x64\</OutDir>
-    <IntDir>$(SolutionDir).buildtmp\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)Bin\</OutDir>
+    <IntDir>$(SolutionDir)Build\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <LinkIncremental>false</LinkIncremental>
-    <OutDir>$(SolutionDir)Bin\x64\</OutDir>
-    <IntDir>$(SolutionDir).buildtmp\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)Bin\</OutDir>
+    <IntDir>$(SolutionDir)Build\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <SDLCheck>true</SDLCheck>
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ConformanceMode>true</ConformanceMode>
-      <LanguageStandard>stdcpp17</LanguageStandard>
+      <LanguageStandard>stdcpp20</LanguageStandard>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <DiagnosticsFormat>Caret</DiagnosticsFormat>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <SDLCheck>true</SDLCheck>
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ConformanceMode>true</ConformanceMode>
-      <LanguageStandard>stdcpp17</LanguageStandard>
+      <LanguageStandard>stdcpp20</LanguageStandard>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <DiagnosticsFormat>Caret</DiagnosticsFormat>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <SDLCheck>true</SDLCheck>
       <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ConformanceMode>true</ConformanceMode>
-      <LanguageStandard>stdcpp17</LanguageStandard>
+      <LanguageStandard>stdcpp20</LanguageStandard>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <DiagnosticsFormat>Caret</DiagnosticsFormat>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ConformanceMode>true</ConformanceMode>
       <LanguageStandard>stdcpp20</LanguageStandard>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <DiagnosticsFormat>Caret</DiagnosticsFormat>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
index 3b59de4bc3c4896d13a71834ca73fc69103bb8c8..26cf41424d4787e295a97bc0e0bb29738da7cf55 100644 (file)
@@ -7,10 +7,10 @@
     </Filter>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="ScreensaverProxy.cpp">
+    <ClCompile Include="ScreensaverNotifierProxy.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="ScreensaverNotifierProxy.cpp">
+    <ClCompile Include="ScreensaverProxy.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>
index 8376c5476d33864e931e136e0ebb3fefc2fc28b4..88a550947edbc3c5003a41726f0749201fdb6822 100644 (file)
@@ -1,19 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LocalDebuggerCommandArguments>/msgId:1234</LocalDebuggerCommandArguments>
-    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LocalDebuggerCommandArguments>/msgId:1234</LocalDebuggerCommandArguments>
-    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <LocalDebuggerCommandArguments>/msgId:1234</LocalDebuggerCommandArguments>
-    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <LocalDebuggerCommandArguments>/msgId:1234</LocalDebuggerCommandArguments>
-    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
-  </PropertyGroup>
+  <PropertyGroup />
 </Project>
\ No newline at end of file
index 4bcb7d5c0e8edc22fbaf0c4aaad6ae9bd5f9f595..4bb004320ddcab7099dc8d26e917a6905d6fe942 100644 (file)
@@ -1,64 +1,61 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30011.22
+# Visual Studio Version 17
+VisualStudioVersion = 17.1.32210.238
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinMute", "WinMute\WinMute.vcxproj", "{488617F0-5DD3-42B5-81ED-A1E9B3117551}"
-       ProjectSection(ProjectDependencies) = postProject
-               {A48C241D-70F5-4919-BE06-8C5BE99CCC23} = {A48C241D-70F5-4919-BE06-8C5BE99CCC23}
-       EndProjectSection
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinMute", "WinMute\WinMute.vcxproj", "{479D2958-3FFC-43F8-8217-44D0FF9C11B1}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScreensaverNotify", "ScreensaverNotify\ScreensaverNotify.vcxproj", "{A48C241D-70F5-4919-BE06-8C5BE99CCC23}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScreensaverNotify", "ScreensaverNotify\ScreensaverNotify.vcxproj", "{238ED265-3248-4042-BE8A-2EDE6C481CBC}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScreensaverNotify32", "ScreensaverNotify32\ScreensaverNotify32.vcxproj", "{2E31FF98-3CC4-4B3A-8BB1-2EFDE1331C9A}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScreensaverNotify32", "ScreensaverNotify32\ScreensaverNotify32.vcxproj", "{AB1F1ADA-1D35-4052-867C-430D69D1AD4C}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScreensaverProxy32", "ScreensaverProxy32\ScreensaverProxy32.vcxproj", "{B3023843-584D-4DBB-9041-19E1F8B6F13E}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScreensaverProxy32", "ScreensaverProxy32\ScreensaverProxy32.vcxproj", "{7214696D-B598-435D-8622-AD4AE3755D28}"
 EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
-               Debug|Win32 = Debug|Win32
                Debug|x64 = Debug|x64
-               Release|Win32 = Release|Win32
+               Debug|x86 = Debug|x86
                Release|x64 = Release|x64
+               Release|x86 = Release|x86
        EndGlobalSection
        GlobalSection(ProjectConfigurationPlatforms) = postSolution
-               {488617F0-5DD3-42B5-81ED-A1E9B3117551}.Debug|Win32.ActiveCfg = Debug|Win32
-               {488617F0-5DD3-42B5-81ED-A1E9B3117551}.Debug|Win32.Build.0 = Debug|Win32
-               {488617F0-5DD3-42B5-81ED-A1E9B3117551}.Debug|x64.ActiveCfg = Debug|x64
-               {488617F0-5DD3-42B5-81ED-A1E9B3117551}.Debug|x64.Build.0 = Debug|x64
-               {488617F0-5DD3-42B5-81ED-A1E9B3117551}.Release|Win32.ActiveCfg = Release|Win32
-               {488617F0-5DD3-42B5-81ED-A1E9B3117551}.Release|Win32.Build.0 = Release|Win32
-               {488617F0-5DD3-42B5-81ED-A1E9B3117551}.Release|x64.ActiveCfg = Release|x64
-               {488617F0-5DD3-42B5-81ED-A1E9B3117551}.Release|x64.Build.0 = Release|x64
-               {A48C241D-70F5-4919-BE06-8C5BE99CCC23}.Debug|Win32.ActiveCfg = Debug|Win32
-               {A48C241D-70F5-4919-BE06-8C5BE99CCC23}.Debug|Win32.Build.0 = Debug|Win32
-               {A48C241D-70F5-4919-BE06-8C5BE99CCC23}.Debug|x64.ActiveCfg = Debug|x64
-               {A48C241D-70F5-4919-BE06-8C5BE99CCC23}.Debug|x64.Build.0 = Debug|x64
-               {A48C241D-70F5-4919-BE06-8C5BE99CCC23}.Release|Win32.ActiveCfg = Release|Win32
-               {A48C241D-70F5-4919-BE06-8C5BE99CCC23}.Release|Win32.Build.0 = Release|Win32
-               {A48C241D-70F5-4919-BE06-8C5BE99CCC23}.Release|x64.ActiveCfg = Release|x64
-               {A48C241D-70F5-4919-BE06-8C5BE99CCC23}.Release|x64.Build.0 = Release|x64
-               {2E31FF98-3CC4-4B3A-8BB1-2EFDE1331C9A}.Debug|Win32.ActiveCfg = Debug|Win32
-               {2E31FF98-3CC4-4B3A-8BB1-2EFDE1331C9A}.Debug|Win32.Build.0 = Debug|Win32
-               {2E31FF98-3CC4-4B3A-8BB1-2EFDE1331C9A}.Debug|x64.ActiveCfg = Debug|Win32
-               {2E31FF98-3CC4-4B3A-8BB1-2EFDE1331C9A}.Debug|x64.Build.0 = Debug|Win32
-               {2E31FF98-3CC4-4B3A-8BB1-2EFDE1331C9A}.Release|Win32.ActiveCfg = Release|Win32
-               {2E31FF98-3CC4-4B3A-8BB1-2EFDE1331C9A}.Release|Win32.Build.0 = Release|Win32
-               {2E31FF98-3CC4-4B3A-8BB1-2EFDE1331C9A}.Release|x64.ActiveCfg = Release|Win32
-               {2E31FF98-3CC4-4B3A-8BB1-2EFDE1331C9A}.Release|x64.Build.0 = Release|Win32
-               {B3023843-584D-4DBB-9041-19E1F8B6F13E}.Debug|Win32.ActiveCfg = Debug|Win32
-               {B3023843-584D-4DBB-9041-19E1F8B6F13E}.Debug|Win32.Build.0 = Debug|Win32
-               {B3023843-584D-4DBB-9041-19E1F8B6F13E}.Debug|x64.ActiveCfg = Debug|Win32
-               {B3023843-584D-4DBB-9041-19E1F8B6F13E}.Debug|x64.Build.0 = Debug|Win32
-               {B3023843-584D-4DBB-9041-19E1F8B6F13E}.Release|Win32.ActiveCfg = Release|Win32
-               {B3023843-584D-4DBB-9041-19E1F8B6F13E}.Release|Win32.Build.0 = Release|Win32
-               {B3023843-584D-4DBB-9041-19E1F8B6F13E}.Release|x64.ActiveCfg = Release|Win32
-               {B3023843-584D-4DBB-9041-19E1F8B6F13E}.Release|x64.Build.0 = Release|Win32
+               {479D2958-3FFC-43F8-8217-44D0FF9C11B1}.Debug|x64.ActiveCfg = Debug|x64
+               {479D2958-3FFC-43F8-8217-44D0FF9C11B1}.Debug|x64.Build.0 = Debug|x64
+               {479D2958-3FFC-43F8-8217-44D0FF9C11B1}.Debug|x86.ActiveCfg = Debug|Win32
+               {479D2958-3FFC-43F8-8217-44D0FF9C11B1}.Debug|x86.Build.0 = Debug|Win32
+               {479D2958-3FFC-43F8-8217-44D0FF9C11B1}.Release|x64.ActiveCfg = Release|x64
+               {479D2958-3FFC-43F8-8217-44D0FF9C11B1}.Release|x64.Build.0 = Release|x64
+               {479D2958-3FFC-43F8-8217-44D0FF9C11B1}.Release|x86.ActiveCfg = Release|Win32
+               {479D2958-3FFC-43F8-8217-44D0FF9C11B1}.Release|x86.Build.0 = Release|Win32
+               {238ED265-3248-4042-BE8A-2EDE6C481CBC}.Debug|x64.ActiveCfg = Debug|x64
+               {238ED265-3248-4042-BE8A-2EDE6C481CBC}.Debug|x64.Build.0 = Debug|x64
+               {238ED265-3248-4042-BE8A-2EDE6C481CBC}.Debug|x86.ActiveCfg = Debug|Win32
+               {238ED265-3248-4042-BE8A-2EDE6C481CBC}.Debug|x86.Build.0 = Debug|Win32
+               {238ED265-3248-4042-BE8A-2EDE6C481CBC}.Release|x64.ActiveCfg = Release|x64
+               {238ED265-3248-4042-BE8A-2EDE6C481CBC}.Release|x64.Build.0 = Release|x64
+               {238ED265-3248-4042-BE8A-2EDE6C481CBC}.Release|x86.ActiveCfg = Release|Win32
+               {238ED265-3248-4042-BE8A-2EDE6C481CBC}.Release|x86.Build.0 = Release|Win32
+               {AB1F1ADA-1D35-4052-867C-430D69D1AD4C}.Debug|x64.ActiveCfg = Debug|Win32
+               {AB1F1ADA-1D35-4052-867C-430D69D1AD4C}.Debug|x64.Build.0 = Debug|Win32
+               {AB1F1ADA-1D35-4052-867C-430D69D1AD4C}.Debug|x86.ActiveCfg = Debug|Win32
+               {AB1F1ADA-1D35-4052-867C-430D69D1AD4C}.Debug|x86.Build.0 = Debug|Win32
+               {AB1F1ADA-1D35-4052-867C-430D69D1AD4C}.Release|x64.ActiveCfg = Release|x64
+               {AB1F1ADA-1D35-4052-867C-430D69D1AD4C}.Release|x64.Build.0 = Release|x64
+               {AB1F1ADA-1D35-4052-867C-430D69D1AD4C}.Release|x86.ActiveCfg = Release|Win32
+               {AB1F1ADA-1D35-4052-867C-430D69D1AD4C}.Release|x86.Build.0 = Release|Win32
+               {7214696D-B598-435D-8622-AD4AE3755D28}.Debug|x64.ActiveCfg = Debug|Win32
+               {7214696D-B598-435D-8622-AD4AE3755D28}.Debug|x64.Build.0 = Debug|Win32
+               {7214696D-B598-435D-8622-AD4AE3755D28}.Debug|x86.ActiveCfg = Debug|Win32
+               {7214696D-B598-435D-8622-AD4AE3755D28}.Debug|x86.Build.0 = Debug|Win32
+               {7214696D-B598-435D-8622-AD4AE3755D28}.Release|x64.ActiveCfg = Release|x64
+               {7214696D-B598-435D-8622-AD4AE3755D28}.Release|x64.Build.0 = Release|x64
+               {7214696D-B598-435D-8622-AD4AE3755D28}.Release|x86.ActiveCfg = Release|Win32
+               {7214696D-B598-435D-8622-AD4AE3755D28}.Release|x86.Build.0 = Release|Win32
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
        EndGlobalSection
        GlobalSection(ExtensibilityGlobals) = postSolution
-               SolutionGuid = {AE62E32B-8E8B-4236-9173-9671A647A778}
+               SolutionGuid = {302C5470-9998-4A12-A027-07D24C9FC8FA}
        EndGlobalSection
 EndGlobal
index 2d5c53da0bf34fd61d6d802ebb45e3f0f5e9a095..01ccd83851926d02f53287426c3447d126873692 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#include "StdAfx.h"
+#include "common.h"
 
 INT_PTR CALLBACK AboutDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
 {
@@ -43,20 +43,22 @@ INT_PTR CALLBACK AboutDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
          EndDialog(hDlg, 0);
       }
       return 0;
-   case WM_NOTIFY: {
+   case WM_NOTIFY:
+   {
       PNMLINK pNmLink = (PNMLINK)lParam;
       switch (pNmLink->hdr.code) {
-         case NM_CLICK:
-         case NM_RETURN: {
-            UINT_PTR ctrlId = pNmLink->hdr.idFrom;
-            LITEM item = pNmLink->item;
-            if ((ctrlId == IDC_LINK_HOMEPAGE || ctrlId == IDC_LINK_SUPPORT)
-                && item.iLink == 0) {
-               ShellExecute(nullptr, _T("open"), item.szUrl, nullptr, nullptr,
-                            SW_SHOW);
-            }
-            break;
+      case NM_CLICK:
+      case NM_RETURN:
+      {
+         UINT_PTR ctrlId = pNmLink->hdr.idFrom;
+         LITEM item = pNmLink->item;
+         if ((ctrlId == IDC_LINK_HOMEPAGE || ctrlId == IDC_LINK_SUPPORT)
+            && item.iLink == 0) {
+            ShellExecute(nullptr, _T("open"), item.szUrl, nullptr, nullptr,
+               SW_SHOW);
          }
+         break;
+      }
       }
       return TRUE;
    }
index 5dc5e1895d38d1e8b2e91ea6f5b30e1e698b4fc7..ae44416097530e449b8894ae668c2ccc7025e5ad 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -31,15 +31,13 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#pragma once
+#include "common.h"
 
-#include "StdAfx.h"
-
-static bool OpenLogFile(std::ofstream &logFile)
+static bool OpenLogFile(std::ofstream& logFile)
 {
    auto path = std::filesystem::temp_directory_path();
    path /= "WinMute.log";
-   logFile.open(path.string(), std::ios::out|std::ios::app|std::ios::binary);
+   logFile.open(path.string(), std::ios::out | std::ios::app | std::ios::binary);
    return logFile.is_open();
 }
 
@@ -49,7 +47,7 @@ Log& Log::GetInstance()
    return log;
 }
 
-Log::Log():
+Log::Log() :
    initialized_(false)
 {
    if (OpenLogFile(logFile_)) {
index 1fbc55b462693fd8688187ec1a672481779ce20e..406d737e5b129cb9aca46e154a4618d233575092 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
 
 #pragma once
 
-#include "StdAfx.h"
+#include "common.h"
 
 class Log {
 public:
index bb59ac5b99221e2ab5af8f2b1fb01cfc48a9af56..9de582ab80384359b1af600c098df5b21d6c72bb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#include "StdAfx.h"
+#include "common.h"
 #include "WinAudio.h"
 #include "MMNotificationClient.h"
 
@@ -62,7 +62,7 @@ ULONG STDMETHODCALLTYPE MMNotificationClient::Release()
 }
 
 HRESULT STDMETHODCALLTYPE MMNotificationClient::QueryInterface(
-   REFIID riid, VOID **ppvInterface)
+   REFIID riid, VOID** ppvInterface)
 {
    if (IID_IUnknown == riid) {
       AddRef();
index c502627a5a2af289403010dfef1bf894672bd945..004f10824d0d2e113f294cca67d8a3953cbb6f45 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#include "StdAfx.h"
+#include "Common.h"
 #include <Mmdeviceapi.h>
 
 class WinAudio;
@@ -43,19 +43,20 @@ public:
 
    ULONG STDMETHODCALLTYPE AddRef();
    ULONG STDMETHODCALLTYPE Release();
-   HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, VOID **ppvInterface);
+   HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, VOID** ppvInterface);
 
    HRESULT STDMETHODCALLTYPE OnDefaultDeviceChanged(EDataFlow flow, ERole role,
-                                                    LPCWSTR pwstrDeviceId);
+      LPCWSTR pwstrDeviceId);
    HRESULT STDMETHODCALLTYPE OnDeviceAdded(LPCWSTR pwstrDeviceId);
    HRESULT STDMETHODCALLTYPE OnDeviceRemoved(LPCWSTR pwstrDeviceId);
    HRESULT STDMETHODCALLTYPE OnDeviceStateChanged(LPCWSTR pwstrDeviceId,
-                                                  DWORD dwNewState);
+      DWORD dwNewState);
    HRESULT STDMETHODCALLTYPE OnPropertyValueChanged(LPCWSTR pwstrDeviceId,
-                                                    const PROPERTYKEY key);
+      const PROPERTYKEY key);
 
 private:
    LONG ref_;
-   IMMDeviceEnumerator *pEnumerator_;
+   IMMDeviceEnumerator* pEnumerator_;
    WinAudio* notifyParent_;
 };
+#pragma once
index 32284f2588701be408e95860f7a6724b61d30dff..7e0149fd543bc754771bba588ca8176fdd9e3b05 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#include "StdAfx.h"
+#include "common.h"
 
 static bool IsValidTimeRange(
    const LPSYSTEMTIME start,
@@ -39,15 +39,15 @@ static bool IsValidTimeRange(
 {
    bool isValid = true;
    if (start->wHour == end->wHour &&
-       start->wMinute == end->wMinute &&
-       start->wSecond == end->wSecond) {
+      start->wMinute == end->wMinute &&
+      start->wSecond == end->wSecond) {
       isValid = false;
    }
    return isValid;
 }
 
 static bool SaveQuietHours(
-   Settings *settings,
+   Settings* settings,
    const int enabled,
    const int forceUnmute,
    const int showNotifications,
@@ -71,13 +71,13 @@ static bool SaveQuietHours(
    }
 
    int setStart = start->wHour * 3600 + start->wMinute * 60 + start->wSecond;
-   int setEnd   = end->wHour * 3600 + end->wMinute * 60 + end->wSecond;
+   int setEnd = end->wHour * 3600 + end->wMinute * 60 + end->wSecond;
 
    if (!settings->SetValue(SettingsKey::QUIETHOURS_ENABLE, enabled) ||
-       !settings->SetValue(SettingsKey::QUIETHOURS_FORCEUNMUTE, forceUnmute) ||
-       !settings->SetValue(SettingsKey::QUIETHOURS_NOTIFICATIONS, showNotifications) ||
-       !settings->SetValue(SettingsKey::QUIETHOURS_START, setStart) ||
-       !settings->SetValue(SettingsKey::QUIETHOURS_END, setEnd)) {
+      !settings->SetValue(SettingsKey::QUIETHOURS_FORCEUNMUTE, forceUnmute) ||
+      !settings->SetValue(SettingsKey::QUIETHOURS_NOTIFICATIONS, showNotifications) ||
+      !settings->SetValue(SettingsKey::QUIETHOURS_START, setStart) ||
+      !settings->SetValue(SettingsKey::QUIETHOURS_END, setEnd)) {
       TaskDialog(
          nullptr,
          nullptr,
@@ -97,13 +97,14 @@ INT_PTR CALLBACK QuietHoursDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
 {
    UNREFERENCED_PARAMETER(lParam);
    switch (msg) {
-   case WM_INITDIALOG: {
+   case WM_INITDIALOG:
+   {
       HWND hEnable = GetDlgItem(hDlg, IDC_ENABLEQUIETHOURS);
       HWND hForce = GetDlgItem(hDlg, IDC_FORCEUNMUTE);
       HWND hNotify = GetDlgItem(hDlg, IDC_SHOWNOTIFICATIONS);
       HWND hStart = GetDlgItem(hDlg, IDC_QUIETHOURS_START);
       HWND hEnd = GetDlgItem(hDlg, IDC_QUIETHOURS_END);
-      Settings *settings = reinterpret_cast<Settings*>(lParam);
+      Settings* settings = reinterpret_cast<Settings*>(lParam);
       assert(settings != NULL);
       SetWindowLongPtr(hDlg, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(settings));
 
@@ -144,7 +145,8 @@ INT_PTR CALLBACK QuietHoursDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
 
       return TRUE;
    }
-   case WM_COMMAND: {
+   case WM_COMMAND:
+   {
       HWND hEnable = GetDlgItem(hDlg, IDC_ENABLEQUIETHOURS);
       HWND hForce = GetDlgItem(hDlg, IDC_FORCEUNMUTE);
       HWND hNotify = GetDlgItem(hDlg, IDC_SHOWNOTIFICATIONS);
@@ -153,7 +155,7 @@ INT_PTR CALLBACK QuietHoursDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
       if (LOWORD(wParam) == IDOK) {
          SYSTEMTIME start;
          SYSTEMTIME end;
-         Settings *settings = reinterpret_cast<Settings*>(GetWindowLongPtr(hDlg, GWLP_USERDATA));
+         Settings* settings = reinterpret_cast<Settings*>(GetWindowLongPtr(hDlg, GWLP_USERDATA));
          int qhEnabled = Button_GetCheck(hEnable) == BST_CHECKED;
          int qhForceUnmute = Button_GetCheck(hForce) == BST_CHECKED;
          int qhNotifications = Button_GetCheck(hNotify) == BST_CHECKED;
index c41e59bddd2ddf0f02fe90f47d56e072ed641da0..090e9aeae292dc9977354efbe29e9b93f48351d3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#include "StdAfx.h"
+#include "common.h"
 #include "ScreensaverNotifier.h"
 
 /* ========================================================================== */
@@ -50,22 +50,23 @@ static LPCTSTR SCRSVER_NOTIFY_WND_CLASS = _T("LXS_WinMuteScreensaverNotifyClass"
 
 
 static LRESULT CALLBACK ScrsvrWndProc(HWND hWnd, UINT msg, WPARAM wParam,
-                                     LPARAM lParam)
+   LPARAM lParam)
 {
    auto sn = reinterpret_cast<ScreensaverNotifier*>(
-                                         GetWindowLongPtr(hWnd, GWLP_USERDATA));
+      GetWindowLongPtr(hWnd, GWLP_USERDATA));
    switch (msg) {
-   case WM_NCCREATE: {
+   case WM_NCCREATE:
+   {
       LPCREATESTRUCTW cs = reinterpret_cast<LPCREATESTRUCTW>(lParam);
       SetWindowLongPtr(hWnd, GWLP_USERDATA,
-                       reinterpret_cast<LONG_PTR>(cs->lpCreateParams));
+         reinterpret_cast<LONG_PTR>(cs->lpCreateParams));
       return TRUE;
    }
    default:
       break;
    }
    return (sn) ? sn->WindowProc(hWnd, msg, wParam, lParam)
-               : DefWindowProc(hWnd, msg, wParam, lParam);
+      : DefWindowProc(hWnd, msg, wParam, lParam);
 }
 
 /* ========================================================================== */
@@ -82,7 +83,8 @@ ScreensaverNotifier::ScreensaverNotifier() :
    hookWndMsg_(0),
    regHook_(nullptr),
    unregHook_(nullptr)
-{ }
+{
+}
 
 ScreensaverNotifier::~ScreensaverNotifier()
 {
@@ -159,23 +161,23 @@ bool ScreensaverNotifier::InitHook32()
    if (hJob_ == nullptr) {
       PrintWindowsError(_T("CreateJobObject"), GetLastError());
    } else if (SetInformationJobObject(
-         hJob_,
-         JobObjectExtendedLimitInformation,
-         &jobInfo,
-         sizeof(jobInfo)) == FALSE) {
+      hJob_,
+      JobObjectExtendedLimitInformation,
+      &jobInfo,
+      sizeof(jobInfo)) == FALSE) {
       PrintWindowsError(_T("SetInformationJobObject"), GetLastError());
       CloseHandle(hJob_);
    } else if (CreateProcess(
-         _T(".\\ScreensaverProxy32.exe"),
-         commandLine,
-         NULL,
-         NULL,
-         FALSE,
-         NORMAL_PRIORITY_CLASS,
-         NULL,
-         NULL,
-         &startupInfo,
-         &procInfo) == FALSE) {
+      _T(".\\ScreensaverProxy32.exe"),
+      commandLine,
+      NULL,
+      NULL,
+      FALSE,
+      NORMAL_PRIORITY_CLASS,
+      NULL,
+      NULL,
+      &startupInfo,
+      &procInfo) == FALSE) {
       PrintWindowsError(_T("CreateProcess"));
       CloseHandle(hJob_);
       hJob_ = nullptr;
@@ -288,10 +290,10 @@ bool ScreensaverNotifier::IsScreensaverRunning()
 {
    BOOL isRunning = FALSE;
    if (SystemParametersInfo(
-         SPI_GETSCREENSAVERRUNNING,
-         0,
-         &isRunning,
-         FALSE) == FALSE) {
+      SPI_GETSCREENSAVERRUNNING,
+      0,
+      &isRunning,
+      FALSE) == FALSE) {
       PrintWindowsError(_T("SystemParametersInfo"));
       return false;
    }
@@ -310,10 +312,12 @@ LRESULT CALLBACK ScreensaverNotifier::WindowProc(
 {
    static UINT uTaskbarRestart = 0;
    switch (msg) {
-   case WM_CREATE: {
+   case WM_CREATE:
+   {
       return TRUE;
    }
-   case WM_TIMER: {
+   case WM_TIMER:
+   {
       if (wParam == SCRSV_TIMER_ID) {
          if (!IsScreensaverRunning()) {
             StartScreensaverPollTimer(false);
index 7c9a35909334695b549c16ff2f95bc934d62205b..ca8ec0e7749fcc1df917fc91e1506e0af613aa3b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
 
 #pragma once
 
-#include "StdAfx.h"
+#include "common.h"
 
 #define WM_SCRNSAVE_CHANGE (WM_APP + 100)
 
index 314cc8d64f996a6cdb4ee43c1cc3d5d9abe521da..19544b0ec3aaa0b28a1e4e8993590737452671bc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#include "StdAfx.h"
+#include "common.h"
 #include "Settings.h"
 
 static const LPCWSTR LX_SYSTEMS_SUBKEY = _T("SOFTWARE\\lx-systems\\WinMute");
@@ -81,7 +81,8 @@ static LPCWSTR KeyToStr(SettingsKey key)
 
 Settings::Settings() :
    hRegSettingsKey_(nullptr)
-{ }
+{
+}
 
 Settings::~Settings()
 {
index c27ee3786b18d136c003c2bd670363c9bdc3afa5..360c80d8a2d1d1c70601ab2e2c2deae6f4468a42 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -33,10 +33,10 @@ POSSIBILITY OF SUCH DAMAGE.
 
 #pragma once
 
-#include "StdAfx.h"
+#include "common.h"
 
 enum class SettingsKey {
-     MUTE_ON_LOCK
+   MUTE_ON_LOCK
    , MUTE_ON_SCREENSAVER
    , RESTORE_AUDIO
    , MUTE_ON_SUSPEND
index 6f5b612c0fe96992773051809eda43c3f1aa933c..dfbaa786dbb043c455ba6bc22eff1e623545da5e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -31,23 +31,22 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#include "StdAfx.h"
+#include "common.h"
 
 TrayIcon::TrayIcon() :
    iconVisible_(false), trayID_(0), hIcon_(0), hWnd_(0)
 {
-
 }
 
 TrayIcon::TrayIcon(HWND hWnd, UINT trayID, HICON hIcon,
-                   const std::wstring& tooltip, bool show) :
+   const std::wstring& tooltip, bool show) :
    iconVisible_(false)
 {
    Init(hWnd, trayID, hIcon, tooltip, show);
 }
 
 void TrayIcon::Init(HWND hWnd, UINT trayID, HICON hIcon,
-                    const std::wstring& tooltip, bool show)
+   const std::wstring& tooltip, bool show)
 {
    if (!hIcon) {
       hIcon_ = LoadIcon(0, IDI_APPLICATION);
@@ -82,7 +81,7 @@ void TrayIcon::Hide()
 void TrayIcon::Show()
 {
    if (!iconVisible_) {
-      if(AddNotifyIcon()) {
+      if (AddNotifyIcon()) {
          iconVisible_ = true;
       }
    }
@@ -125,8 +124,8 @@ void TrayIcon::ChangeText(const std::wstring& tooltip)
 }
 
 void TrayIcon::ShowPopup(
-   const std::wstring &title,
-   const std::wstring &text)
+   const std::wstring& title,
+   const std::wstring& text)
 {
    NOTIFYICONDATA tnid;
    tnid.cbSize = sizeof(NOTIFYICONDATA);
@@ -134,10 +133,10 @@ void TrayIcon::ShowPopup(
    tnid.uID = trayID_;
    tnid.uFlags = NIF_INFO;
    tnid.dwInfoFlags = NIIF_INFO | NIIF_NOSOUND | NIIF_LARGE_ICON
-                     | NIIF_RESPECT_QUIET_TIME;
+      | NIIF_RESPECT_QUIET_TIME;
    tnid.uTimeout = 10 * 1000;
-   wcscpy_s(tnid.szInfoTitle, sizeof(tnid.szInfoTitle)/sizeof(TCHAR), title.c_str());
-   wcscpy_s(tnid.szInfo, sizeof(tnid.szInfo)/sizeof(TCHAR), text.c_str());
+   wcscpy_s(tnid.szInfoTitle, sizeof(tnid.szInfoTitle) / sizeof(TCHAR), title.c_str());
+   wcscpy_s(tnid.szInfo, sizeof(tnid.szInfo) / sizeof(TCHAR), text.c_str());
 
    Shell_NotifyIcon(NIM_MODIFY, &tnid);
 }
@@ -157,13 +156,13 @@ bool TrayIcon::AddNotifyIcon()
    tnid.cbSize = sizeof(NOTIFYICONDATA);
    tnid.hWnd = hWnd_;
    tnid.uID = trayID_;
-   tnid.uFlags = NIF_ICON|NIF_TIP|NIF_MESSAGE;
+   tnid.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE;
    tnid.hIcon = hIcon_;
    tnid.uCallbackMessage = WM_TRAYICON;
 
    if (SUCCEEDED(StringCchCopy(tnid.szTip,
-                               sizeof(tnid.szTip) / sizeof(TCHAR),
-                               tooltip_.c_str()))) {
+      sizeof(tnid.szTip) / sizeof(TCHAR),
+      tooltip_.c_str()))) {
       return Shell_NotifyIcon(NIM_ADD, &tnid) != 0;
    }
    return false;
@@ -190,8 +189,8 @@ bool TrayIcon::ChangeText()
    tnid.uFlags = NIF_TIP;
 
    if (SUCCEEDED(StringCchCopy(tnid.szTip,
-                               sizeof(tnid.szTip) / sizeof(TCHAR),
-                               tooltip_.c_str()))) {
+      sizeof(tnid.szTip) / sizeof(TCHAR),
+      tooltip_.c_str()))) {
       return Shell_NotifyIcon(NIM_MODIFY, &tnid) != 0;
    }
    return false;
index bdb9a8c4bd471d1a05c3c06003139106f546d6e3..f8db69c79a4e849daa7560ad68a097cff7eec924 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -32,18 +32,19 @@ POSSIBILITY OF SUCH DAMAGE.
 */
 
 #pragma once
-#include "StdAfx.h"
+
+#include "common.h"
 
 #define WM_TRAYICON (WM_APP + 700)
 
-class TrayIcon{
+class TrayIcon {
 public:
    TrayIcon();
    TrayIcon(HWND hWnd, UINT trayID, HICON hIcon, const std::wstring& tooltip,
-            bool show);
+      bool show);
    ~TrayIcon();
    void Init(HWND hWnd, UINT trayID, HICON hIcon, const std::wstring& tooltip,
-             bool show);
+      bool show);
    void Hide();
    void Show();
    bool IsShown() const { return iconVisible_; }
index 18361eaa7cb237cd5a0598d9dd608a1fd3941fa8..b8eeaa5a55b07fd18ec749d3d53d1adc49347b82 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#include "StdAfx.h"
+#include "Common.h"
 
 void PrintWindowsError(LPCWSTR lpszFunction, DWORD lastError)
 {
@@ -42,33 +42,33 @@ void PrintWindowsError(LPCWSTR lpszFunction, DWORD lastError)
 
    LPVOID lpMsgBuf;
    if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
-                     FORMAT_MESSAGE_FROM_SYSTEM |
-                     FORMAT_MESSAGE_IGNORE_INSERTS,
-                     nullptr, lastError,
-                     MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-                     reinterpret_cast<LPTSTR>(&lpMsgBuf), 0, nullptr) != 0) {
-      size_t displayBufSize = 
-          ((size_t)lstrlen(static_cast<LPCTSTR>(lpMsgBuf)) +
-           (size_t)lstrlen(static_cast<LPCTSTR>(lpszFunction))
+      FORMAT_MESSAGE_FROM_SYSTEM |
+      FORMAT_MESSAGE_IGNORE_INSERTS,
+      nullptr, lastError,
+      MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+      reinterpret_cast<LPTSTR>(&lpMsgBuf), 0, nullptr) != 0) {
+      size_t displayBufSize =
+         ((size_t)lstrlen(static_cast<LPCTSTR>(lpMsgBuf)) +
+            (size_t)lstrlen(static_cast<LPCTSTR>(lpszFunction))
             + 40) * sizeof(TCHAR);
       // Display the error message and exit the process
       LPVOID lpDisplayBuf = reinterpret_cast<LPVOID>(
-                                     LocalAlloc(LMEM_ZEROINIT, displayBufSize));
+         LocalAlloc(LMEM_ZEROINIT, displayBufSize));
       if (lpDisplayBuf) {
          StringCchPrintf((LPTSTR)lpDisplayBuf,
-                         LocalSize(lpDisplayBuf),
-                         _T("%s failed with error %u: %s"),
-                         lpszFunction,
-                         lastError,
-                         reinterpret_cast<TCHAR*>(lpMsgBuf));
+            LocalSize(lpDisplayBuf),
+            _T("%s failed with error %u: %s"),
+            lpszFunction,
+            lastError,
+            reinterpret_cast<TCHAR*>(lpMsgBuf));
          TaskDialog(nullptr,
-                    nullptr,
-                    PROGRAM_NAME,
-                    static_cast<LPCTSTR>(lpDisplayBuf),
-                    nullptr,
-                    TDCBF_OK_BUTTON,
-                    TD_ERROR_ICON,
-                    nullptr);
+            nullptr,
+            PROGRAM_NAME,
+            static_cast<LPCTSTR>(lpDisplayBuf),
+            nullptr,
+            TDCBF_OK_BUTTON,
+            TD_ERROR_ICON,
+            nullptr);
          LocalFree(lpDisplayBuf);
       }
       LocalFree(lpMsgBuf);
index 416c919fdd2d45d4c8ff5dba39b996ee3cae84b0..dd810e3013dcff900a15fefaec850be6e5c77c35 100644 (file)
@@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
 
 #pragma once
 
-#include "StdAfx.h"
+#include "common.h"
 
 #ifndef _versionhelpers_H_INCLUDED_ // avoid conflict with MS versionhelpers
 
@@ -44,9 +44,9 @@ inline bool IsWindowsVersionOrGreater(WORD wMajorVersion,
    OSVERSIONINFOEXW osvi = { sizeof(osvi), 0, 0, 0, 0, { 0 }, 0, 0 };
    DWORDLONG        const dwlConditionMask = VerSetConditionMask(
       VerSetConditionMask(
-      VerSetConditionMask(
-      0, VER_MAJORVERSION, VER_GREATER_EQUAL),
-      VER_MINORVERSION, VER_GREATER_EQUAL),
+         VerSetConditionMask(
+            0, VER_MAJORVERSION, VER_GREATER_EQUAL),
+         VER_MINORVERSION, VER_GREATER_EQUAL),
       VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL);
 
    osvi.dwMajorVersion = wMajorVersion;
index 7ca1907b8672a2cd8c9245254991de2f80488929..c5beb06e5b2ed3da0a10ef903adf5e1da2de773e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#include "StdAfx.h"
+#include "common.h"
 #include <mmdeviceapi.h>
 
 #pragma warning(disable : 4201)
@@ -69,56 +69,56 @@ bool VistaAudio::Init(HWND hParent)
    hParent_ = hParent;
    reInit_ = false;
 
-   if(FAILED(CoCreateInstance(__uuidof(MMDeviceEnumerator),
-         nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&deviceEnumerator_)))) {
-     return false;
+   if (FAILED(CoCreateInstance(__uuidof(MMDeviceEnumerator),
+      nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&deviceEnumerator_)))) {
+      return false;
    }
 
-   IMMDevice *defaultDevice = nullptr;
+   IMMDevice* defaultDevice = nullptr;
    HRESULT hr = deviceEnumerator_->GetDefaultAudioEndpoint(eRender, eConsole,
       &defaultDevice);
 
-   if(FAILED(hr)) {
+   if (FAILED(hr)) {
       if (hr != E_NOTFOUND) {
          TaskDialog(nullptr,
-                    nullptr,
-                    PROGRAM_NAME,
-                    _T("Failed to get default audio endpoint device"),
-                    _T("WinMute is not able to recover from that condition.\n")
-                    _T("Please try restarting the program"),
-                    TDCBF_OK_BUTTON,
-                    TD_ERROR_ICON,
-                    nullptr);
+            nullptr,
+            PROGRAM_NAME,
+            _T("Failed to get default audio endpoint device"),
+            _T("WinMute is not able to recover from that condition.\n")
+            _T("Please try restarting the program"),
+            TDCBF_OK_BUTTON,
+            TD_ERROR_ICON,
+            nullptr);
       }
       return false;
    }
 
    IAudioSessionManager2* sessionManager2 = nullptr;
    if (FAILED(defaultDevice->Activate(__uuidof(IAudioSessionManager2),
-                                CLSCTX_INPROC_SERVER, nullptr,
-                                reinterpret_cast<LPVOID*>(&sessionManager2)))) {
+      CLSCTX_INPROC_SERVER, nullptr,
+      reinterpret_cast<LPVOID*>(&sessionManager2)))) {
       TaskDialog(nullptr,
-                 nullptr,
-                 PROGRAM_NAME,
-                 _T("Failed to retrieve audio session manager."),
-                 _T("Please try restarting the program"),
-                 TDCBF_OK_BUTTON,
-                 TD_ERROR_ICON,
-                 nullptr);
+         nullptr,
+         PROGRAM_NAME,
+         _T("Failed to retrieve audio session manager."),
+         _T("Please try restarting the program"),
+         TDCBF_OK_BUTTON,
+         TD_ERROR_ICON,
+         nullptr);
       SafeRelease(&defaultDevice);
       return false;
    }
 
    if (FAILED(sessionManager2->GetAudioSessionControl(nullptr, 0,
-                                                      &sessionControl_))) {
+      &sessionControl_))) {
       TaskDialog(nullptr,
-                 nullptr,
-                 PROGRAM_NAME,
-                 _T("Failed to retrieve session control."),
-                 _T("Please try restarting the program"),
-                 TDCBF_OK_BUTTON,
-                 TD_ERROR_ICON,
-                 nullptr);
+         nullptr,
+         PROGRAM_NAME,
+         _T("Failed to retrieve session control."),
+         _T("Please try restarting the program"),
+         TDCBF_OK_BUTTON,
+         TD_ERROR_ICON,
+         nullptr);
       SafeRelease(&sessionManager2);
       return false;
    }
@@ -134,16 +134,16 @@ bool VistaAudio::Init(HWND hParent)
    }
 
    if (FAILED(defaultDevice->Activate(__uuidof(IAudioEndpointVolume),
-                                CLSCTX_INPROC_SERVER, nullptr,
-                                reinterpret_cast<LPVOID*>(&endpointVolume_)))) {
+      CLSCTX_INPROC_SERVER, nullptr,
+      reinterpret_cast<LPVOID*>(&endpointVolume_)))) {
       TaskDialog(nullptr,
-                 nullptr,
-                 PROGRAM_NAME,
-                 _T("Failed to activate default audio device."),
-                 _T("Please try restarting the program"),
-                 TDCBF_OK_BUTTON,
-                 TD_ERROR_ICON,
-                 nullptr);
+         nullptr,
+         PROGRAM_NAME,
+         _T("Failed to activate default audio device."),
+         _T("Please try restarting the program"),
+         TDCBF_OK_BUTTON,
+         TD_ERROR_ICON,
+         nullptr);
       SafeRelease(&defaultDevice);
       return false;
    }
index 9772e51cdbd0721afe2cc35f68be69471c5f294c..ea1ec371d02d8aeb201f64973103ea0a6d5df1ae 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -31,11 +31,10 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#include "StdAfx.h"
+#include "common.h"
 #include "WinAudio.h"
 #include "VistaAudioSessionEvents.h"
 
-
 VistaAudioSessionEvents::VistaAudioSessionEvents(WinAudio* notifyParent) :
    ref_(1)
 {
@@ -61,7 +60,7 @@ ULONG STDMETHODCALLTYPE VistaAudioSessionEvents::Release()
 }
 
 HRESULT STDMETHODCALLTYPE VistaAudioSessionEvents::QueryInterface(
-   REFIID riid, VOID **ppvInterface)
+   REFIID riid, VOID** ppvInterface)
 {
    if (riid == IID_IUnknown) {
       AddRef();
@@ -120,7 +119,7 @@ HRESULT STDMETHODCALLTYPE VistaAudioSessionEvents::OnSessionDisconnected(
    AudioSessionDisconnectReason disconnectReason)
 {
 
-   switch (disconnectReason)  {
+   switch (disconnectReason) {
    case DisconnectReasonDeviceRemoval:
    case DisconnectReasonFormatChanged:
    case DisconnectReasonSessionDisconnected:
@@ -128,14 +127,14 @@ HRESULT STDMETHODCALLTYPE VistaAudioSessionEvents::OnSessionDisconnected(
       break;
    case DisconnectReasonServerShutdown:
       TaskDialog(nullptr,
-                 nullptr,
-                 PROGRAM_NAME,
-                 _T("The audio service has been shut down. "),
-                 _T("WinMute is not able to recover from that condition.\n")
-                 _T("Please try restarting the program"),
-                 TDCBF_OK_BUTTON,
-                 TD_WARNING_ICON,
-                 nullptr);
+         nullptr,
+         PROGRAM_NAME,
+         _T("The audio service has been shut down. "),
+         _T("WinMute is not able to recover from that condition.\n")
+         _T("Please try restarting the program"),
+         TDCBF_OK_BUTTON,
+         TD_WARNING_ICON,
+         nullptr);
       break;
    case DisconnectReasonSessionLogoff:
       break;
index 621316ecf5d785f22c5e41af360146a76d55e778..bcb3711b990a46c665e3ad36d48aea45f087ed92 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#include "StdAfx.h"
+#include "common.h"
 #include <audiopolicy.h>
 
 class WinAudio;
@@ -45,36 +45,36 @@ public:
    ULONG STDMETHODCALLTYPE AddRef();
    ULONG STDMETHODCALLTYPE Release();
 
-   HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, VOID **ppvInterface);
+   HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, VOID** ppvInterface);
 
    // Notification methods for audio session events
    HRESULT STDMETHODCALLTYPE OnDisplayNameChanged(
-                              LPCWSTR newDisplayName,
-                              LPCGUID eventContext);
+      LPCWSTR newDisplayName,
+      LPCGUID eventContext);
 
    HRESULT STDMETHODCALLTYPE OnIconPathChanged(
-                              LPCWSTR newIconPath,
-                              LPCGUID eventContext);
+      LPCWSTR newIconPath,
+      LPCGUID eventContext);
 
    HRESULT STDMETHODCALLTYPE OnSimpleVolumeChanged(
-                              float newVolume,
-                              BOOL newMute,
-                              LPCGUID eventContext);
+      float newVolume,
+      BOOL newMute,
+      LPCGUID eventContext);
 
    HRESULT STDMETHODCALLTYPE OnChannelVolumeChanged(
-                              DWORD channelCount,
-                              float newChannelVolumeArray[],
-                              DWORD changedChannel,
-                              LPCGUID eventContext);
+      DWORD channelCount,
+      float newChannelVolumeArray[],
+      DWORD changedChannel,
+      LPCGUID eventContext);
 
    HRESULT STDMETHODCALLTYPE OnGroupingParamChanged(
-                              LPCGUID newGroupingParam,
-                              LPCGUID eventContext);
+      LPCGUID newGroupingParam,
+      LPCGUID eventContext);
 
    HRESULT STDMETHODCALLTYPE OnStateChanged(AudioSessionState newState);
 
    HRESULT STDMETHODCALLTYPE OnSessionDisconnected(
-            AudioSessionDisconnectReason disconnectReason);
+      AudioSessionDisconnectReason disconnectReason);
 
 private:
    LONG ref_;
index 5e83dc05fcbcaf2289c180e64a230c2e1613578c..a965b562597271778cf46048ed1a992c0132d914 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
 
 #pragma once
 
-#include "StdAfx.h"
+#include "common.h"
 
 class WinAudio {
 public:
@@ -42,7 +42,7 @@ public:
    virtual bool IsMuted() = 0;
    virtual void Mute() = 0;
    virtual void UnMute() = 0;
-   virtual ~WinAudio() noexcept { };
+   virtual ~WinAudio() noexcept {};
 };
 
 // Forwards
@@ -68,9 +68,9 @@ private:
 
    IAudioEndpointVolume* endpointVolume_;
    IAudioSessionControl* sessionControl_;
-   IMMDeviceEnumerator *deviceEnumerator_;
+   IMMDeviceEnumerator* deviceEnumerator_;
    VistaAudioSessionEvents* wasapiAudioEvents_;
-   MMNotificationClient*    mmnAudioEvents_;
+   MMNotificationClient* mmnAudioEvents_;
 
    bool reInit_;
    float oldVolume_;
index 0d04a90f6db1e211d45dc00525c065f95fd10b91..c3024ecbffcc5751425005a02f3029c8aea55c18 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -31,14 +31,14 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#include "StdAfx.h"
+#include "common.h"
 
 HINSTANCE hglobInstance;
 
 int WINAPI wWinMain(_In_ HINSTANCE hInstance,
-                   _In_opt_ HINSTANCE,
-                   _In_ PWSTR,
-                   _In_ int)
+   _In_opt_ HINSTANCE,
+   _In_ PWSTR,
+   _In_ int)
 {
    HANDLE hMutex = CreateMutex(nullptr, TRUE, _T("LxSystemsWinMute"));
    if (hMutex == nullptr) {
@@ -47,14 +47,14 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance,
    if (GetLastError() == ERROR_ALREADY_EXISTS) {
       ReleaseMutex(hMutex);
       TaskDialog(nullptr,
-                 nullptr,
-                 PROGRAM_NAME,
-                 _T("WinMute is already running"),
-                 _T("Please look for a white speaker icon in your Windows ")
-                 _T(" taskbar notification area."),
-                 TDCBF_OK_BUTTON,
-                 TD_INFORMATION_ICON,
-                 nullptr);
+         nullptr,
+         PROGRAM_NAME,
+         _T("WinMute is already running"),
+         _T("Please look for a white speaker icon in your Windows ")
+         _T(" taskbar notification area."),
+         TDCBF_OK_BUTTON,
+         TD_INFORMATION_ICON,
+         nullptr);
       return FALSE;
    }
 
@@ -67,14 +67,14 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance,
    initComCtrl.dwSize = sizeof(INITCOMMONCONTROLSEX);
    initComCtrl.dwICC = ICC_LINK_CLASS;
    if (InitCommonControlsEx(&initComCtrl) == FALSE) {
-         TaskDialog(nullptr,
-                    nullptr,
-                    PROGRAM_NAME,
-                    _T("Failed to register extended window controls."),
-                    _T("Please try to restart the program."),
-                    TDCBF_OK_BUTTON,
-                    TD_ERROR_ICON,
-                    nullptr);
+      TaskDialog(nullptr,
+         nullptr,
+         PROGRAM_NAME,
+         _T("Failed to register extended window controls."),
+         _T("Please try to restart the program."),
+         TDCBF_OK_BUTTON,
+         TD_ERROR_ICON,
+         nullptr);
       ReleaseMutex(hMutex);
       return FALSE;
    }
@@ -83,18 +83,18 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance,
    // <Init COM>
    if (CoInitializeEx(0, COINIT_APARTMENTTHREADED) != S_OK) {
       TaskDialog(nullptr,
-                  nullptr,
-                  PROGRAM_NAME,
-                  _T("Failed to initialize COM library."),
-                  _T("Please try to restart the program."),
-                  TDCBF_OK_BUTTON,
-                  TD_ERROR_ICON,
-                  nullptr);
+         nullptr,
+         PROGRAM_NAME,
+         _T("Failed to initialize COM library."),
+         _T("Please try to restart the program."),
+         TDCBF_OK_BUTTON,
+         TD_ERROR_ICON,
+         nullptr);
       ReleaseMutex(hMutex);
       return FALSE;
    }
 
-   MSG msg = {0};
+   MSG msg = { 0 };
    WinMute program;
    if (program.Init()) {
       while (GetMessage(&msg, nullptr, 0, 0)) {
index 6da378ffc5ba7dbc147f2fbd3eb616da51221fea..85a0fe81888b07823d3e63f981739d38dc8438ca 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#include "StdAfx.h"
+#include "common.h"
 #include "WinMute.h"
 #include "WinAudio.h"
 
@@ -42,21 +42,21 @@ extern INT_PTR CALLBACK QuietHoursDlgProc(HWND, UINT, WPARAM, LPARAM);
 static LPCTSTR WINMUTE_CLASS_NAME = _T("WinMute");
 
 static LRESULT CALLBACK WinMuteWndProc(HWND hWnd, UINT msg, WPARAM wParam,
-                                                            LPARAM lParam)
+   LPARAM lParam)
 {
    auto wm = reinterpret_cast<WinMute*>(GetWindowLongPtr(hWnd, GWLP_USERDATA));
    switch (msg) {
    case WM_NCCREATE: {
       LPCREATESTRUCTW cs = reinterpret_cast<LPCREATESTRUCTW>(lParam);
       SetWindowLongPtr(hWnd, GWLP_USERDATA,
-                       reinterpret_cast<LONG_PTR>(cs->lpCreateParams));
+         reinterpret_cast<LONG_PTR>(cs->lpCreateParams));
       return TRUE;
    }
    default:
       break;
    }
    return (wm) ? wm->WindowProc(hWnd, msg, wParam, lParam)
-                 : DefWindowProc(hWnd, msg, wParam, lParam);
+      : DefWindowProc(hWnd, msg, wParam, lParam);
 }
 
 static int IsDarkMode(bool& isDarkMode)
@@ -130,7 +130,7 @@ WinMute::~WinMute()
 
 bool WinMute::RegisterWindowClass()
 {
-   WNDCLASS wc={0};
+   WNDCLASS wc = { 0 };
    wc.hIcon = LoadIcon(hglobInstance, MAKEINTRESOURCE(IDI_APP));
    wc.hbrBackground = CreateSolidBrush(GetSysColor(COLOR_BTNFACE));
    wc.hInstance = hglobInstance;
@@ -160,11 +160,11 @@ bool WinMute::InitAudio()
    if (IsWindowsVistaOrGreater()) {
       audio_ = std::unique_ptr<WinAudio>(new VistaAudio);
    } else if (IsWindowsXPOrGreater()) {
-         TaskDialog(nullptr, nullptr, PROGRAM_NAME,
-           _T("Only Windows Vista and newer is supported"),
-           _T("For Windows XP support, please download WinMute ")
-           _T(" version 1.4.2 or older"),
-           TDCBF_OK_BUTTON, TD_ERROR_ICON, nullptr);
+      TaskDialog(nullptr, nullptr, PROGRAM_NAME,
+         _T("Only Windows Vista and newer is supported"),
+         _T("For Windows XP support, please download WinMute ")
+         _T(" version 1.4.2 or older"),
+         TDCBF_OK_BUTTON, TD_ERROR_ICON, nullptr);
       return false;
    }
 
@@ -203,13 +203,13 @@ bool WinMute::Init()
    hAppIcon_ = LoadIcon(hglobInstance, MAKEINTRESOURCE(IDI_APP));
 
    if (!settings_.Init() ||
-       !LoadDefaults()) {
+      !LoadDefaults()) {
       return false;
    }
 
    if (!RegisterWindowClass() ||
-       !InitWindow() ||
-       !InitTrayMenu()) {
+      !InitWindow() ||
+      !InitTrayMenu()) {
       return false;
    }
 
@@ -237,7 +237,7 @@ bool WinMute::Init()
    hTrayIcon_ = LoadIcon(
       hglobInstance,
       isDarkMode ? MAKEINTRESOURCE(IDI_TRAY_DARK)
-                 : MAKEINTRESOURCE(IDI_TRAY_BRIGHT));
+      : MAKEINTRESOURCE(IDI_TRAY_BRIGHT));
    if (hTrayIcon_ == NULL) {
       PrintWindowsError(_T("LoadIcon"));
       return false;
@@ -329,8 +329,7 @@ LRESULT CALLBACK WinMute::WindowProc(
          if (!state) {
             Log::GetInstance().Write("Mute: Off | Manual per Menu");
             audio_->UnMute();
-         }
-         else {
+         } else {
             Log::GetInstance().Write("Mute: On | Manual per Menu");
             audio_->Mute();
          }
@@ -354,8 +353,7 @@ LRESULT CALLBACK WinMute::WindowProc(
             muteConfig_.withRestore.onScreensaver);
          if (muteConfig_.withRestore.onScreensaver) {
             scrnSaverNoti_.ActivateNotifications(hWnd_);
-         }
-         else {
+         } else {
             scrnSaverNoti_.ClearNotifications();
          }
          break;
@@ -380,7 +378,8 @@ LRESULT CALLBACK WinMute::WindowProc(
       }
       return 0;
    }
-   case WM_TRAYICON: {
+   case WM_TRAYICON:
+   {
       switch (lParam) {
       case WM_LBUTTONUP:
       case WM_RBUTTONUP: {
@@ -413,10 +412,9 @@ LRESULT CALLBACK WinMute::WindowProc(
             }
             muteCounter_ += 1;
          }
-      }
-      else if (wParam == WTS_SESSION_UNLOCK) {
+      } else if (wParam == WTS_SESSION_UNLOCK) {
          if (muteConfig_.restoreAudio &&
-             muteConfig_.withRestore.onLock) {
+            muteConfig_.withRestore.onLock) {
             if (--muteCounter_ == 0) {
                Log::GetInstance().Write("Mute: Off | Workstation Unlock");
                audio_->UnMute();
@@ -439,8 +437,7 @@ LRESULT CALLBACK WinMute::WindowProc(
             Log::GetInstance().Write("Mute: On | Shutdown");
             audio_->Mute();
          }
-      }
-      else if ((lParam & ENDSESSION_LOGOFF)) {
+      } else if ((lParam & ENDSESSION_LOGOFF)) {
          if (muteConfig_.noRestore.onLogoff) {
             Log::GetInstance().Write("Mute: On | Logoff");
             audio_->Mute();
@@ -462,7 +459,7 @@ LRESULT CALLBACK WinMute::WindowProc(
    case WM_WINMUTE_QUIETHOURS_END:
       muteCounter_ -= 1;
       if (muteCounter_ > 0 && muteConfig_.quietHours.forceUnmute ||
-          muteCounter_ == 0) {
+         muteCounter_ == 0) {
          Log::GetInstance().Write("Mute: Off | Quiet Hours ended");
          audio_->UnMute();
          if (muteConfig_.quietHours.notifications) {
@@ -530,7 +527,7 @@ LRESULT CALLBACK WinMute::WindowProc(
          }
       } else if (wParam == SCRNSAVE_STOP) {
          if (muteConfig_.restoreAudio &&
-             muteConfig_.withRestore.onScreensaver) {
+            muteConfig_.withRestore.onScreensaver) {
             if (--muteCounter_ == 0) {
                Log::GetInstance().Write("Mute: Off | Screensaver start");
                audio_->UnMute();
@@ -546,7 +543,7 @@ LRESULT CALLBACK WinMute::WindowProc(
          hTrayIcon_ = LoadIcon(
             hglobInstance,
             isDarkMode ? MAKEINTRESOURCE(IDI_TRAY_DARK)
-                       : MAKEINTRESOURCE(IDI_TRAY_BRIGHT));
+            : MAKEINTRESOURCE(IDI_TRAY_BRIGHT));
          if (hTrayIcon_ == NULL) {
             PrintWindowsError(_T("LoadIcon"));
          } else {
@@ -619,8 +616,8 @@ static int GetDiffMillseconds(const LPSYSTEMTIME t1, const LPSYSTEMTIME t2)
 
 VOID CALLBACK QuietHoursTimer(HWND hWnd, UINT msg, UINT_PTR id, DWORD msSinceSysStart)
 {
-   UNREFERENCED_PARAMETER( msg );
-   UNREFERENCED_PARAMETER( msSinceSysStart );
+   UNREFERENCED_PARAMETER(msg);
+   UNREFERENCED_PARAMETER(msSinceSysStart);
    if (id == QUIETHOURS_TIMER_START_ID) {
       KillTimer(hWnd, id);
       SendMessage(hWnd, WM_WINMUTE_QUIETHOURS_START, 0, 0);
index 5994783c403b14eb6e622d60ba99739abd5b0d5a..d40a31ff41519c2c06a41b8723bff98a51c866bd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
 
 #pragma once
 
-#include "StdAfx.h"
+#include "common.h"
 
 class WinAudio;
 
@@ -52,7 +52,7 @@ public:
    bool Init();
    void Close();
 
-  // for internal use
+   // for internal use
    LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
 private:
    struct MuteConfigItem {
similarity index 57%
rename from WinMute/res.rc
rename to WinMute/WinMute.rc
index 2050bcbec13bd3118649d3fc93e2b4efda4bde3f..88c80862e57593d3f663dd969b0a0bccd65252b4 100644 (file)
@@ -7,7 +7,7 @@
 //
 // Generated from the TEXTINCLUDE 2 resource.
 //
-#include "afxres.h"
+#include "winres.h"
 
 /////////////////////////////////////////////////////////////////////////////
 #undef APSTUDIO_READONLY_SYMBOLS
@@ -25,18 +25,18 @@ LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
 // TEXTINCLUDE
 //
 
-1 TEXTINCLUDE
+1 TEXTINCLUDE 
 BEGIN
     "resource.h\0"
 END
 
-2 TEXTINCLUDE
+2 TEXTINCLUDE 
 BEGIN
-    "#include ""afxres.h""\r\n"
+    "#include ""winres.h""\r\n"
     "\0"
 END
 
-3 TEXTINCLUDE
+3 TEXTINCLUDE 
 BEGIN
     "\r\n"
     "\0"
@@ -45,73 +45,67 @@ END
 #endif    // APSTUDIO_INVOKED
 
 
-/////////////////////////////////////////////////////////////////////////////
-//
-// Menu
-//
-
-IDR_TRAYMENU MENU
-BEGIN
-    POPUP "TrayMenu"
-    BEGIN
-        MENUITEM "Info",                        ID_TRAYMENU_INFO
-        MENUITEM SEPARATOR
-        MENUITEM "Mute when ...",               ID_TRAYMENU_MUTEON, INACTIVE
-        MENUITEM "... Workstation is locked",   ID_TRAYMENU_MUTEONLOCK, CHECKED
-        MENUITEM "... Screensaver starts",      ID_TRAYMENU_MUTEONSCREENSAVER, CHECKED
-        MENUITEM SEPARATOR
-        MENUITEM "... Restore volume when returning", ID_TRAYMENU_RESTOREAUDIO, CHECKED
-        MENUITEM SEPARATOR
-        MENUITEM "Configure Quiet Hours...",    ID_TRAYMENU_CONFIGUREQUIETHOURS
-        MENUITEM SEPARATOR
-        MENUITEM "Mute on (no volume restore)...", ID_TRAYMENU_AFTERWARDS, INACTIVE
-        MENUITEM "... Shutdown",                ID_TRAYMENU_MUTEONSHUTDOWN
-        MENUITEM "... Sleep",                   ID_TRAYMENU_MUTEONSUSPEND
-        MENUITEM "... Logout",                  ID_TRAYMENU_MUTEONLOGOUT
-        MENUITEM SEPARATOR
-        MENUITEM "Mute now",                    ID_TRAYMENU_MUTE
-        MENUITEM SEPARATOR
-        MENUITEM "Exit",                        ID_TRAYMENU_EXIT
-    END
-END
-
-
 /////////////////////////////////////////////////////////////////////////////
 //
 // Dialog
 //
 
-IDD_ABOUT DIALOGEX 0, 0, 251, 56
-STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION
+IDD_ABOUT DIALOGEX 0, 0, 236, 56
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION
 CAPTION "About WinMute"
 FONT 8, "MS Shell Dlg", 400, 0, 0x1
 BEGIN
-    DEFPUSHBUTTON   "OK",IDOK,194,7,50,14
-    LTEXT           "WinMute v1.6.0",IDC_STATIC,43,9,67,11
+    DEFPUSHBUTTON   "OK",IDOK,178,7,50,14
+    LTEXT           "WinMute v1.6.0",IDC_STATIC,35,7,82,10
+    LTEXT           "Copyright (c) 2020, Alexander Steinhöfer",IDC_STATIC,35,20,135,8
+    ICON            IDI_APP,IDC_STATIC,7,7,20,20,SS_CENTERIMAGE
     CONTROL         "<a href=""https://lx-s.de"">lx-systems - lx-s.de</a>",IDC_LINK_HOMEPAGE,
-                    "SysLink",WS_TABSTOP,43,35,69,13
-    LTEXT           "Copyright � 2020, Alexander Steinh�fer",IDC_STATIC,43,22,148,12
-    ICON            IDI_APP,IDC_STATIC,13,12,20,20,SS_CENTERIMAGE
+                    "SysLink",WS_TABSTOP,34,33,82,14
     CONTROL         "<a href=""https://github.com/lx-s/WinMute/issues/"">Support</a>",IDC_LINK_SUPPORT,
-                    "SysLink",WS_TABSTOP,119,35,36,13
+                    "SysLink",WS_TABSTOP,106,33,60,14
 END
 
-IDD_QUIETHOURS DIALOGEX 0, 0, 201, 205
+IDD_QUIETHOURS DIALOGEX 0, 0, 212, 197
 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Configure Quiet Hours"
 FONT 8, "MS Shell Dlg", 400, 0, 0x1
 BEGIN
-    CONTROL         "Enable Quiet Hours",IDC_ENABLEQUIETHOURS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,42,77,10
-    CONTROL         "",IDC_QUIETHOURS_START,"SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP | 0x8,79,58,54,15
-    CONTROL         "",IDC_QUIETHOURS_END,"SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP | 0x8,79,80,54,15
-    CONTROL         "Force unmute",IDC_FORCEUNMUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,31,102,60,10
-    DEFPUSHBUTTON   "Save",IDOK,63,174,50,14
-    PUSHBUTTON      "Cancel",IDCANCEL,123,174,50,14
-    LTEXT           "If force unmute is enabled, WinMute will unmute your workstation when quiet hours end and not take into account if your workstation was already muted before quiet hours started.",IDC_STATIC,32,115,162,38
-    LTEXT           "Start time:",IDC_STATIC,31,60,42,12
-    LTEXT           "End time:",IDC_STATIC,31,82,43,12
-    LTEXT           "During Quiet Hours WinMute automatically mutes your PC volumes and unmutes it afterwards.",IDC_STATIC,14,15,180,24
-    CONTROL         "Show notifications",IDC_SHOWNOTIFICATIONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,32,153,74,10
+    DEFPUSHBUTTON   "Save",IDOK,101,176,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,155,176,50,14
+    LTEXT           "During Quiet Hours WinMute automatically mutes your PC volumes and unmutes it afterwards.",IDC_STATIC,11,10,182,22
+    CONTROL         "Enable Quiet Hours",IDC_ENABLEQUIETHOURS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,34,120,15
+    CONTROL         "",IDC_QUIETHOURS_START,"SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP | 0x8,77,51,65,18
+    CONTROL         "",IDC_QUIETHOURS_END,"SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP | 0x8,76,74,67,19
+    CONTROL         "Force unmute",IDC_FORCEUNMUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,27,97,86,16
+    CONTROL         "Show notifications",IDC_SHOWNOTIFICATIONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,27,150,81,21
+    LTEXT           "If force unmute is enabled, WinMute will unmute your workstation when quiet hours end and not take into account if your workstation was already muted before quiet hours started.",IDC_STATIC,27,115,161,37
+    LTEXT           "Start time:",IDC_STATIC,27,54,43,13
+    LTEXT           "End time:",IDC_STATIC,28,76,32,16
+END
+
+IDD_SETTINGS DIALOGEX 0, 0, 403, 238
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Settings"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,294,217,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,346,217,50,14
+    CONTROL         "",IDC_TREE1,"SysTreeView32",WS_BORDER | WS_HSCROLL | WS_TABSTOP,7,7,99,167
+    CONTROL         "",IDC_TAB1,"SysTabControl32",0x0,111,7,285,167
+END
+
+IDD_SETTINGS_GENERAL DIALOGEX 0, 0, 297, 171
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_SYSMENU
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    CONTROL         "Start WinMute on system startup",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,15,132,26
+END
+
+IDD_SETTINGS_QUIETHOURS DIALOGEX 0, 0, 310, 177
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_SYSMENU
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    LTEXT           "QUIET HOURS",IDC_STATIC,14,26,110,33
 END
 
 
@@ -126,8 +120,7 @@ BEGIN
     IDD_ABOUT, DIALOG
     BEGIN
         LEFTMARGIN, 7
-        RIGHTMARGIN, 244
-        VERTGUIDE, 43
+        RIGHTMARGIN, 229
         TOPMARGIN, 7
         BOTTOMMARGIN, 49
     END
@@ -135,14 +128,114 @@ BEGIN
     IDD_QUIETHOURS, DIALOG
     BEGIN
         LEFTMARGIN, 7
-        RIGHTMARGIN, 194
+        RIGHTMARGIN, 205
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 190
+    END
+
+    IDD_SETTINGS, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 396
         TOPMARGIN, 7
-        BOTTOMMARGIN, 198
+        BOTTOMMARGIN, 231
+    END
+
+    IDD_SETTINGS_GENERAL, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 290
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 164
+    END
+
+    IDD_SETTINGS_QUIETHOURS, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 303
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 170
     END
 END
 #endif    // APSTUDIO_INVOKED
 
 
+/////////////////////////////////////////////////////////////////////////////
+//
+// AFX_DIALOG_LAYOUT
+//
+
+IDD_ABOUT AFX_DIALOG_LAYOUT
+BEGIN
+    0
+END
+
+IDD_QUIETHOURS AFX_DIALOG_LAYOUT
+BEGIN
+    0
+END
+
+IDD_SETTINGS AFX_DIALOG_LAYOUT
+BEGIN
+    0
+END
+
+IDD_SETTINGS_GENERAL AFX_DIALOG_LAYOUT
+BEGIN
+    0
+END
+
+IDD_SETTINGS_QUIETHOURS AFX_DIALOG_LAYOUT
+BEGIN
+    0
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_APP                 ICON                    "icons\\app.ico"
+
+IDI_TRAY_BRIGHT         ICON                    "icons\\tray_bright.ico"
+
+IDI_TRAY_DARK           ICON                    "icons\\tray_dark.ico"
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+IDR_TRAYMENU MENU
+BEGIN
+    POPUP "TrayMenu"
+    BEGIN
+        MENUITEM "Info",                        ID_TRAYMENU_INFO
+        MENUITEM SEPARATOR
+        MENUITEM "Mute when...",                40003, INACTIVE
+        MENUITEM "... Workstation is locked",   ID_TRAYMENU_MUTEONLOCK, CHECKED
+        MENUITEM "... Screensaver starts",      ID_TRAYMENU_MUTEONSCREENSAVER, CHECKED
+        MENUITEM SEPARATOR
+        MENUITEM "Restore volume when returning", ID_TRAYMENU_RESTOREAUDIO, CHECKED
+        MENUITEM SEPARATOR
+        MENUITEM "Configure Quiet Hours...",    ID_TRAYMENU_CONFIGUREQUIETHOURS
+        MENUITEM SEPARATOR
+        MENUITEM "Mute on (no volume restore)", ID_TRAYMENU_AFTERWARDS, INACTIVE
+        MENUITEM "... Shutdown",                ID_TRAYMENU_MUTEONSHUTDOWN
+        MENUITEM "... Sleep",                   ID_TRAYMENU_MUTEONSUSPEND
+        MENUITEM "... Logout",                  ID_TRAYMENU_MUTEONLOGOUT
+        MENUITEM SEPARATOR
+        MENUITEM "Mute now",                    ID_TRAYMENU_MUTE
+        MENUITEM SEPARATOR
+        MENUITEM "Exit",                        ID_TRAYMENU_EXIT
+    END
+END
+
+
 /////////////////////////////////////////////////////////////////////////////
 //
 // Version
@@ -151,36 +244,36 @@ END
 VS_VERSION_INFO VERSIONINFO
  FILEVERSION 1,7,0,0
  PRODUCTVERSION 1,7,0,0
- FILEFLAGSMASK 0x17L
+ FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
 #else
  FILEFLAGS 0x0L
 #endif
- FILEOS 0x4L
+ FILEOS 0x40004L
  FILETYPE 0x1L
  FILESUBTYPE 0x0L
 BEGIN
     BLOCK "StringFileInfo"
     BEGIN
-        BLOCK "000004b0"
+        BLOCK "040004b0"
         BEGIN
-            VALUE "CompanyName", "lx-systems"
+            VALUE "CompanyName", "LX-Systems"
             VALUE "FileDescription", "WinMute"
             VALUE "FileVersion", "1.7.0.0"
-            VALUE "InternalName", "WinMute"
-            VALUE "LegalCopyright", "Copyright (c) 2022, Alexander Steinh�fer"
+            VALUE "InternalName", "WinMute.exe"
+            VALUE "LegalCopyright", "Copyright (C) 2022, Alexander Steinhöfer"
             VALUE "OriginalFilename", "WinMute.exe"
             VALUE "ProductName", "WinMute"
             VALUE "ProductVersion", "1.7.0.0"
         END
         BLOCK "040704b0"
         BEGIN
-            VALUE "CompanyName", "lx-systems"
+            VALUE "CompanyName", "LX-Systems"
             VALUE "FileDescription", "WinMute"
             VALUE "FileVersion", "1.7.0.0"
-            VALUE "InternalName", "WinMute"
-            VALUE "LegalCopyright", "Copyright (c) 2022, Alexander Steinh�fer"
+            VALUE "InternalName", "WinMute.exe"
+            VALUE "LegalCopyright", "Copyright (C) 2022, Alexander Steinhöfer"
             VALUE "OriginalFilename", "WinMute.exe"
             VALUE "ProductName", "WinMute"
             VALUE "ProductVersion", "1.7.0.0"
@@ -188,40 +281,10 @@ BEGIN
     END
     BLOCK "VarFileInfo"
     BEGIN
-        VALUE "Translation", 0x0, 1200, 0x407, 1200
+        VALUE "Translation", 0x400, 1200, 0x407, 1200
     END
 END
 
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_APP                 ICON                    "app.ico"
-
-IDI_TRAY_DARK           ICON                    "tray_dark.ico"
-
-IDI_TRAY_BRIGHT         ICON                    "tray_bright.ico"
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// AFX_DIALOG_LAYOUT
-//
-
-IDD_ABOUT AFX_DIALOG_LAYOUT
-BEGIN
-    0
-END
-
-IDD_QUIETHOURS AFX_DIALOG_LAYOUT
-BEGIN
-    0
-END
-
 #endif    // German (Germany) resources
 /////////////////////////////////////////////////////////////////////////////
 
@@ -236,3 +299,4 @@ END
 
 /////////////////////////////////////////////////////////////////////////////
 #endif    // not APSTUDIO_INVOKED
+
index 3e47fdc780acf16a219d18b5bb458538fd099c44..b8e4c0bcb00527d9f40985167ed62eb3f0f29917 100644 (file)
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|x64">
-      <Configuration>Debug</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|Win32">
       <Configuration>Release</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|x64">
       <Configuration>Release</Configuration>
       <Platform>x64</Platform>
     </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{488617F0-5DD3-42B5-81ED-A1E9B3117551}</ProjectGuid>
-    <RootNamespace>WinMute</RootNamespace>
+    <VCProjectVersion>16.0</VCProjectVersion>
     <Keyword>Win32Proj</Keyword>
+    <ProjectGuid>{479d2958-3ffc-43f8-8217-44d0ff9c11b1}</ProjectGuid>
+    <RootNamespace>WinMute</RootNamespace>
     <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+    <ProjectName>WinMute</ProjectName>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
-    <CharacterSet>Unicode</CharacterSet>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <UseDebugLibraries>true</UseDebugLibraries>
     <PlatformToolset>v143</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
     <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
-    <CharacterSet>Unicode</CharacterSet>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <UseDebugLibraries>false</UseDebugLibraries>
     <PlatformToolset>v143</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
     <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
-    <CharacterSet>Unicode</CharacterSet>
+    <UseDebugLibraries>true</UseDebugLibraries>
     <PlatformToolset>v143</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
     <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
-    <CharacterSet>Unicode</CharacterSet>
+    <UseDebugLibraries>false</UseDebugLibraries>
     <PlatformToolset>v143</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
     <SpectreMitigation>Spectre</SpectreMitigation>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+  <ImportGroup Label="Shared">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
-  <PropertyGroup>
-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)Bin\$(PlatformShortName)\</OutDir>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)Bin\$(PlatformShortName)\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir).buildtmp\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir).buildtmp\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)Bin\$(PlatformShortName)\</OutDir>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)Bin\$(PlatformShortName)\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir).buildtmp\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir).buildtmp\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
-    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
-    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
-    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
-    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectName)</TargetName>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)</TargetName>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <RunCodeAnalysis>true</RunCodeAnalysis>
-    <EnableCppCoreCheck>false</EnableCppCoreCheck>
-    <EnableExperimentalCppCoreCheck>false</EnableExperimentalCppCoreCheck>
-  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <RunCodeAnalysis>true</RunCodeAnalysis>
-    <EnableCppCoreCheck>false</EnableCppCoreCheck>
-    <EnableExperimentalCppCoreCheck>false</EnableExperimentalCppCoreCheck>
+    <LinkIncremental>true</LinkIncremental>
+    <OutDir>$(SolutionDir)Bin\</OutDir>
+    <IntDir>$(SolutionDir)Build\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <RunCodeAnalysis>true</RunCodeAnalysis>
-    <EnableCppCoreCheck>false</EnableCppCoreCheck>
-    <EnableExperimentalCppCoreCheck>false</EnableExperimentalCppCoreCheck>
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>$(SolutionDir)Bin\</OutDir>
+    <IntDir>$(SolutionDir)Build\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <RunCodeAnalysis>true</RunCodeAnalysis>
-    <EnableCppCoreCheck>false</EnableCppCoreCheck>
-    <EnableExperimentalCppCoreCheck>false</EnableExperimentalCppCoreCheck>
+    <LinkIncremental>true</LinkIncremental>
+    <OutDir>$(SolutionDir)Bin\</OutDir>
+    <IntDir>$(SolutionDir)Build\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>$(SolutionDir)Bin\</OutDir>
+    <IntDir>$(SolutionDir)Build\$(Configuration)\$(PlatformShortName)\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-      <PrecompiledHeader>Use</PrecompiledHeader>
       <WarningLevel>Level4</WarningLevel>
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
-      <TreatWarningAsError>true</TreatWarningAsError>
       <SDLCheck>true</SDLCheck>
-      <EnablePREfast>true</EnablePREfast>
-      <DiagnosticsFormat>Caret</DiagnosticsFormat>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ConformanceMode>true</ConformanceMode>
       <LanguageStandard>stdcpp20</LanguageStandard>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <DiagnosticsFormat>Caret</DiagnosticsFormat>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeaderFile>common.h</PrecompiledHeaderFile>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>strsafe.lib;comctl32.lib;WtsApi32.lib;Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
-      <TargetMachine>MachineX86</TargetMachine>
-      <ImageHasSafeExceptionHandlers />
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>strsafe.lib;comctl32.lib;WtsApi32.lib;Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
-    <Manifest>
-      <EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
-    </Manifest>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-      <PrecompiledHeader>Use</PrecompiledHeader>
       <WarningLevel>Level4</WarningLevel>
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
-      <TreatWarningAsError>true</TreatWarningAsError>
-      <EnablePREfast>true</EnablePREfast>
-      <DiagnosticsFormat>Caret</DiagnosticsFormat>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
       <SDLCheck>true</SDLCheck>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ConformanceMode>true</ConformanceMode>
       <LanguageStandard>stdcpp20</LanguageStandard>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <DiagnosticsFormat>Caret</DiagnosticsFormat>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeaderFile>common.h</PrecompiledHeaderFile>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>strsafe.lib;comctl32.lib;WtsApi32.lib;Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>strsafe.lib;comctl32.lib;WtsApi32.lib;Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
-    <Manifest>
-      <EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
-    </Manifest>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <ClCompile>
-      <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
-      <Optimization>MaxSpeed</Optimization>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <PrecompiledHeader>Use</PrecompiledHeader>
       <WarningLevel>Level4</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>
-      <TreatWarningAsError>true</TreatWarningAsError>
       <SDLCheck>true</SDLCheck>
-      <EnablePREfast>true</EnablePREfast>
-      <DiagnosticsFormat>Caret</DiagnosticsFormat>
-      <ControlFlowGuard>Guard</ControlFlowGuard>
-      <OmitFramePointers />
+      <PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ConformanceMode>true</ConformanceMode>
       <LanguageStandard>stdcpp20</LanguageStandard>
+      <TreatWarningAsError>true</TreatWarningAsError>
+      <DiagnosticsFormat>Caret</DiagnosticsFormat>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeaderFile>common.h</PrecompiledHeaderFile>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>strsafe.lib;comctl32.lib;WtsApi32.lib;Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
-      <OptimizeReferences>true</OptimizeReferences>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <TargetMachine>MachineX86</TargetMachine>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>strsafe.lib;comctl32.lib;WtsApi32.lib;Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
-    <PostBuildEvent>
-      <Command>copy "$(TargetPath)" "$(SolutionDir)dist\bin\$(PlatformShortName)\$(TargetFileName)"</Command>
-    </PostBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <ClCompile>
-      <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
-      <Optimization>MaxSpeed</Optimization>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <PrecompiledHeader>Use</PrecompiledHeader>
       <WarningLevel>Level4</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <SDLCheck>true</SDLCheck>
+      <PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ConformanceMode>true</ConformanceMode>
+      <LanguageStandard>stdcpp20</LanguageStandard>
       <TreatWarningAsError>true</TreatWarningAsError>
-      <EnablePREfast>true</EnablePREfast>
       <DiagnosticsFormat>Caret</DiagnosticsFormat>
-      <SDLCheck>true</SDLCheck>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
-      <ControlFlowGuard>Guard</ControlFlowGuard>
-      <LanguageStandard>stdcpp20</LanguageStandard>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeaderFile>common.h</PrecompiledHeaderFile>
     </ClCompile>
     <Link>
-      <AdditionalDependencies>strsafe.lib;comctl32.lib;WtsApi32.lib;Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
-      <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>strsafe.lib;comctl32.lib;WtsApi32.lib;Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
-    <PostBuildEvent>
-      <Command>copy "$(TargetPath)" "$(SolutionDir)dist\bin\$(PlatformShortName)\$(TargetFileName)"</Command>
-    </PostBuildEvent>
   </ItemDefinitionGroup>
   <ItemGroup>
-    <ClCompile Include="AboutDlg.cpp" />
-    <ClCompile Include="Log.cpp" />
-    <ClCompile Include="MMNotificationClient.cpp" />
-    <ClCompile Include="QuietHoursDlg.cpp" />
-    <ClCompile Include="ScreensaverNotifier.cpp" />
-    <ClCompile Include="Settings.cpp" />
-    <ClCompile Include="StdAfx.cpp">
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
-    </ClCompile>
-    <ClCompile Include="TrayIcon.cpp" />
-    <ClCompile Include="Utility.cpp" />
-    <ClCompile Include="VistaAudio.cpp" />
-    <ClCompile Include="VistaAudioSessionEvents.cpp" />
-    <ClCompile Include="WinMain.cpp" />
-    <ClCompile Include="WinMute.cpp" />
-  </ItemGroup>
-  <ItemGroup>
+    <ClInclude Include="common.h" />
     <ClInclude Include="Log.h" />
     <ClInclude Include="MMNotificationClient.h" />
     <ClInclude Include="resource.h" />
     <ClInclude Include="ScreensaverNotifier.h" />
-    <ClInclude Include="Settings.h" />
-    <ClInclude Include="StdAfx.h" />
+    <ClInclude Include="settings.h" />
     <ClInclude Include="TrayIcon.h" />
     <ClInclude Include="VersionHelper.h" />
     <ClInclude Include="VistaAudioSessionEvents.h" />
     <ClInclude Include="WinMute.h" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="app.ico" />
-    <None Include="tray_dark.ico" />
+    <ResourceCompile Include="WinMute.rc" />
   </ItemGroup>
   <ItemGroup>
-    <ResourceCompile Include="res.rc" />
+    <Image Include="icons\app.ico" />
+    <Image Include="icons\tray_bright.ico" />
+    <Image Include="icons\tray_dark.ico" />
   </ItemGroup>
   <ItemGroup>
-    <Image Include="tray_bright.ico" />
+    <ClCompile Include="AboutDlg.cpp" />
+    <ClCompile Include="common.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="Log.cpp" />
+    <ClCompile Include="MMNotificationClient.cpp" />
+    <ClCompile Include="QuietHoursDlg.cpp" />
+    <ClCompile Include="ScreensaverNotifier.cpp" />
+    <ClCompile Include="Settings.cpp" />
+    <ClCompile Include="TrayIcon.cpp" />
+    <ClCompile Include="Utility.cpp" />
+    <ClCompile Include="VistaAudio.cpp" />
+    <ClCompile Include="VistaAudioSessionEvents.cpp" />
+    <ClCompile Include="WinMain.cpp" />
+    <ClCompile Include="WinMute.cpp" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
index ce204de628179a15bb82478dbbaada21e534b640..f464b6e27a02ece3b215f798e38c9048fdc57425 100644 (file)
   <ItemGroup>
     <Filter Include="Source Files">
       <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+      <Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
     </Filter>
     <Filter Include="Resource Files">
       <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
-      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
     </Filter>
     <Filter Include="Source Files\Audio">
-      <UniqueIdentifier>{065a6082-9732-43e4-ad7b-714757809908}</UniqueIdentifier>
+      <UniqueIdentifier>{6fe7a132-28a9-4b7b-aa69-1380069e7ee3}</UniqueIdentifier>
     </Filter>
-    <Filter Include="Source Files\UI">
-      <UniqueIdentifier>{19d0b819-b48e-4418-917c-f92abc4c2160}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="Source Files\Audio\Vista Notification">
-      <UniqueIdentifier>{4ea37611-be22-4541-bfcb-ca9d271b5166}</UniqueIdentifier>
+    <Filter Include="Source Files\Audio\VistaAudio">
+      <UniqueIdentifier>{50123732-775b-41e8-9f2b-fc5925475924}</UniqueIdentifier>
     </Filter>
     <Filter Include="Source Files\Helper">
-      <UniqueIdentifier>{aca601be-bf13-4396-89b2-8252b3fd2703}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="Source Files\Settings">
-      <UniqueIdentifier>{f9c118fc-0a72-4278-a710-841604aeb3e3}</UniqueIdentifier>
+      <UniqueIdentifier>{5f81f4a6-31a5-4c91-8563-6b63f79478fc}</UniqueIdentifier>
     </Filter>
     <Filter Include="Source Files\Log">
-      <UniqueIdentifier>{dc591c83-7135-4757-b9cb-54405dbc8d86}</UniqueIdentifier>
+      <UniqueIdentifier>{b90f43eb-497c-4b84-b7d9-df7a809e9cab}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source Files\UI">
+      <UniqueIdentifier>{8054b676-f98f-4a0b-bf41-266bac229306}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source Files\Settings">
+      <UniqueIdentifier>{0cfb448e-c954-4181-96c8-c89e8d1728aa}</UniqueIdentifier>
     </Filter>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="StdAfx.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="WinMain.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="WinMute.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="VistaAudio.cpp">
+    <ClInclude Include="WinAudio.h">
       <Filter>Source Files\Audio</Filter>
-    </ClCompile>
-    <ClCompile Include="TrayIcon.cpp">
-      <Filter>Source Files\UI</Filter>
-    </ClCompile>
-    <ClCompile Include="AboutDlg.cpp">
-      <Filter>Source Files\UI</Filter>
-    </ClCompile>
-    <ClCompile Include="VistaAudioSessionEvents.cpp">
-      <Filter>Source Files\Audio\Vista Notification</Filter>
-    </ClCompile>
-    <ClCompile Include="MMNotificationClient.cpp">
-      <Filter>Source Files\Audio\Vista Notification</Filter>
-    </ClCompile>
-    <ClCompile Include="ScreensaverNotifier.cpp">
-      <Filter>Source Files\Helper</Filter>
-    </ClCompile>
-    <ClCompile Include="Utility.cpp">
+    </ClInclude>
+    <ClInclude Include="common.h">
+      <Filter>Source Files</Filter>
+    </ClInclude>
+    <ClInclude Include="MMNotificationClient.h">
+      <Filter>Source Files\Audio\VistaAudio</Filter>
+    </ClInclude>
+    <ClInclude Include="VistaAudioSessionEvents.h">
+      <Filter>Source Files\Audio\VistaAudio</Filter>
+    </ClInclude>
+    <ClInclude Include="ScreensaverNotifier.h">
       <Filter>Source Files\Helper</Filter>
-    </ClCompile>
-    <ClCompile Include="Settings.cpp">
-      <Filter>Source Files\Settings</Filter>
-    </ClCompile>
-    <ClCompile Include="QuietHoursDlg.cpp">
-      <Filter>Source Files\UI</Filter>
-    </ClCompile>
-    <ClCompile Include="Log.cpp">
+    </ClInclude>
+    <ClInclude Include="Log.h">
       <Filter>Source Files\Log</Filter>
-    </ClCompile>
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="resource.h">
-      <Filter>Source Files\UI</Filter>
     </ClInclude>
-    <ClInclude Include="StdAfx.h">
+    <ClInclude Include="resource.h">
       <Filter>Source Files</Filter>
     </ClInclude>
     <ClInclude Include="TrayIcon.h">
       <Filter>Source Files\UI</Filter>
     </ClInclude>
-    <ClInclude Include="WinAudio.h">
-      <Filter>Source Files\Audio</Filter>
-    </ClInclude>
     <ClInclude Include="WinMute.h">
       <Filter>Source Files</Filter>
     </ClInclude>
-    <ClInclude Include="VistaAudioSessionEvents.h">
-      <Filter>Source Files\Audio\Vista Notification</Filter>
-    </ClInclude>
-    <ClInclude Include="MMNotificationClient.h">
-      <Filter>Source Files\Audio\Vista Notification</Filter>
-    </ClInclude>
-    <ClInclude Include="ScreensaverNotifier.h">
-      <Filter>Source Files\Helper</Filter>
+    <ClInclude Include="settings.h">
+      <Filter>Source Files\Settings</Filter>
     </ClInclude>
     <ClInclude Include="VersionHelper.h">
       <Filter>Source Files\Helper</Filter>
     </ClInclude>
-    <ClInclude Include="Settings.h">
-      <Filter>Source Files\Settings</Filter>
-    </ClInclude>
-    <ClInclude Include="Log.h">
-      <Filter>Source Files\Log</Filter>
-    </ClInclude>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="app.ico">
-      <Filter>Resource Files</Filter>
-    </None>
-    <None Include="tray_dark.ico">
-      <Filter>Resource Files</Filter>
-    </None>
   </ItemGroup>
   <ItemGroup>
-    <ResourceCompile Include="res.rc">
+    <ResourceCompile Include="WinMute.rc">
       <Filter>Resource Files</Filter>
     </ResourceCompile>
   </ItemGroup>
   <ItemGroup>
-    <Image Include="tray_bright.ico">
+    <Image Include="icons\app.ico">
+      <Filter>Resource Files</Filter>
+    </Image>
+    <Image Include="icons\tray_bright.ico">
       <Filter>Resource Files</Filter>
     </Image>
+    <Image Include="icons\tray_dark.ico">
+      <Filter>Resource Files</Filter>
+    </Image>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="common.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="VistaAudio.cpp">
+      <Filter>Source Files\Audio</Filter>
+    </ClCompile>
+    <ClCompile Include="MMNotificationClient.cpp">
+      <Filter>Source Files\Audio\VistaAudio</Filter>
+    </ClCompile>
+    <ClCompile Include="VistaAudioSessionEvents.cpp">
+      <Filter>Source Files\Audio\VistaAudio</Filter>
+    </ClCompile>
+    <ClCompile Include="ScreensaverNotifier.cpp">
+      <Filter>Source Files\Helper</Filter>
+    </ClCompile>
+    <ClCompile Include="Utility.cpp">
+      <Filter>Source Files\Helper</Filter>
+    </ClCompile>
+    <ClCompile Include="Log.cpp">
+      <Filter>Source Files\Log</Filter>
+    </ClCompile>
+    <ClCompile Include="AboutDlg.cpp">
+      <Filter>Source Files\UI</Filter>
+    </ClCompile>
+    <ClCompile Include="QuietHoursDlg.cpp">
+      <Filter>Source Files\UI</Filter>
+    </ClCompile>
+    <ClCompile Include="TrayIcon.cpp">
+      <Filter>Source Files\UI</Filter>
+    </ClCompile>
+    <ClCompile Include="WinMain.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="WinMute.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="Settings.cpp">
+      <Filter>Source Files\Settings</Filter>
+    </ClCompile>
   </ItemGroup>
 </Project>
\ No newline at end of file
index d7f1df82770a349cea23c5feea8ea3c032e2fadf..88a550947edbc3c5003a41726f0749201fdb6822 100644 (file)
@@ -1,19 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LocalDebuggerWorkingDirectory>$(OutputPath)</LocalDebuggerWorkingDirectory>
-    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LocalDebuggerWorkingDirectory>$(OutputPath)</LocalDebuggerWorkingDirectory>
-    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <LocalDebuggerWorkingDirectory>$(OutputPath)</LocalDebuggerWorkingDirectory>
-    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <LocalDebuggerWorkingDirectory>$(OutputPath)</LocalDebuggerWorkingDirectory>
-    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
-  </PropertyGroup>
+<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup />
 </Project>
\ No newline at end of file
similarity index 95%
rename from WinMute/StdAfx.cpp
rename to WinMute/common.cpp
index ea86dd7a62183f828710742e2603b1ed1e8f4007..6e47737131bdeb1c20df5dbe1569d325db21ee06 100644 (file)
@@ -1,5 +1,5 @@
 /* WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -30,4 +30,4 @@ POSSIBILITY OF SUCH DAMAGE.
 -----------------------------------------------------------------------------
 */
 
-#include "StdAfx.h"
+#include "common.h"
similarity index 71%
rename from WinMute/StdAfx.h
rename to WinMute/common.h
index d04f37364f9b4a882be952b9c05f0dd7eee4c39f..0968c58da7679c746fd77cca508c046b35e0d819 100644 (file)
@@ -1,6 +1,6 @@
 /*
  WinMute
-           Copyright (c) 2021, Alexander Steinhoefer
+           Copyright (c) 2022, Alexander Steinhoefer
 
 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -34,15 +34,15 @@ POSSIBILITY OF SUCH DAMAGE.
 #pragma once
 
 #ifdef _UNICODE
-   #if defined _M_IX86
-      #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
-   #elif defined _M_IA64
-      #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
-   #elif defined _M_X64
-      #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
-   #else
-      #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
-   #endif
+#if defined _M_IX86
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#elif defined _M_IA64
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#elif defined _M_X64
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#else
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#endif
 #endif
 
 #define STRICT
@@ -87,9 +87,9 @@ inline void SafeRelease(Interface** ppInterfaceToRelease)
 }
 
 #ifdef UNICODE
-   typedef std::basic_string<wchar_t> tstring;
+typedef std::basic_string<wchar_t> tstring;
 #else
-   typedef std::basic_string<char> tstring;
+typedef std::basic_string<char> tstring;
 #endif
 
 // Utility
similarity index 100%
rename from WinMute/app.ico
rename to WinMute/icons/app.ico
index c03b64013c13dedd825244235a6e74f212930a15..36de0f878c7ebc8a76356f0e215dc538716ac70e 100644 (file)
@@ -1,60 +1,58 @@
 //{{NO_DEPENDENCIES}}
 // Microsoft Visual C++ generated include file.
-// Used by res.rc
+// Used by WinMute.rc
 //
-#define IDR_TRAYMENU                    101
-#define IDD_ABOUT                       102
-#define IDI_APP                         106
-#define IDI_ICON1                       107
-#define IDI_TRAY                        107
-#define IDI_TRAY_DARK                   107
-#define IDD_QUIETHOURS                  108
-#define IDI_TRAY_BRIGHT                 110
+#define IDI_APP                         5
+#define IDD_ABOUT                       9
+#define IDI_TRAY_BRIGHT                 104
+#define IDI_TRAY_DARK                   105
+#define IDR_TRAYMENU                    106
+#define IDD_QUIETHOURS                  107
+#define IDD_SETTINGS                    109
+#define IDD_SETTINGS_GENERAL            114
+#define IDD_SETTINGS_QUIETHOURS         116
 #define IDC_LINK_HOMEPAGE               1001
-#define IDC_LINK_HOMEPAGE2              1002
 #define IDC_LINK_SUPPORT                1002
-#define IDC_QUIETHOURS_START            1002
 #define IDC_ENABLEQUIETHOURS            1003
-#define IDC_QUIETHOURS_END              1004
-#define IDC_FORCEUNMUTE                 1005
-#define IDC_FORCEUNMUTE2                1006
-#define IDC_SHOWNOTIFICATIONS           1006
+#define IDC_QUIETHOURS_START            1004
+#define IDC_QUIETHOURS_END              1005
+#define IDC_FORCEUNMUTE                 1006
+#define IDC_SHOWNOTIFICATIONS           1007
+#define IDC_TREE1                       1008
+#define IDC_TAB1                        1010
+#define IDC_CHECK1                      1011
 #define ID_TRAYMENU_INFO                40001
-#define ID_TRAYMENU_EXIT                40002
-#define ID_TRAYMENU_MUTEONLOCK          40003
-#define ID_TRAYMENU_MUTEONSCREENSAVER   40004
-#define ID_TRAYMENU_                    40005
-#define ID_TRAYMENU_MUTEONMONITOROFF    40006
-#define ID_TRAYMENU_MUTE                40007
-#define ID_TRAYMENU_MUTEONSCREENSAVER40008 40008
-#define ID_TRAYMENU_RESTOREAUDIO        40009
+#define ID_TRAYMENU_                    40002
+#define ID_TRAYMENU_MUTEON              40003
+#define ID_TRAYMENU_ID                  40004
+#define ID_TRAYMENU_MUTEONSCREENSAVER   40005
+#define ID_TRAYMENU_40006               40006
+#define ID_TRAYMENU_RESTOREAUDIO        40007
+#define ID_TRAYMENU_40008               40008
+#define ID_TRAYMENU_CONFIGUREQUIETHOURS 40009
 #define ID_TRAYMENU_40010               40010
-#define ID_TRAYMENU_40011               40011
-#define ID_TRAYMENU_MUTEON              40012
-#define ID_TRAYMENU_AFTERWARDS          40013
-#define ID_TRAYMENU_MUTEONSUSPEND       40014
+#define ID_TRAYMENU_MUTEON40011         40011
+#define ID_TRAYMENU_AFTERWARDS          40012
+#define ID_TRAYMENU_40013               40013
+#define ID_TRAYMENU_MUTEONSHUTDOWN      40014
 #define ID_TRAYMENU_40015               40015
-#define ID_TRAYMENU_SPECIAL             40016
-#define ID_SPECIAL_MUTEWHEN             40017
-#define ID_TRAYMENU_40018               40018
+#define ID_TRAYMENU_MUTEONSUSPEND       40016
+#define ID_TRAYMENU_40017               40017
+#define ID_TRAYMENU_MUTEONLOGOUT        40018
 #define ID_TRAYMENU_40019               40019
-#define ID_TRAYMENU_40020               40020
-#define ID_TRAYMENU_MUTEONSHUTDOWN      40021
-#define ID_TRAYMENU_MUTEONSLEEP         40022
-#define ID_TRAYMENU_MUTEONLOGOFF        40023
-#define ID_TRAYMENU_MUTEONLOGOUT        40024
-#define ID_TRAYMENU_40025               40025
-#define ID_TRAYMENU_CONFIGUREQUIETHOURS 40026
-#define ID_TRAYMENU_40027               40027
-#define ID_TRAYMENU_QUIETHO             40028
+#define ID_TRAYMENU_MUTENOW             40020
+#define ID_TRAYMENU_40021               40021
+#define ID_TRAYMENU_EXIT                40022
+#define ID_TRAYMENU_MUTE                40023
+#define ID_TRAYMENU_MUTEONLOCK          40024
 
 // Next default values for new objects
 // 
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        112
-#define _APS_NEXT_COMMAND_VALUE         40029
-#define _APS_NEXT_CONTROL_VALUE         1004
+#define _APS_NEXT_RESOURCE_VALUE        118
+#define _APS_NEXT_COMMAND_VALUE         40025
+#define _APS_NEXT_CONTROL_VALUE         1012
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif