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
This commit is contained in:
rainwater 2002-09-20 00:53:57 +00:00
parent 19e6cde283
commit 07b87eb653
4 changed files with 32 additions and 1 deletions

View file

@ -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

View file

@ -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];

View file

@ -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

View file

@ -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
/////////////////////////////////////////////////////////////////////////////
//