diff --git a/Reader/Reader.cpp b/Reader/Reader.cpp index b05d03b..e1d9dfa 100644 --- a/Reader/Reader.cpp +++ b/Reader/Reader.cpp @@ -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); @@ -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 { diff --git a/Reader/Reader.h b/Reader/Reader.h index 7bbcb74..3eb4c23 100644 --- a/Reader/Reader.h +++ b/Reader/Reader.h @@ -63,6 +63,7 @@ HWND _hWnd = NULL; NOTIFYICONDATA _nid = { 0 }; BYTE _textAlpha = 0xFF; BOOL _menuInvalid = FALSE; +BOOL _isMenuVisible = TRUE; LRESULT OnCreate(HWND); diff --git a/Reader/Reader_zh-cn.rc b/Reader/Reader_zh-cn.rc index cd57c1d..3f5136f 100644 Binary files a/Reader/Reader_zh-cn.rc and b/Reader/Reader_zh-cn.rc differ diff --git a/Reader/resource.h b/Reader/resource.h index a18b347..b08cf25 100644 Binary files a/Reader/resource.h and b/Reader/resource.h differ