diff --git a/grepWinNP3/README.md b/grepWinNP3/README.md
index cd7735ede..6aa1f94ef 100644
--- a/grepWinNP3/README.md
+++ b/grepWinNP3/README.md
@@ -9,7 +9,7 @@ grepWin is a simple search and replace tool which can use [regular expressions](
In case you're not familiar with regular expressions, we have a very short [regular expression tutorial](https://tools.stefankueng.com/regexhelp.html) for you.
-[](https://raw.githubusercontent.com/stefankueng/grepWin/master/src/Resources/grepWin_search.png)
+[](https://github.com/stefankueng/grepWin/raw/main/src/Resources/grepWin_search.png)
# Command line parameters
The command line parameters are listed on a [separate page](https://tools.stefankueng.com/grepWin_cmd.html).
diff --git a/grepWinNP3/default.build b/grepWinNP3/default.build
index c460c1b9e..15090e444 100644
--- a/grepWinNP3/default.build
+++ b/grepWinNP3/default.build
@@ -199,6 +199,7 @@
+
@@ -216,6 +217,10 @@
+
+ ${verstringfull}
+https://tools.stefankueng.com/grepWin.html
+
diff --git a/grepWinNP3/grepWinNP3.vcxproj b/grepWinNP3/grepWinNP3.vcxproj
index 77f1a514f..4465ff7e9 100644
--- a/grepWinNP3/grepWinNP3.vcxproj
+++ b/grepWinNP3/grepWinNP3.vcxproj
@@ -342,16 +342,16 @@
-
-
-
+
+
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
+
+
+
\ No newline at end of file
diff --git a/grepWinNP3/packages.config b/grepWinNP3/packages.config
index 41afc80b8..594f8ed22 100644
--- a/grepWinNP3/packages.config
+++ b/grepWinNP3/packages.config
@@ -1,6 +1,6 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/grepWinNP3/sktoolslib_mod/FileDropTarget.h b/grepWinNP3/sktoolslib_mod/FileDropTarget.h
index d757ef06a..1641c73fd 100644
--- a/grepWinNP3/sktoolslib_mod/FileDropTarget.h
+++ b/grepWinNP3/sktoolslib_mod/FileDropTarget.h
@@ -1,6 +1,6 @@
// sktoolslib - common files for SK tools
-// Copyright (C) 2012-2013 - Stefan Kueng
+// Copyright (C) 2012-2013, 2020 - Stefan Kueng
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@ -76,10 +76,12 @@ public:
CFileDropTarget(HWND hTargetWnd)
: CIDropTarget(hTargetWnd)
, m_hParent(NULL)
+ , m_concat(0)
{}
CFileDropTarget(HWND hTargetWnd, HWND hParent)
: CIDropTarget(hTargetWnd)
, m_hParent(hParent)
+ , m_concat(0)
{
RegisterDragDrop(hTargetWnd, this);
// create the supported format:
@@ -90,6 +92,7 @@ public:
ftetc.tymed = TYMED_HGLOBAL;
AddSuportedFormat(ftetc);
}
+ void SetMultipathConcatenate(wchar_t ch) { m_concat = ch; }
virtual bool OnDrop(FORMATETC* pFmtEtc, STGMEDIUM& medium, DWORD * /*pdwEffect*/)
{
if (m_hParent && (pFmtEtc->cfFormat == CF_HDROP) && (medium.tymed == TYMED_HGLOBAL))
@@ -189,11 +192,22 @@ public:
std::unique_ptr szFileName(new TCHAR[MAX_PATH_NEW]);
UINT cFiles = DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0);
+ std::wstring concatPaths;
for (UINT i = 0; i < cFiles; ++i)
{
DragQueryFile(hDrop, i, szFileName.get(), MAX_PATH_NEW);
- ::SendMessage(m_hTargetWnd, WM_SETTEXT, 0, (LPARAM)szFileName.get());
+ if (m_concat)
+ {
+ if (!concatPaths.empty())
+ concatPaths += m_concat;
+ concatPaths += szFileName.get();
+ }
+ else
+ ::SendMessage(m_hTargetWnd, WM_SETTEXT, 0, (LPARAM)szFileName.get());
}
+ if (!concatPaths.empty())
+ ::SendMessage(m_hTargetWnd, WM_SETTEXT, 0, (LPARAM)concatPaths.c_str());
+
//DragFinish(hDrop); // base class calls ReleaseStgMedium
}
GlobalUnlock(medium.hGlobal);
@@ -202,4 +216,5 @@ public:
}
private:
HWND m_hParent;
+ wchar_t m_concat;
};
diff --git a/grepWinNP3/sktoolslib_mod/GDIHelpers.cpp b/grepWinNP3/sktoolslib_mod/GDIHelpers.cpp
index 7de3feb3a..7d58273f1 100644
--- a/grepWinNP3/sktoolslib_mod/GDIHelpers.cpp
+++ b/grepWinNP3/sktoolslib_mod/GDIHelpers.cpp
@@ -1,6 +1,6 @@
// sktoolslib - common files for SK tools
-// Copyright (C) 2012-2013, 2017 - Stefan Kueng
+// Copyright (C) 2012-2013, 2017, 2020 - Stefan Kueng
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@ -259,7 +259,7 @@ bool GDIHelpers::ShortHexStringToCOLORREF(const std::string& s, COLORREF* clr)
}
}
auto color = RGB(rgb[0], rgb[1], rgb[2]);
- *clr = (RGB((color >> 16) & 0xFF, (color >> 8) & 0xFF, color & 0xFF)) | (color & 0xFF000000);
+ *clr = color;
return true;
}
diff --git a/grepWinNP3/src/Resources/grepWin.rc b/grepWinNP3/src/Resources/grepWin.rc
index e4cde53f0..25f4a83d3 100644
--- a/grepWinNP3/src/Resources/grepWin.rc
+++ b/grepWinNP3/src/Resources/grepWin.rc
@@ -41,15 +41,16 @@ IDI_GREPWIN ICON "grepWinNP3.ico"
IDD_SEARCHDLG DIALOGEX 0, 0, 600, 339
STYLE DS_SETFONT | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "grepWinNP3"
-FONT 9, "MS Shell Dlg 2", 400, 0, 0x1
+FONT 9, "Segoe UI", 400, 0, 0x1
BEGIN
+ LTEXT "Press F1 for help",IDC_HELPLABEL,362,50,104,8
+ RTEXT "About grepWinNP3",IDC_ABOUTLINK,449,2,136,8
PUSHBUTTON "/",IDC_PATHMRU,14,20,11,12
EDITTEXT IDC_SEARCHPATH,31,20,536,12,ES_AUTOHSCROLL,WS_EX_ACCEPTFILES
PUSHBUTTON "...",IDC_SEARCHPATHBROWSE,572,20,13,12
GROUPBOX "Search in",IDC_GROUPSEARCHIN,7,10,587,29
CONTROL "Regex search",IDC_REGEXRADIO,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,84,50,100,10
CONTROL "Text search",IDC_TEXTRADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,198,50,105,10
- LTEXT "Press F1 for help",IDC_HELPLABEL,362,50,104,8
RTEXT "",IDC_REGEXOKLABEL,476,50,98,8
LTEXT "Search &for:",IDC_SEARCHFORLABEL,14,65,46,8
EDITTEXT IDC_SEARCHTEXT,83,64,484,12,ES_AUTOHSCROLL
@@ -64,6 +65,7 @@ BEGIN
PUSHBUTTON "Test regex",IDC_TESTREGEX,14,109,69,14
PUSHBUTTON "Add to Presets",IDC_ADDTOBOOKMARKS,117,109,76,14
PUSHBUTTON "Presets",IDC_BOOKMARKS,195,109,50,14
+ CONTROL "",IDC_UPDATELINK,"SysLink",LWS_RIGHT | NOT WS_VISIBLE | WS_TABSTOP | WS_DISABLED,262,110,292,11
GROUPBOX "Search",IDC_GROUPSEARCHFOR,7,41,587,86
CONTROL "All sizes",IDC_ALLSIZERADIO,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,14,139,103,10
CONTROL "Size is",IDC_SIZERADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,152,44,10
@@ -94,7 +96,6 @@ BEGIN
GROUPBOX "Limit search",IDC_GROUPLIMITSEARCH,7,128,587,65
CONTROL "",IDC_RESULTLIST,"SysListView32",LVS_REPORT | LVS_ALIGNLEFT | LVS_OWNERDATA | WS_BORDER | WS_TABSTOP,14,234,571,81
LTEXT "",IDC_SEARCHINFOLABEL,14,321,580,8
- RTEXT "About grepWinNP3",IDC_ABOUTLINK,449,2,136,8
GROUPBOX "Search results",IDC_GROUPSEARCHRESULTS,7,214,587,118
CONTROL "Files",IDC_RESULTFILES,"Button",BS_AUTORADIOBUTTON | WS_GROUP,84,222,89,10
CONTROL "Content",IDC_RESULTCONTENT,"Button",BS_AUTORADIOBUTTON,200,222,104,10
@@ -105,7 +106,7 @@ END
IDD_REGEXTEST DIALOGEX 0, 0, 401, 316
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "Regex Test"
-FONT 9, "MS Shell Dlg 2", 400, 0, 0x1
+FONT 9, "Segoe UI", 400, 0, 0x1
BEGIN
LTEXT "Paste text to test the regex with:",IDC_INFOLABEL,7,7,387,8
CONTROL "",IDC_TEXTCONTENT,"RichEdit20W",WS_BORDER | WS_VSCROLL | WS_TABSTOP | 0x1084,7,17,387,89
@@ -124,7 +125,7 @@ END
IDD_NAME DIALOGEX 0, 0, 186, 65
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Preset name"
-FONT 9, "MS Shell Dlg 2", 400, 0, 0x1
+FONT 9, "Segoe UI", 400, 0, 0x1
BEGIN
LTEXT "Enter a name for the regex:",IDC_INFOLABEL,7,7,172,8
EDITTEXT IDC_NAME,7,20,172,14,ES_AUTOHSCROLL
@@ -135,7 +136,7 @@ END
IDD_BOOKMARKS DIALOGEX 0, 0, 240, 129
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "Presets"
-FONT 9, "MS Shell Dlg 2", 400, 0, 0x1
+FONT 9, "Segoe UI", 400, 0, 0x1
BEGIN
CONTROL "",IDC_BOOKMARKS,"SysListView32",LVS_REPORT | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,16,226,85
DEFPUSHBUTTON "OK",IDOK,70,108,78,14
@@ -146,7 +147,7 @@ END
IDD_ABOUT DIALOGEX 0, 0, 263, 86
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About grepWinNP3"
-FONT 9, "MS Shell Dlg 2", 400, 0, 0x1
+FONT 9, "Segoe UI", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,206,65,50,14
ICON IDI_GREPWIN,IDC_STATIC,17,18,20,20,SS_CENTERIMAGE
@@ -159,7 +160,7 @@ END
IDD_MULTILINEEDIT DIALOGEX 0, 0, 317, 135
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "Dialog"
-FONT 9, "MS Shell Dlg 2", 400, 0, 0x1
+FONT 9, "Segoe UI", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,157,114,73,14
PUSHBUTTON "Cancel",IDCANCEL,237,114,73,14
@@ -169,7 +170,7 @@ END
IDD_SETTINGS DIALOGEX 0, 0, 317, 209
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "grepWinNP3 Settings"
-FONT 9, "MS Shell Dlg 2", 400, 0, 0x1
+FONT 9, "Segoe UI", 400, 0, 0x1
BEGIN
GROUPBOX "Editor",IDC_EDITORGROUP,7,7,303,78
LTEXT "Command line to start an editor at a specific line:",IDC_STATIC1,13,19,288,8
@@ -188,8 +189,9 @@ BEGIN
DEFPUSHBUTTON "OK",IDOK,204,180,50,13
PUSHBUTTON "Cancel",IDCANCEL,260,180,50,13
CONTROL "Only one instance",IDC_ONLYONE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,143,150,10
- CONTROL "Dark mode",IDC_DARKMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,155,157,10
- LTEXT "",IDC_DARKMODEINFO,17,170,180,23,WS_DISABLED
+ CONTROL "Check for updates",IDC_DOUPDATECHECKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED,7,155,150,10
+ CONTROL "Dark mode",IDC_DARKMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,167,157,10
+ LTEXT "",IDC_DARKMODEINFO,17,182,180,23,WS_DISABLED
RTEXT "Max # of concurrent worker",IDC_TEXT_NUMOFWORKER,156,156,107,9,0,WS_EX_RIGHT
EDITTEXT IDC_MAXNUMWORKER,271,154,31,13,ES_RIGHT | ES_NUMBER | WS_GROUP,WS_EX_RIGHT
CONTROL "",IDC_SPIN_MAXWORKER,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNLEFT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_GROUP,271,154,10,13
@@ -429,6 +431,7 @@ BEGIN
IDS_EXPORTPATHS "include file paths"
IDS_EXPORTMATCHLINENUMBER "include match line numbers"
IDS_EXPORTMATCHLINECONTENT "include match line text"
+ IDS_UPDATEAVAILABLE "grepWinNP3 %s is available"
END
#endif // Neutral resources
diff --git a/grepWinNP3/src/Resources/grepWin_orig.rc b/grepWinNP3/src/Resources/grepWin_orig.rc
index e91c29184..2b62f2ec0 100644
Binary files a/grepWinNP3/src/Resources/grepWin_orig.rc and b/grepWinNP3/src/Resources/grepWin_orig.rc differ
diff --git a/grepWinNP3/src/SearchDlg.cpp b/grepWinNP3/src/SearchDlg.cpp
index 096b80130..e7a2ef11c 100644
--- a/grepWinNP3/src/SearchDlg.cpp
+++ b/grepWinNP3/src/SearchDlg.cpp
@@ -51,6 +51,12 @@
#include "COMPtrs.h"
#include "PreserveChdir.h"
+#ifdef NP3_ALLOW_UPDATE
+#include "TempFile.h"
+#include "version.h"
+
+#endif
+
#include
#include