From 07b87eb6538208402cd82a498e9ee8a523c8477e Mon Sep 17 00:00:00 2001 From: rainwater Date: Fri, 20 Sep 2002 00:53:57 +0000 Subject: [PATCH] Added Context Menu in log window git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1059 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/Makensisw/Readme.txt | 1 + Contrib/Makensisw/makensisw.cpp | 16 ++++++++++++++++ Contrib/Makensisw/resource.h | 3 ++- Contrib/Makensisw/resource.rc | 13 +++++++++++++ 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/Contrib/Makensisw/Readme.txt b/Contrib/Makensisw/Readme.txt index da137cfd..1a6660d8 100644 --- a/Contrib/Makensisw/Readme.txt +++ b/Contrib/Makensisw/Readme.txt @@ -152,6 +152,7 @@ Version History - Branding text now reflects NSIS version - Bunch of other stuff not worth mentioning - Added some simple tool tips + - Added Context Menu in log window Copyright Information diff --git a/Contrib/Makensisw/makensisw.cpp b/Contrib/Makensisw/makensisw.cpp index 2ad8fff6..00c59199 100644 --- a/Contrib/Makensisw/makensisw.cpp +++ b/Contrib/Makensisw/makensisw.cpp @@ -107,6 +107,22 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { } return TRUE; } + case WM_CONTEXTMENU: + { + if ((HWND)wParam==GetDlgItem(g_hwnd,IDC_LOGWIN)) { + HMENU m = LoadMenu(g_hInstance,MAKEINTRESOURCE(IDM_LOGWIN)); + if (m) { + HMENU s = GetSubMenu(m,0); + if (s) { + int xPos,yPos; + xPos = (int)(short)LOWORD(lParam); + yPos = (int)(short)HIWORD(lParam); + TrackPopupMenu(s,NULL,xPos,yPos,0,g_hwnd,0); + } + } + } + return TRUE; + } case WM_DROPFILES: { int num; char szTmp[MAX_PATH]; diff --git a/Contrib/Makensisw/resource.h b/Contrib/Makensisw/resource.h index b7b081c8..d2959c19 100644 --- a/Contrib/Makensisw/resource.h +++ b/Contrib/Makensisw/resource.h @@ -9,6 +9,7 @@ #define IDK_ACCEL 105 #define IDR_DEFAULT1 108 #define IDI_ABOUT 110 +#define IDM_LOGWIN 111 #define IDC_LOGWIN 402 #define IDC_VERSION 405 #define IDC_CLOSE 406 @@ -34,7 +35,7 @@ // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 111 +#define _APS_NEXT_RESOURCE_VALUE 112 #define _APS_NEXT_COMMAND_VALUE 40008 #define _APS_NEXT_CONTROL_VALUE 1009 #define _APS_NEXT_SYMED_VALUE 101 diff --git a/Contrib/Makensisw/resource.rc b/Contrib/Makensisw/resource.rc index 4b7aa742..60f6dfff 100644 --- a/Contrib/Makensisw/resource.rc +++ b/Contrib/Makensisw/resource.rc @@ -93,6 +93,19 @@ BEGIN END END +IDM_LOGWIN MENU DISCARDABLE +BEGIN + POPUP "Edit" + BEGIN + MENUITEM "&Copy", IDM_COPYSELECTED + MENUITEM "Copy &All", IDM_COPY + MENUITEM SEPARATOR + MENUITEM "Find...", IDM_FIND + MENUITEM SEPARATOR + MENUITEM "&Select All", IDM_SELECTALL + END +END + ///////////////////////////////////////////////////////////////////////////// //