Skip to content

Commit

Permalink
Version 4.9
Browse files Browse the repository at this point in the history
  • Loading branch information
benbuck committed Oct 2, 2019
1 parent 22c2a03 commit 996883c
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Change history

## [4.9] fork (2019-Oct-02) - Benbuck Nason
- Improved documentation.
- Clearer license/copyright notices.
- Better error checking.
- Better command line parsing.

## [4.8] fork (2018-Jul-27) - Benbuck Nason
- Don't minimize desktop/taskbar/etc.
- Return correct value from WinMain.
Expand Down Expand Up @@ -52,7 +58,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Won't minimize MDI child windows.
- Other small fixes and reorganized code.

[Unreleased]: https://github.com/benbuck/rbtray/compare/v4.8...HEAD
[Unreleased]: https://github.com/benbuck/rbtray/compare/v4.9...HEAD
[4.9]: https://github.com/benbuck/rbtray/compare/v4.8...v4.9
[4.8]: https://github.com/benbuck/rbtray/compare/v4.7...v4.8
[4.7]: https://github.com/benbuck/rbtray/compare/v4.6...v4.7
[4.6]: https://github.com/benbuck/rbtray/compare/v4.5...v4.6
Expand Down
11 changes: 11 additions & 0 deletions RBHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,21 @@ LRESULT CALLBACK CallWndProcRet(int nCode, WPARAM wParam, LPARAM lParam) {
{
PostMessage(FindWindow(NAME, NAME), WM_REFRTRAY, 0, (LPARAM)msg->hwnd);
}

//if ((msg->message == WM_SYSCOMMAND)) {// && (msg->wParam == SC_MINIMIZE)) {
// DEBUG_PRINTF("%s(%d): minimize\n", __FUNCTION__, __LINE__);
// WCHAR text[256];
// GetWindowText(msg->hwnd, text, sizeof(text) / sizeof(text[0]));
// if (wcsstr(text, L"Notepad")) {
// //PostMessage(FindWindow(NAME, NAME), WM_ADDTRAY, 0, (LPARAM)msg->hwnd);
// }
//}
}
return CallNextHookEx(_hWndProcRet, nCode, wParam, lParam);
}

BOOL DLLIMPORT RegisterHook(HMODULE hLib) {
//DEBUG_PRINTF("%s(%d): register hook\n", __FUNCTION__, __LINE__);
_hMouse = SetWindowsHookEx(WH_MOUSE, (HOOKPROC)MouseProc, hLib, 0);
_hWndProcRet = SetWindowsHookEx(WH_CALLWNDPROCRET, (HOOKPROC)CallWndProcRet, hLib, 0);
if ((_hMouse == NULL) || (_hWndProcRet == NULL)) {
Expand All @@ -96,6 +106,7 @@ BOOL DLLIMPORT RegisterHook(HMODULE hLib) {
}

void DLLIMPORT UnRegisterHook() {
//DEBUG_PRINTF("%s(%d): unregister hook\n", __FUNCTION__, __LINE__);
if (_hMouse) {
UnhookWindowsHookEx(_hMouse);
_hMouse = NULL;
Expand Down
Binary file modified x64/RBHook.dll
Binary file not shown.
Binary file modified x64/RBTray.exe
Binary file not shown.
Binary file modified x86/RBHook.dll
Binary file not shown.
Binary file modified x86/RBTray.exe
Binary file not shown.

0 comments on commit 996883c

Please sign in to comment.