*.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
/*
ScreensaverNotify DLL
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
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);
0);
if (hook_ == nullptr) {
MessageBoxW(NULL, _T("Failed to install hook"), _T("WinMute"),
- MB_ICONERROR);
+ MB_ICONERROR);
}
return hook_ != nullptr;
}
/*
ScreensaverNotify DLL
- Copyright (c) 2017, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
#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" {
-<?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">
<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>
<?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
<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" />
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
notifyWndMsg_(0),
regHook_(nullptr),
unregHook_(nullptr)
-{ }
+{
+}
ScreensaverNotifierProxy::~ScreensaverNotifierProxy()
{
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
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);
<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>
</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>
<?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
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
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
-----------------------------------------------------------------------------
*/
-#include "StdAfx.h"
+#include "common.h"
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;
}
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
-----------------------------------------------------------------------------
*/
-#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();
}
return log;
}
-Log::Log():
+Log::Log() :
initialized_(false)
{
if (OpenLogFile(logFile_)) {
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
#pragma once
-#include "StdAfx.h"
+#include "common.h"
class Log {
public:
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
-----------------------------------------------------------------------------
*/
-#include "StdAfx.h"
+#include "common.h"
#include "WinAudio.h"
#include "MMNotificationClient.h"
}
HRESULT STDMETHODCALLTYPE MMNotificationClient::QueryInterface(
- REFIID riid, VOID **ppvInterface)
+ REFIID riid, VOID** ppvInterface)
{
if (IID_IUnknown == riid) {
AddRef();
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
-----------------------------------------------------------------------------
*/
-#include "StdAfx.h"
+#include "Common.h"
#include <Mmdeviceapi.h>
class WinAudio;
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
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
-----------------------------------------------------------------------------
*/
-#include "StdAfx.h"
+#include "common.h"
static bool IsValidTimeRange(
const LPSYSTEMTIME start,
{
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,
}
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,
{
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));
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);
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;
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
-----------------------------------------------------------------------------
*/
-#include "StdAfx.h"
+#include "common.h"
#include "ScreensaverNotifier.h"
/* ========================================================================== */
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);
}
/* ========================================================================== */
hookWndMsg_(0),
regHook_(nullptr),
unregHook_(nullptr)
-{ }
+{
+}
ScreensaverNotifier::~ScreensaverNotifier()
{
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;
{
BOOL isRunning = FALSE;
if (SystemParametersInfo(
- SPI_GETSCREENSAVERRUNNING,
- 0,
- &isRunning,
- FALSE) == FALSE) {
+ SPI_GETSCREENSAVERRUNNING,
+ 0,
+ &isRunning,
+ FALSE) == FALSE) {
PrintWindowsError(_T("SystemParametersInfo"));
return false;
}
{
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);
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
#pragma once
-#include "StdAfx.h"
+#include "common.h"
#define WM_SCRNSAVE_CHANGE (WM_APP + 100)
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
-----------------------------------------------------------------------------
*/
-#include "StdAfx.h"
+#include "common.h"
#include "Settings.h"
static const LPCWSTR LX_SYSTEMS_SUBKEY = _T("SOFTWARE\\lx-systems\\WinMute");
Settings::Settings() :
hRegSettingsKey_(nullptr)
-{ }
+{
+}
Settings::~Settings()
{
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
#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
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
-----------------------------------------------------------------------------
*/
-#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);
void TrayIcon::Show()
{
if (!iconVisible_) {
- if(AddNotifyIcon()) {
+ if (AddNotifyIcon()) {
iconVisible_ = true;
}
}
}
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);
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);
}
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;
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;
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
*/
#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_; }
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
-----------------------------------------------------------------------------
*/
-#include "StdAfx.h"
+#include "Common.h"
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);
#pragma once
-#include "StdAfx.h"
+#include "common.h"
#ifndef _versionhelpers_H_INCLUDED_ // avoid conflict with MS versionhelpers
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;
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
-----------------------------------------------------------------------------
*/
-#include "StdAfx.h"
+#include "common.h"
#include <mmdeviceapi.h>
#pragma warning(disable : 4201)
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;
}
}
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;
}
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
-----------------------------------------------------------------------------
*/
-#include "StdAfx.h"
+#include "common.h"
#include "WinAudio.h"
#include "VistaAudioSessionEvents.h"
-
VistaAudioSessionEvents::VistaAudioSessionEvents(WinAudio* notifyParent) :
ref_(1)
{
}
HRESULT STDMETHODCALLTYPE VistaAudioSessionEvents::QueryInterface(
- REFIID riid, VOID **ppvInterface)
+ REFIID riid, VOID** ppvInterface)
{
if (riid == IID_IUnknown) {
AddRef();
AudioSessionDisconnectReason disconnectReason)
{
- switch (disconnectReason) {
+ switch (disconnectReason) {
case DisconnectReasonDeviceRemoval:
case DisconnectReasonFormatChanged:
case DisconnectReasonSessionDisconnected:
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;
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
-----------------------------------------------------------------------------
*/
-#include "StdAfx.h"
+#include "common.h"
#include <audiopolicy.h>
class WinAudio;
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_;
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
#pragma once
-#include "StdAfx.h"
+#include "common.h"
class WinAudio {
public:
virtual bool IsMuted() = 0;
virtual void Mute() = 0;
virtual void UnMute() = 0;
- virtual ~WinAudio() noexcept { };
+ virtual ~WinAudio() noexcept {};
};
// Forwards
IAudioEndpointVolume* endpointVolume_;
IAudioSessionControl* sessionControl_;
- IMMDeviceEnumerator *deviceEnumerator_;
+ IMMDeviceEnumerator* deviceEnumerator_;
VistaAudioSessionEvents* wasapiAudioEvents_;
- MMNotificationClient* mmnAudioEvents_;
+ MMNotificationClient* mmnAudioEvents_;
bool reInit_;
float oldVolume_;
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
-----------------------------------------------------------------------------
*/
-#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) {
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;
}
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;
}
// <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)) {
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
-----------------------------------------------------------------------------
*/
-#include "StdAfx.h"
+#include "common.h"
#include "WinMute.h"
#include "WinAudio.h"
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)
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;
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;
}
hAppIcon_ = LoadIcon(hglobInstance, MAKEINTRESOURCE(IDI_APP));
if (!settings_.Init() ||
- !LoadDefaults()) {
+ !LoadDefaults()) {
return false;
}
if (!RegisterWindowClass() ||
- !InitWindow() ||
- !InitTrayMenu()) {
+ !InitWindow() ||
+ !InitTrayMenu()) {
return false;
}
hTrayIcon_ = LoadIcon(
hglobInstance,
isDarkMode ? MAKEINTRESOURCE(IDI_TRAY_DARK)
- : MAKEINTRESOURCE(IDI_TRAY_BRIGHT));
+ : MAKEINTRESOURCE(IDI_TRAY_BRIGHT));
if (hTrayIcon_ == NULL) {
PrintWindowsError(_T("LoadIcon"));
return false;
if (!state) {
Log::GetInstance().Write("Mute: Off | Manual per Menu");
audio_->UnMute();
- }
- else {
+ } else {
Log::GetInstance().Write("Mute: On | Manual per Menu");
audio_->Mute();
}
muteConfig_.withRestore.onScreensaver);
if (muteConfig_.withRestore.onScreensaver) {
scrnSaverNoti_.ActivateNotifications(hWnd_);
- }
- else {
+ } else {
scrnSaverNoti_.ClearNotifications();
}
break;
}
return 0;
}
- case WM_TRAYICON: {
+ case WM_TRAYICON:
+ {
switch (lParam) {
case WM_LBUTTONUP:
case WM_RBUTTONUP: {
}
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();
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();
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) {
}
} 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();
hTrayIcon_ = LoadIcon(
hglobInstance,
isDarkMode ? MAKEINTRESOURCE(IDI_TRAY_DARK)
- : MAKEINTRESOURCE(IDI_TRAY_BRIGHT));
+ : MAKEINTRESOURCE(IDI_TRAY_BRIGHT));
if (hTrayIcon_ == NULL) {
PrintWindowsError(_T("LoadIcon"));
} else {
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);
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
#pragma once
-#include "StdAfx.h"
+#include "common.h"
class WinAudio;
bool Init();
void Close();
- // for internal use
+ // for internal use
LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
private:
struct MuteConfigItem {
//
// Generated from the TEXTINCLUDE 2 resource.
//
-#include "afxres.h"
+#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
// 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"
#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
IDD_ABOUT, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 244
- VERTGUIDE, 43
+ RIGHTMARGIN, 229
TOPMARGIN, 7
BOTTOMMARGIN, 49
END
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
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"
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
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
+
-<?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">
<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
<?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
/* WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
-----------------------------------------------------------------------------
*/
-#include "StdAfx.h"
+#include "common.h"
/*
WinMute
- Copyright (c) 2021, Alexander Steinhoefer
+ Copyright (c) 2022, Alexander Steinhoefer
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
#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
}
#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
//{{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