From a9e72d71a0429cf0c457bd27d980fa291b2dddfd Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 30 Jun 2018 13:14:08 +0300 Subject: [PATCH] Added "Open Game Folder" item to boxart window system menu. --- od-win32/win32gui_extra.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/od-win32/win32gui_extra.cpp b/od-win32/win32gui_extra.cpp index 3e322c24..230ff284 100644 --- a/od-win32/win32gui_extra.cpp +++ b/od-win32/win32gui_extra.cpp @@ -805,6 +805,10 @@ static bool open_box_art_window(void) GetClientRect(boxarthwnd, &r); boxart_window_width = r.right - r.left; boxart_window_height = r.bottom - r.top; + + HMENU menu = GetSystemMenu(boxarthwnd, FALSE); + InsertMenu(menu, -1, MF_BYPOSITION | MF_SEPARATOR, 0, _T("")); + InsertMenu(menu, -1, MF_BYPOSITION, 1, _T("Open Game Folder")); } } else { move_box_art_window(); @@ -1127,6 +1131,12 @@ LRESULT CALLBACK BoxArtWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM r->bottom = r2.bottom; } return FALSE; + case WM_SYSCOMMAND: + if (wParam == 1) { + ShellExecute(NULL, _T("explore"), image_path, NULL, NULL, SW_SHOWNORMAL); + return FALSE; + } + break; } return DefWindowProc(hWnd, message, wParam, lParam); } -- 2.47.3