Skip to content

Commit

Permalink
Modify:Remove the shortcut key method to minimize to tray
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendrix4858 committed Jan 7, 2025
1 parent 2de7ba8 commit fd1c35e
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
*.zip
*.FileListAbsolute.txt
!/**/RBTray.exe
*.exe
*.dll
6 changes: 3 additions & 3 deletions RBHook.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down Expand Up @@ -97,4 +97,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
8 changes: 4 additions & 4 deletions RBTray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,20 +376,20 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE /*hPrevInstance*

WM_TASKBAR_CREATED = RegisterWindowMessage(L"TaskbarCreated");

BOOL registeredHotKey = RegisterHotKey(_hwndHook, 0, MOD_ALT | MOD_CONTROL, VK_DOWN);
/*BOOL registeredHotKey = RegisterHotKey(_hwndHook, 0, MOD_ALT | MOD_CONTROL, VK_DOWN);
if (!registeredHotKey) {
MessageBox(NULL, L"Couldn't register hotkey", L"RBTray", MB_OK | MB_ICONERROR);
}
}*/

MSG msg;
while (GetMessage(&msg, nullptr, 0, 0)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}

if (registeredHotKey) {
/*if (registeredHotKey) {
UnregisterHotKey(_hwndHook, 0);
}
}*/

return (int)msg.wParam;
}
4 changes: 2 additions & 2 deletions RBTray.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down
Binary file removed x64/RBHook.dll
Binary file not shown.
Binary file removed x64/RBTray.exe
Binary file not shown.
Binary file removed x86/RBHook.dll
Binary file not shown.
Binary file removed x86/RBTray.exe
Binary file not shown.

0 comments on commit fd1c35e

Please sign in to comment.