Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Reader/Reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,17 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
}
}
break;
case IDM_HIDE_MENU:
// Toggle menu visibility
_isMenuVisible = !_isMenuVisible;

if (_isMenuVisible) {
SetMenu(_hWnd, _WndInfo.hMenu);
}
else {
SetMenu(_hWnd, NULL);
}
break;
default:
ResumeAutoPage(hWnd);
return DefWindowProc(hWnd, message, wParam, lParam);
Expand Down Expand Up @@ -728,6 +739,17 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
}
}
}
// F2 key to toggle menu
else if (wParam == VK_F2) {
_isMenuVisible = !_isMenuVisible;

if (_isMenuVisible) {
SetMenu(_hWnd, _WndInfo.hMenu);
}
else {
SetMenu(_hWnd, NULL);
}
}
#ifdef ENABLE_NETWORK
else if (VK_F5 == wParam) // online book manual check
{
Expand Down
1 change: 1 addition & 0 deletions Reader/Reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ HWND _hWnd = NULL;
NOTIFYICONDATA _nid = { 0 };
BYTE _textAlpha = 0xFF;
BOOL _menuInvalid = FALSE;
BOOL _isMenuVisible = TRUE;


LRESULT OnCreate(HWND);
Expand Down
Binary file modified Reader/Reader_zh-cn.rc
Binary file not shown.
Binary file modified Reader/resource.h
Binary file not shown.