From ddb1df2c5e4416acb3b448d59cf581df6d2b035c Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Tue, 30 Nov 2021 12:37:16 +0100 Subject: [PATCH] +upd: grepWin(NP3) current version v2.0.9 --- grepWinNP3/.clang-format | 7 +- grepWinNP3/grepWinNP3.vcxproj | 4 +- grepWinNP3/grepWinNP3.vcxproj.filters | 12 +- grepWinNP3/sktoolslib_mod/.clang-format | 7 +- grepWinNP3/sktoolslib_mod/CircularLog.cpp | 6 +- grepWinNP3/sktoolslib_mod/CircularLog.h | 2 + grepWinNP3/sktoolslib_mod/DarkModeHelper.h | 1 - grepWinNP3/sktoolslib_mod/DownloadFile.cpp | 4 +- grepWinNP3/sktoolslib_mod/DownloadFile.h | 4 +- grepWinNP3/sktoolslib_mod/InfoRtfDialog.cpp | 51 +++- grepWinNP3/sktoolslib_mod/IniSettings.cpp | 6 +- grepWinNP3/sktoolslib_mod/IniSettings.h | 6 +- grepWinNP3/sktoolslib_mod/Registry.h | 10 +- grepWinNP3/sktoolslib_mod/StringUtils.cpp | 30 +- grepWinNP3/src/InfoDlg.cpp | 79 ------ grepWinNP3/src/InfoDlg.h | 29 -- grepWinNP3/src/Resources/grepWin.rc | Bin 40352 -> 40350 bytes grepWinNP3/src/Resources/grepWinNP3.rc | 4 +- grepWinNP3/src/Resources/infodlg.htm | 290 -------------------- grepWinNP3/src/Resources/infodlg.rtf | 124 +++++++++ grepWinNP3/src/SearchDlg.cpp | 23 +- grepWinNP3/src/SearchDlg.h | 4 +- grepWinNP3/src/last/version.h | 14 +- grepWinNP3/src/resource.h | 5 +- grepWinNP3/version.build.in | 2 +- grepWinNP3/version.txt | 2 +- 26 files changed, 253 insertions(+), 473 deletions(-) delete mode 100644 grepWinNP3/src/InfoDlg.cpp delete mode 100644 grepWinNP3/src/InfoDlg.h delete mode 100644 grepWinNP3/src/Resources/infodlg.htm create mode 100644 grepWinNP3/src/Resources/infodlg.rtf diff --git a/grepWinNP3/.clang-format b/grepWinNP3/.clang-format index 789742926..365a01ee8 100644 --- a/grepWinNP3/.clang-format +++ b/grepWinNP3/.clang-format @@ -2,9 +2,10 @@ Language: Cpp AccessModifierOffset: -4 AlignAfterOpenBracket: Align -AlignConsecutiveAssignments: true -AlignConsecutiveDeclarations: true -AlignConsecutiveMacros: true +AlignConsecutiveAssignments: AcrossEmptyLinesAndComments +AlignConsecutiveBitFields: AcrossEmptyLinesAndComments +AlignConsecutiveDeclarations: AcrossEmptyLinesAndComments +AlignConsecutiveMacros: AcrossEmptyLinesAndComments AlignEscapedNewlines: Right AlignOperands: true AlignTrailingComments: true diff --git a/grepWinNP3/grepWinNP3.vcxproj b/grepWinNP3/grepWinNP3.vcxproj index fe80539c2..b118da6f6 100644 --- a/grepWinNP3/grepWinNP3.vcxproj +++ b/grepWinNP3/grepWinNP3.vcxproj @@ -391,6 +391,7 @@ + @@ -407,7 +408,6 @@ - @@ -438,6 +438,7 @@ + @@ -457,7 +458,6 @@ - diff --git a/grepWinNP3/grepWinNP3.vcxproj.filters b/grepWinNP3/grepWinNP3.vcxproj.filters index 73ae2a3b1..2ba8da55b 100644 --- a/grepWinNP3/grepWinNP3.vcxproj.filters +++ b/grepWinNP3/grepWinNP3.vcxproj.filters @@ -39,9 +39,6 @@ Source Files - - Source Files - Source Files @@ -156,6 +153,9 @@ sktoolslib_mod + + sktoolslib_mod + @@ -167,9 +167,6 @@ Header Files - - Header Files - Header Files @@ -308,6 +305,9 @@ sktoolslib_mod + + sktoolslib_mod + diff --git a/grepWinNP3/sktoolslib_mod/.clang-format b/grepWinNP3/sktoolslib_mod/.clang-format index 789742926..365a01ee8 100644 --- a/grepWinNP3/sktoolslib_mod/.clang-format +++ b/grepWinNP3/sktoolslib_mod/.clang-format @@ -2,9 +2,10 @@ Language: Cpp AccessModifierOffset: -4 AlignAfterOpenBracket: Align -AlignConsecutiveAssignments: true -AlignConsecutiveDeclarations: true -AlignConsecutiveMacros: true +AlignConsecutiveAssignments: AcrossEmptyLinesAndComments +AlignConsecutiveBitFields: AcrossEmptyLinesAndComments +AlignConsecutiveDeclarations: AcrossEmptyLinesAndComments +AlignConsecutiveMacros: AcrossEmptyLinesAndComments AlignEscapedNewlines: Right AlignOperands: true AlignTrailingComments: true diff --git a/grepWinNP3/sktoolslib_mod/CircularLog.cpp b/grepWinNP3/sktoolslib_mod/CircularLog.cpp index cd3f5a6c7..af77a2ec1 100644 --- a/grepWinNP3/sktoolslib_mod/CircularLog.cpp +++ b/grepWinNP3/sktoolslib_mod/CircularLog.cpp @@ -43,6 +43,8 @@ CCircularLog& CCircularLog::Instance() bool CCircularLog::Init(const std::wstring& path, int maxlines) { + std::unique_lock lock(m_mutex); + m_path = path; m_maxLines = maxlines; @@ -74,7 +76,8 @@ bool CCircularLog::Init(const std::wstring& path, int maxlines) bool CCircularLog::AddLine(const std::wstring& line) { - wchar_t tmpBuf1[128] = {0}; + std::unique_lock lock(m_mutex); + wchar_t tmpBuf1[128] = {0}; _wstrtime_s(tmpBuf1, 128); wchar_t tmpBuf2[128] = {0}; _wstrdate_s(tmpBuf2, 128); @@ -87,6 +90,7 @@ bool CCircularLog::AddLine(const std::wstring& line) bool CCircularLog::Save() { + std::unique_lock lock(m_mutex); if (m_path.empty()) return false; try diff --git a/grepWinNP3/sktoolslib_mod/CircularLog.h b/grepWinNP3/sktoolslib_mod/CircularLog.h index a19889814..9a8ce6265 100644 --- a/grepWinNP3/sktoolslib_mod/CircularLog.h +++ b/grepWinNP3/sktoolslib_mod/CircularLog.h @@ -18,6 +18,7 @@ // #pragma once #include +#include #include class CCircularLog @@ -41,4 +42,5 @@ private: std::list m_lines; std::wstring m_path; int m_maxLines; + std::mutex m_mutex; }; diff --git a/grepWinNP3/sktoolslib_mod/DarkModeHelper.h b/grepWinNP3/sktoolslib_mod/DarkModeHelper.h index 0bc381464..cce8ab342 100644 --- a/grepWinNP3/sktoolslib_mod/DarkModeHelper.h +++ b/grepWinNP3/sktoolslib_mod/DarkModeHelper.h @@ -107,7 +107,6 @@ private: using RefreshImmersiveColorPolicyStateFn = void(WINAPI* )(); using GetIsImmersiveColorUsingHighContrastFn = BOOL(WINAPI* )(IMMERSIVE_HC_CACHE_MODE mode); using FlushMenuThemesFn = void(WINAPI* )(); - using OpenNcThemeDataFpn = HTHEME(WINAPI* )(HWND hWnd, LPCWSTR pszClassList); using SetWindowCompositionAttributeFpn = BOOL(WINAPI* )(HWND hwnd, WINDOWCOMPOSITIONATTRIBDATA* data); AllowDarkModeForAppFpn m_pAllowDarkModeForApp = nullptr; diff --git a/grepWinNP3/sktoolslib_mod/DownloadFile.cpp b/grepWinNP3/sktoolslib_mod/DownloadFile.cpp index 3ce40fa33..fab871704 100644 --- a/grepWinNP3/sktoolslib_mod/DownloadFile.cpp +++ b/grepWinNP3/sktoolslib_mod/DownloadFile.cpp @@ -1,4 +1,4 @@ -// sktoolslib - common files for SK tools +// sktoolslib - common files for SK tools // Copyright (C) 2014, 2017, 2020-2021 - Stefan Kueng @@ -28,7 +28,7 @@ CDownloadFile::CDownloadFile(LPCWSTR useragent, CProgressDlg* pProgress) hOpenHandle = InternetOpen(useragent, INTERNET_OPEN_TYPE_PRECONFIG, nullptr, nullptr, 0); } -CDownloadFile::~CDownloadFile(void) +CDownloadFile::~CDownloadFile() { if (hOpenHandle) InternetCloseHandle(hOpenHandle); diff --git a/grepWinNP3/sktoolslib_mod/DownloadFile.h b/grepWinNP3/sktoolslib_mod/DownloadFile.h index c83067a2f..21461c560 100644 --- a/grepWinNP3/sktoolslib_mod/DownloadFile.h +++ b/grepWinNP3/sktoolslib_mod/DownloadFile.h @@ -1,6 +1,6 @@ // sktoolslib - common files for SK tools -// Copyright (C) 2014, 2020 - Stefan Kueng +// Copyright (C) 2014, 2020-2021 - Stefan Kueng // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -26,7 +26,7 @@ class CDownloadFile { public: CDownloadFile(LPCWSTR useragent, CProgressDlg* pProgress); - ~CDownloadFile(void); + ~CDownloadFile(); bool DownloadFile(const std::wstring& url, const std::wstring& dest) const; diff --git a/grepWinNP3/sktoolslib_mod/InfoRtfDialog.cpp b/grepWinNP3/sktoolslib_mod/InfoRtfDialog.cpp index 1a3e1c3cb..64727651c 100644 --- a/grepWinNP3/sktoolslib_mod/InfoRtfDialog.cpp +++ b/grepWinNP3/sktoolslib_mod/InfoRtfDialog.cpp @@ -1,4 +1,4 @@ -// sktoolslib - common files for SK tools +// sktoolslib - common files for SK tools // Copyright (C) 2020-2021 - Stefan Kueng @@ -20,6 +20,9 @@ #include "InfoRtfDialog.h" #include "OnOutOfScope.h" #include +#include + +#pragma comment(lib, "Shell32.lib") CInfoRtfDialog::CInfoRtfDialog() : m_hParent(nullptr) @@ -138,6 +141,7 @@ LRESULT CInfoRtfDialog::DlgFunc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l SetFocus(m_hwndRichEdit); SendMessage(m_hwndRichEdit, EM_SETSEL, static_cast(-1), static_cast(0)); SendMessage(m_hwndRichEdit, EM_SETREADONLY, static_cast(1), reinterpret_cast(nullptr)); + SendMessage(m_hwndRichEdit, EM_SETEVENTMASK, NULL, ENM_LINK | ENM_SCROLL); } } } @@ -151,17 +155,56 @@ LRESULT CInfoRtfDialog::DlgFunc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l MoveWindow(m_hwndRichEdit, 0, 0, width, height, TRUE); } break; + case WM_DESTROY: + CloseWindow(m_hwndRichEdit); + DestroyWindow(m_hwndRichEdit); + break; case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: case IDCANCEL: - CloseWindow(m_hwndRichEdit); - DestroyWindow(m_hwndRichEdit); EndDialog(*this, LOWORD(wParam)); return static_cast(TRUE); + default: + break; } break; + case WM_NOTIFY: + { + auto pHdr = reinterpret_cast(lParam); + if (pHdr) + { + if (pHdr->hwndFrom == m_hwndRichEdit) + { + switch (pHdr->code) + { + case EN_LINK: + { + auto pEnLink = reinterpret_cast(lParam); + if ((pEnLink->msg != WM_LBUTTONUP) && (pEnLink->msg != WM_SETCURSOR)) + break; + + auto buffer = std::make_unique(pEnLink->chrg.cpMax - pEnLink->chrg.cpMin + 1); + TEXTRANGE range{}; + range.chrg = pEnLink->chrg; + range.lpstrText = buffer.get(); + SendMessage(m_hwndRichEdit, EM_GETTEXTRANGE, 0, reinterpret_cast(&range)); + auto url = std::wstring(buffer.get(), pEnLink->chrg.cpMax - pEnLink->chrg.cpMin); + if (!url.empty()) + { + if (pEnLink->msg == WM_SETCURSOR) + SetCursor(LoadCursor(nullptr, IDC_HAND)); + else + ShellExecute(hwndDlg, L"open", url.c_str(), nullptr, nullptr, SW_SHOWDEFAULT); + } + } + break; + } + } + } + } + break; } return static_cast(FALSE); -} +} \ No newline at end of file diff --git a/grepWinNP3/sktoolslib_mod/IniSettings.cpp b/grepWinNP3/sktoolslib_mod/IniSettings.cpp index dba2f0ab5..bcbf37939 100644 --- a/grepWinNP3/sktoolslib_mod/IniSettings.cpp +++ b/grepWinNP3/sktoolslib_mod/IniSettings.cpp @@ -1,4 +1,4 @@ -// sktoolslib - common files for SK tools +// sktoolslib - common files for SK tools // Copyright (C) 2013, 2017, 2020-2021 - Stefan Kueng @@ -20,11 +20,11 @@ #include "IniSettings.h" #include "StringUtils.h" -CIniSettings::CIniSettings(void) +CIniSettings::CIniSettings() { } -CIniSettings::~CIniSettings(void) +CIniSettings::~CIniSettings() { Save(); } diff --git a/grepWinNP3/sktoolslib_mod/IniSettings.h b/grepWinNP3/sktoolslib_mod/IniSettings.h index 3cba50054..e100335cb 100644 --- a/grepWinNP3/sktoolslib_mod/IniSettings.h +++ b/grepWinNP3/sktoolslib_mod/IniSettings.h @@ -1,4 +1,4 @@ -// sktoolslib - common files for SK tools +// sktoolslib - common files for SK tools // Copyright (C) 2013, 2020-2021 - Stefan Kueng @@ -22,8 +22,8 @@ class CIniSettings { private: - CIniSettings(void); - ~CIniSettings(void); + CIniSettings(); + ~CIniSettings(); public: static CIniSettings& Instance(); diff --git a/grepWinNP3/sktoolslib_mod/Registry.h b/grepWinNP3/sktoolslib_mod/Registry.h index fc3323369..0e8d04994 100644 --- a/grepWinNP3/sktoolslib_mod/Registry.h +++ b/grepWinNP3/sktoolslib_mod/Registry.h @@ -1,4 +1,4 @@ -// sktoolslib - common files for SK tools +// sktoolslib - common files for SK tools // Copyright (C) 2012, 2017-2018, 2020-2021 - Stefan Kueng @@ -94,7 +94,7 @@ public: /// used in subclass templates to specify the correct string type - using StringT = S; + typedef S StringT; protected: //members @@ -315,7 +315,7 @@ public: * Make the value type accessible to others. */ - using ValueT = T; + typedef T ValueT; /** * Constructor. @@ -1060,8 +1060,8 @@ typedef CKeyList CRegStringList; # endif #endif -using CRegStdDWORD = CRegDWORDCommon; -using CRegStdString = CRegStringCommon; +typedef CRegDWORDCommon CRegStdDWORD; +typedef CRegStringCommon CRegStdString; #ifdef _MAP_ typedef CKeyList CRegStdDWORDList; diff --git a/grepWinNP3/sktoolslib_mod/StringUtils.cpp b/grepWinNP3/sktoolslib_mod/StringUtils.cpp index 1d1c27594..727f7fe8c 100644 --- a/grepWinNP3/sktoolslib_mod/StringUtils.cpp +++ b/grepWinNP3/sktoolslib_mod/StringUtils.cpp @@ -1,4 +1,4 @@ -// sktoolslib - common files for SK tools +// sktoolslib - common files for SK tools // Copyright (C) 2012-2017, 2019-2021 - Stefan Kueng @@ -186,7 +186,7 @@ static constexpr BYTE DecLookup[] = { std::string CStringUtils::ToHexString(BYTE* pSrc, int nSrcLen) { WORD* pwHex = reinterpret_cast(const_cast(HexLookup)); - auto dest = std::make_unique((nSrcLen * 2) + 1); + auto dest = std::make_unique((nSrcLen * 2LL) + 1LL); WORD* pwDest = reinterpret_cast(dest.get()); for (int j = 0; j < nSrcLen; j++) { @@ -226,7 +226,7 @@ std::unique_ptr CStringUtils::Decrypt(const char* text) if (CryptStringToBinaryA(text, static_cast(strlen(text)), CRYPT_STRING_HEX, nullptr, &dwLen, nullptr, nullptr) == FALSE) return nullptr; - auto strIn = std::make_unique(dwLen + 1); + auto strIn = std::make_unique(dwLen + 1LL); if (CryptStringToBinaryA(text, static_cast(strlen(text)), CRYPT_STRING_HEX, strIn.get(), &dwLen, nullptr, nullptr) == FALSE) return nullptr; @@ -239,8 +239,8 @@ std::unique_ptr CStringUtils::Decrypt(const char* text) return nullptr; SecureZeroMemory(blobIn.pbData, blobIn.cbData); - auto result = std::make_unique(blobOut.cbData + 1); - strncpy_s(result.get(), blobOut.cbData + 1, reinterpret_cast(blobOut.pbData), blobOut.cbData); + auto result = std::make_unique(blobOut.cbData + 1LL); + strncpy_s(result.get(), blobOut.cbData + 1LL, reinterpret_cast(blobOut.pbData), blobOut.cbData); SecureZeroMemory(blobOut.pbData, blobOut.cbData); LocalFree(blobOut.pbData); LocalFree(descr); @@ -253,7 +253,7 @@ std::unique_ptr CStringUtils::Decrypt(const wchar_t* text) if (CryptStringToBinaryW(text, static_cast(wcslen(text)), CRYPT_STRING_HEX, nullptr, &dwLen, nullptr, nullptr) == FALSE) return nullptr; - auto strIn = std::make_unique(dwLen + 1); + auto strIn = std::make_unique(dwLen + 1LL); if (CryptStringToBinaryW(text, static_cast(wcslen(text)), CRYPT_STRING_HEX, strIn.get(), &dwLen, nullptr, nullptr) == FALSE) return nullptr; @@ -287,7 +287,7 @@ std::string CStringUtils::Encrypt(const char* text) DWORD dwLen = 0; if (CryptBinaryToStringA(blobout.pbData, blobout.cbData, CRYPT_STRING_HEX | CRYPT_STRING_NOCRLF, nullptr, &dwLen) == FALSE) return result; - auto strOut = std::make_unique(dwLen + 1); + auto strOut = std::make_unique(dwLen + 1LL); if (CryptBinaryToStringA(blobout.pbData, blobout.cbData, CRYPT_STRING_HEX | CRYPT_STRING_NOCRLF, strOut.get(), &dwLen) == FALSE) return result; LocalFree(blobout.pbData); @@ -310,7 +310,7 @@ std::wstring CStringUtils::Encrypt(const wchar_t* text) DWORD dwLen = 0; if (CryptBinaryToStringW(blobOut.pbData, blobOut.cbData, CRYPT_STRING_HEX | CRYPT_STRING_NOCRLF, nullptr, &dwLen) == FALSE) return result; - auto strOut = std::make_unique(dwLen + 1); + auto strOut = std::make_unique(dwLen + 1LL); if (CryptBinaryToStringW(blobOut.pbData, blobOut.cbData, CRYPT_STRING_HEX | CRYPT_STRING_NOCRLF, strOut.get(), &dwLen) == FALSE) return result; LocalFree(blobOut.pbData); @@ -333,7 +333,7 @@ std::wstring CStringUtils::Format(const wchar_t* frmt, ...) auto len = _vscwprintf(frmt, marker); if (len > 0) { - buffer.resize(len + 1); + buffer.resize(len + 1LL); _vsnwprintf_s(&buffer[0], buffer.size(), len, frmt, marker); buffer.resize(len); } @@ -356,7 +356,7 @@ std::string CStringUtils::Format(const char* frmt, ...) auto len = _vscprintf(frmt, marker); if (len > 0) { - buffer.resize(len + 1); + buffer.resize(len + 1LL); _vsnprintf_s(&buffer[0], buffer.size(), len, frmt, marker); buffer.resize(len); } @@ -383,18 +383,16 @@ bool WriteAsciiStringToClipboard(const wchar_t* sClipdata, HWND hOwningWnd) CloseClipboard();); EmptyClipboard(); size_t sLen = wcslen(sClipdata); - HGLOBAL hClipboardData = GlobalAlloc(GMEM_DDESHARE, (sLen + 1) * sizeof(wchar_t)); + HGLOBAL hClipboardData = GlobalAlloc(GMEM_MOVEABLE, (sLen + 1) * sizeof(wchar_t)); if (hClipboardData) { wchar_t* pchData = static_cast(GlobalLock(hClipboardData)); if (pchData) { wcscpy_s(pchData, sLen + 1, sClipdata); - if (GlobalUnlock(hClipboardData)) - { - if (SetClipboardData(CF_UNICODETEXT, hClipboardData) == nullptr) - return true; - } + GlobalUnlock(hClipboardData); + if (SetClipboardData(CF_UNICODETEXT, hClipboardData) == nullptr) + return true; } } } diff --git a/grepWinNP3/src/InfoDlg.cpp b/grepWinNP3/src/InfoDlg.cpp deleted file mode 100644 index 3e878ba78..000000000 --- a/grepWinNP3/src/InfoDlg.cpp +++ /dev/null @@ -1,79 +0,0 @@ -// grepWin - regex search and replace for Windows - -// Copyright (C) 2007-2009, 2011-2014, 2020-2021 - Stefan Kueng - -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software Foundation, -// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -// -#include "stdafx.h" -#include "InfoDlg.h" -#include "StringUtils.h" -#include "DPIAware.h" -#include "maxpath.h" - -#include -#include - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -CInfoDlg::CInfoDlg() -{ -} - -CInfoDlg::~CInfoDlg() -{ -} - -//Function which takes input of An HTML Resource Id -BOOL CInfoDlg::ShowDialog(HWND hParent, UINT idAboutHtmlid, HINSTANCE hInstance) -{ - //Load the IE Specific MSTML Interface DKK - HINSTANCE hinstMshtml = LoadLibrary(TEXT("mshtml.dll")); - BOOL bSuccess = FALSE; - if (hinstMshtml) - { - //Locate The Function ShowHTMLDialog in the Loaded mshtml.dll - SHOWHTMLDIALOGEXFN* pfnShowHTMLDialog = reinterpret_cast(GetProcAddress(hinstMshtml, "ShowHTMLDialogEx")); - if (pfnShowHTMLDialog) - { - auto lpszModule = std::make_unique(MAX_PATH_NEW); - //Get The Application Path - if (GetModuleFileName(hInstance, lpszModule.get(), MAX_PATH_NEW)) - { - //Add the IE Res protocol - auto strResourceURL = std::make_unique(MAX_PATH_NEW); - swprintf_s(strResourceURL.get(), MAX_PATH_NEW, L"res://%s/%u", lpszModule.get(), idAboutHtmlid); - auto iLength = wcslen(strResourceURL.get()); - auto lpWideCharStr = std::make_unique(iLength + 1); - //Attempt to Create the URL Moniker to the specified in the URL String - IMoniker* pmk; - if (SUCCEEDED(CreateURLMoniker(NULL, strResourceURL.get(), &pmk))) - { - //Invoke the ShowHTMLDialog function by pointer - //passing the HWND of your Application , the Moniker, - //the remaining parameters can be set to NULL - auto opts = CStringUtils::Format(L"dialogHeight:%dpx; dialogWidth:%dpx; resizable:yes", - CDPIAware::Instance().Scale(hParent, 600), - CDPIAware::Instance().Scale(hParent, 480)); - pfnShowHTMLDialog(nullptr, pmk, HTMLDLG_MODELESS, nullptr, opts.data(), nullptr); - bSuccess = TRUE; - } - } - } - FreeLibrary(hinstMshtml); - } - return bSuccess; -} diff --git a/grepWinNP3/src/InfoDlg.h b/grepWinNP3/src/InfoDlg.h deleted file mode 100644 index 414eb58bf..000000000 --- a/grepWinNP3/src/InfoDlg.h +++ /dev/null @@ -1,29 +0,0 @@ -// grepWin - regex search and replace for Windows - -// Copyright (C) 2007-2008, 2020-2021 - Stefan Kueng - -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software Foundation, -// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -// -#pragma once - -class CInfoDlg -{ -public: - CInfoDlg(); - virtual ~CInfoDlg(); - -public: - static BOOL ShowDialog(HWND hParent, UINT idAboutHtmlid, HINSTANCE hInstance); -}; diff --git a/grepWinNP3/src/Resources/grepWin.rc b/grepWinNP3/src/Resources/grepWin.rc index 16e1e604085c2a8b320b889b3b7fbce2ae16ea25..d210c253199378bbe2a15883b83efd2386c091ef 100644 GIT binary patch delta 69 zcmZ3mn`z!|rVZQjSc4cs7~CfFbBj*Cl&1sb6?$t<-q6P(oW_vPkiw9|kj|jTP{dHe Vkj9`ic_PR9$!qesHWe(;1poyA6}NZT^?PKo - - - - - - Regex Help - - - - -

This help file shows only the basics of a regular expression search, and - it's here only to show the flavor of the used regex.

-

If you're not familiar with regular expressions, please consult - a tutorial like https://www.regular-expressions.info/tutorial.html

-

- The Regex syntax is described in detail here: - https://www.boost.org/doc/libs/release/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html -
- and all the possible character classes can be found here: - https://www.boost.org/doc/libs/release/libs/regex/doc/html/boost_regex/syntax/character_classes.html -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Regular expression examples

-
.Matches all characters
+Matches the previous expression one or more times
*Matches the previous expression zero or more times
\Escapes special characters
\Q...\EMatches the characters between \Q and \E literally, - suppressing the meaning of special characters.
[a-c]Matches a, b and c
\dMatches all digits
\wMatches all word characters
\sMatches all whitespace characters
^Matches the start of a line
$Matches the end of a line
\bMatches a word boundary. Use this to search for whole words, e.g. \bword\b.
\x{FFFF}Matches the unicode character 0xFFFF. Note: this only works for text files!
\xFFMatches the character 0xFF
-

for replacing, the following placeholders can be used

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$&Outputs what matched the whole expression
$` or ${^PREMATCH}Outputs the text between the end of the last match found (or the start of the - text if no previous match was found), and the start of the current match
$' or ${^POSTMATCH}Outputs all the text following the end of the current match
$+Outputs what matched the last marked sub-expression in the regular expression -
$n or ${n}Outputs what matched the n'th sub-expression
$$Outputs a literal '$'
$+{NAME}Outputs whatever matched the sub-expression named "NAME"
${count08}replaced with numbers starting from 1, incrementing by 1 for every match. The - numbers after "count" are optional and indicate how many leading spaces the output should use, or if the - number is preceded by a zero how many leading zeros.
${count08(start)}same as ${count}, but with "start" as the start value for counting
${count08(start, increment)}same as ${count(start)}, but with "increment" as the increment value - instead of the default 1
${filepath}replaced with the path of the currently searched file
${filename}replaced with the name of the currently searched file. The name does not include - the file extension
${fileext}replaced with the extension of the currently searched file
${now}replaced with the current date and time in the locale system format
${now}replaced with the current date and time with the specified format. - The format string must be in the format of the strftime c++ function. See https://www.cplusplus.com/reference/ctime/strftime/ - for the specs.
- Example: ${now,%A, %B %d, %Y} would print "Saturday, March 17, 2021"
- The tooltip on the replace text box shows the expanded string.
\aOutputs the bell character: '\a'
\eOutputs the ANSI escape character (code point 27)
\fOutputs a form feed character: '\f'
\nOutputs a newline character: '\n'
\rOutputs a carriage return character: '\r'
\tOutputs a tab character: '\t'
\vOutputs a vertical tab character: '\v'
\xDDOutputs the character whose hexadecimal code point is 0xDD
\x{DDDD}Outputs the character whose hexadecimal code point is 0xDDDDD
\cXOutputs the ANSI escape sequence "escape-X"
\DIf D is a decimal digit in the range 1-9, then outputs the text - that matched sub-expression D
\lCauses the next character to be outputted, to be output in lower case
\uCauses the next character to be outputted, to be output in upper case
\LCauses all subsequent characters to be output in lower case, until a \E is found
\UCauses all subsequent characters to be output in upper case, until a \E is found
\ETerminates a \L or \U sequence
- - - diff --git a/grepWinNP3/src/Resources/infodlg.rtf b/grepWinNP3/src/Resources/infodlg.rtf new file mode 100644 index 000000000..74154c566 --- /dev/null +++ b/grepWinNP3/src/Resources/infodlg.rtf @@ -0,0 +1,124 @@ +{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}} +{\colortbl ;\red0\green0\blue0;\red0\green0\blue255;\red0\green0\blue238;} +{\*\generator Riched20 10.0.22000}{\*\mmathPr\mdispDef1\mwrapIndent1440 }\viewkind4\uc1 +\pard\widctlpar\fi-10\li-5\sa138\sl240\slmult1\cf1\f0\fs24 This help file shows only the basics of a regular expression search, and it's here only to show the flavor of the used regex.\par + +\pard\widctlpar\fi-10\li-5\sl240\slmult1 If you're not familiar with regular expressions, please consult a tutorial like {\cf0{\field{\*\fldinst{HYPERLINK https://www.regular-expressions.info/tutorial.html }}{\fldrslt{https://www.regular-expressions.info/tutorial.html\ul0\cf0}}}}\cf0\f0\fs24\par + +\pard\widctlpar\fi-10\li-5\sa138\sl240\slmult1\cf1\par + +\pard\widctlpar\sa160\sl252\slmult1\expndtw1\charscalex110 The\expndtw8 \expndtw1 Regex\expndtw8 \expndtw1 syntax\expndtw8 \expndtw1 is\expndtw8 \expndtw1 described\expndtw8 \expndtw1 in\expndtw8 \expndtw1 detail\expndtw7 \expndtw1 here:\line {\cf0\charscalex104{\field{\*\fldinst{HYPERLINK https://www.boost.org/doc/libs/release/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html }}{\fldrslt{https://www.boost.org/doc/libs/release/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html\ul0\cf0}}}}\expndtw0\charscalex0\f0\fs24\par +\expndtw1\charscalex109 and\expndtw8 \expndtw1 all\expndtw7 \expndtw1 the\expndtw8 \expndtw1 possible\expndtw8 \expndtw1 character\expndtw8 \expndtw1 classes\expndtw8 \expndtw1 can\expndtw8 \expndtw1 be\expndtw8 \expndtw1 found\expndtw8 \expndtw1 here:\line {\cf0\charscalex105{\field{\*\fldinst{HYPERLINK https://www.boost.org/doc/libs/release/libs/regex/doc/html/boost_regex/syntax/character_classes.html }}{\fldrslt{https://www.boost.org/doc/libs/release/libs/regex/doc/html/boost_regex/syntax/character_classes.html\ul0\cf0}}}}\expndtw0\charscalex0\f0\fs24\par +\trowd\trgaph134\trleft12\trrh612\trpaddl134\trpaddr134\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5114 +\pard\intbl\widctlpar\sl252\slmult1\b\fs36 Regular expression examples\b0\cell\row\trowd\trgaph134\trleft12\trrh396\trpaddl134\trpaddr134\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1704\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5116 +\pard\intbl\widctlpar\sl252\slmult1\fs24 .\cell Matches all characters\cell\row\trowd\trgaph134\trleft12\trrh588\trpaddl134\trpaddr134\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1704\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5116 +\pard\intbl\widctlpar\sl252\slmult1 +\cell Matches the previous expression one or more times\cell\row\trowd\trgaph134\trleft12\trrh588\trpaddl134\trpaddr134\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1704\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5116 +\pard\intbl\widctlpar\sl252\slmult1 *\cell Matches the previous expression zero or more times\cell\row\trowd\trgaph134\trleft12\trrh516\trpaddl134\trpaddr134\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1704\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5116 +\pard\intbl\widctlpar\sl252\slmult1\\\cell Escapes special characters\cell\row\trowd\trgaph134\trleft12\trrh780\trpaddl134\trpaddr134\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1704\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5116 +\pard\intbl\widctlpar\sl252\slmult1\\Q...\\E\cell +\pard\intbl\widctlpar\ri155\sl252\slmult1\qj Matches the characters between \\Q and \\E literally, suppressing the meaning of special characters.\cell\row\trowd\trgaph134\trleft12\trrh516\trpaddl134\trpaddr134\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1704\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5116 +\pard\intbl\widctlpar\sl252\slmult1 [a-c]\cell Matches a, b and c\cell\row\trowd\trgaph134\trleft12\trrh516\trpaddl134\trpaddr134\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1704\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5116 +\pard\intbl\widctlpar\sl252\slmult1\\d\cell Matches all digits\cell\row\trowd\trgaph134\trleft12\trrh516\trpaddl134\trpaddr134\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1704\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5116 +\pard\intbl\widctlpar\sl252\slmult1\\w\cell Matches all word characters\cell\row\trowd\trgaph134\trleft12\trrh516\trpaddl134\trpaddr134\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1704\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5116 +\pard\intbl\widctlpar\sl252\slmult1\\s\cell Matches all whitespace characters\cell\row\trowd\trgaph134\trleft12\trrh408\trpaddl134\trpaddr134\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1704\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5116 +\pard\intbl\widctlpar\sl252\slmult1 ^\cell Matches the start of a line\cell\row\trowd\trgaph134\trleft12\trrh408\trpaddl134\trpaddr134\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1704\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5116 +\pard\intbl\widctlpar\sl252\slmult1 $\cell Matches the end of a line\cell\row\trowd\trgaph134\trleft12\trrh588\trpaddl134\trpaddr134\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1704\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5116 +\pard\intbl\widctlpar\sl252\slmult1\\b\cell Matches a word boundary. Use this to search for whole words, e.g. \\bword\\b.\cell\row\trowd\trgaph134\trleft12\trrh780\trpaddl134\trpaddr134\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1704\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5116 +\pard\intbl\widctlpar\sl252\slmult1\\x\{FFFF\}\cell Matches the unicode character\par +0xFFFF. Note: this only works for text\par +files!\cell\row\trowd\trgaph134\trleft12\trrh408\trpaddl134\trpaddr134\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1704\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5116 +\pard\intbl\widctlpar\sl252\slmult1\\xFF\cell Matches the character 0xFF\cell\row +\pard\widctlpar\fi-10\li-5\sa138\sl240\slmult1\par +for replacing, the following placeholders can be used\par +\trowd\trgaph105\trleft6\trrh408\trpaddl105\trpaddr105\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1 $&\cell Outputs what matched the whole expression\cell\row\trowd\trgaph105\trleft6\trrh780\trpaddl105\trpaddr105\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1 $` or\par +$\{^PREMATCH\}\cell Outputs the text between the end of the last match found (or the start of the text if no previous match was found), and the start of the current match\cell\row\trowd\trgaph105\trleft6\trrh588\trpaddl105\trpaddr105\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1 $' or\par +$\{^POSTMATCH\}\cell Outputs all the text following the end of the current\par +match\cell\row\trowd\trgaph105\trleft6\trrh588\trpaddl105\trpaddr105\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1 $+\cell Outputs what matched the last marked subexpression in the regular expression\cell\row\trowd\trgaph105\trleft6\trrh408\trpaddl105\trpaddr105\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1 $n or $\{n\}\cell Outputs what matched the n'th sub-expression\cell\row\trowd\trgaph105\trleft6\trrh408\trpaddl105\trpaddr105\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1 $$\cell Outputs a literal '$'\cell\row\trowd\trgaph105\trleft6\trrh588\trpaddl105\trpaddr105\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1 $+\{NAME\}\cell Outputs whatever matched the sub-expression named "NAME"\cell\row\trowd\trgaph105\trleft6\trrh1356\trpaddl105\trpaddr105\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1 $\{count08\}\cell +\pard\intbl\widctlpar\ri4\sl252\slmult1 replaced with numbers starting from 1, incrementing by 1 for every match. The numbers after "count" are optional and indicate how many leading spaces the output should use, or if the number is preceded by a zero how many leading zeros.\cell\row\trowd\trgaph105\trleft6\trrh588\trpaddl105\trpaddr105\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1 $\{count08(start)\}\cell same as $\{count\}, but with "start" as the start value for counting\cell\row\trowd\trgaph102\trleft6\trrh588\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\tx5207 $\{count08(start, increment)\}\cell +\pard\intbl\widctlpar\ri35\sl252\slmult1 same as $\{count(start)\}, but with "increment" as the increment value instead of the default 1\cell\row\trowd\trgaph102\trleft6\trrh408\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1 $\{filepath\}\cell replaced with the path of the currently searched file\cell\row\trowd\trgaph102\trleft6\trrh588\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1 $\{filename\}\cell replaced with the name of the currently searched file. The name does not include the file extension\cell\row\trowd\trgaph102\trleft6\trrh588\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1 $\{fileext\}\cell replaced with the extension of the currently searched file\cell\row\trowd\trgaph102\trleft6\trrh588\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1 $\{now\}\cell +\pard\intbl\widctlpar\ri28\sl252\slmult1 replaced with the current date and time in the locale system format\cell\row\trowd\trgaph102\trleft6\trrh1932\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1 $\{now\}\cell +\pard\intbl\widctlpar\sl240\slmult1 replaced with the current date and time with the specified format. The format string must be in the format of the strftime c++ function. See {{\field{\*\fldinst{HYPERLINK "https://www.cplusplus.com/reference/ctime/strftime/"}}{\fldrslt{\ul\cf2\cf3\ul https://www.cplusplus.com/reference/ctime/strftime/ }}}}\f0\fs24 for the specs.\par + +\pard\intbl\widctlpar\sl252\slmult1 Example: $\{now,%A, %B %d, %Y\} would print\par +"Saturday, March 17, 2021"\par +The tooltip on the replace text box shows the expanded string.\cell\row\trowd\trgaph102\trleft6\trrh408\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\\a\cell Outputs the bell character: '\\a'\cell\row\trowd\trgaph102\trleft6\trrh408\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\\e\cell Outputs the ANSI escape character (code point 27)\cell\row\trowd\trgaph102\trleft6\trrh408\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\\f\cell Outputs a form feed character: '\\f'\cell\row\trowd\trgaph102\trleft6\trrh408\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\\n\cell Outputs a newline character: '\\n'\cell\row\trowd\trgaph102\trleft6\trrh408\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\\r\cell Outputs a carriage return character: '\\r'\cell\row\trowd\trgaph102\trleft6\trrh408\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\\t\cell Outputs a tab character: '\\t'\cell\row\trowd\trgaph102\trleft6\trrh408\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\\v\cell Outputs a vertical tab character: '\\v'\cell\row\trowd\trgaph102\trleft6\trrh588\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\\xDD\cell Outputs the character whose hexadecimal code point is 0xDD\cell\row\trowd\trgaph102\trleft6\trrh588\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\\x\{DDDD\}\cell Outputs the character whose hexadecimal code point is 0xDDDDD\cell\row\trowd\trgaph102\trleft6\trrh408\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\\cX\cell Outputs the ANSI escape sequence "escape-X"\cell\row\trowd\trgaph102\trleft6\trrh588\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\\D\cell If D is a decimal digit in the range 1-9, then outputs the text that matched sub-expression D\cell\row\trowd\trgaph102\trleft6\trrh588\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\\l\cell Causes the next character to be outputted, to be output in lower case\cell\row\trowd\trgaph102\trleft6\trrh588\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\\u\cell Causes the next character to be outputted, to be output in upper case\cell\row\trowd\trgaph102\trleft6\trrh588\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\\L\cell Causes all subsequent characters to be output in lower case, until a \\E is found\cell\row\trowd\trgaph102\trleft6\trrh588\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\\U\cell Causes all subsequent characters to be output in upper case, until a \\E is found\cell\row\trowd\trgaph102\trleft6\trrh408\trpaddl102\trpaddr102\trpaddfl3\trpaddfr3 +\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx1458\clvertalc\clbrdrl\brdrw12\brdrs\brdrcf1\clbrdrt\brdrw12\brdrs\brdrcf1\clbrdrr\brdrw12\brdrs\brdrcf1\clbrdrb\brdrw12\brdrs\brdrcf1 \cellx5124 +\pard\intbl\widctlpar\sl252\slmult1\\E\cell Terminates a \\L or \\U sequence\cell\row +\pard\widctlpar\li-96\ri4713\sl252\slmult1\fs16\par +} + \ No newline at end of file diff --git a/grepWinNP3/src/SearchDlg.cpp b/grepWinNP3/src/SearchDlg.cpp index 250dd42dd..967289bed 100644 --- a/grepWinNP3/src/SearchDlg.cpp +++ b/grepWinNP3/src/SearchDlg.cpp @@ -34,7 +34,6 @@ #include "BookmarksDlg.h" #include "MultiLineEditDlg.h" #include "AboutDlg.h" -#include "InfoDlg.h" #include "DropFiles.h" #include "RegexReplaceFormatter.h" #include "LineData.h" @@ -138,7 +137,6 @@ CSearchDlg::CSearchDlg(HWND hParent) , m_bCaseSensitiveC(false) , m_bDotMatchesNewline(false) , m_bDotMatchesNewlineC(false) - , m_bNotSearch(false) , m_bCaptureSearch(false) , m_bSizeC(false) , m_endDialog(false) @@ -831,7 +829,11 @@ LRESULT CSearchDlg::DlgFunc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara break; case WM_HELP: { - CInfoDlg::ShowDialog(*this, IDR_INFODLG, hResource); + if (m_rtfDialog == nullptr) + { + m_rtfDialog = std::make_unique(); + } + m_rtfDialog->ShowModeless(g_hInst, *this, "grepWinNP3 help", IDR_INFODLG, L"RTF", IDI_GREPWIN, 400, 600); } break; case WM_SYSCOMMAND: @@ -1089,13 +1091,6 @@ LRESULT CSearchDlg::DoCommand(int id, int msg) m_listItems.clear(); m_listItems.reserve(500000); s_BackupAndTmpFiles.clear(); - if (m_searchString.empty()) - { - // switch to file view - CheckRadioButton(*this, IDC_RESULTFILES, IDC_RESULTCONTENT, IDC_RESULTFILES); - m_showContent = false; - InitResultList(); - } HWND hListControl = GetDlgItem(*this, IDC_RESULTLIST); ListView_SetItemCount(hListControl, 0); @@ -1159,6 +1154,14 @@ LRESULT CSearchDlg::DoCommand(int id, int msg) m_replaceString = ExpandString(m_replaceString); } + if (m_searchString.empty() || IsNOTSearch()) + { + // switch to file view + CheckRadioButton(*this, IDC_RESULTFILES, IDC_RESULTCONTENT, IDC_RESULTFILES); + m_showContent = false; + InitResultList(); + } + InterlockedExchange(&s_SearchThreadRunning, TRUE); InterlockedExchange(&s_Cancelled, FALSE); SetDlgItemText(*this, IDOK, TranslatedString(hResource, IDS_STOP).c_str()); diff --git a/grepWinNP3/src/SearchDlg.h b/grepWinNP3/src/SearchDlg.h index 86943d937..19432147c 100644 --- a/grepWinNP3/src/SearchDlg.h +++ b/grepWinNP3/src/SearchDlg.h @@ -26,6 +26,7 @@ #include "Registry.h" #include "EditDoubleClick.h" #include "StringUtils.h" +#include "InfoRtfDialog.h" #include #include #include @@ -43,6 +44,7 @@ #endif #include + using namespace Microsoft::WRL; #define SEARCH_START (WM_APP+1) @@ -227,7 +229,6 @@ private: bool m_bCaseSensitiveC; bool m_bDotMatchesNewline; bool m_bDotMatchesNewlineC; - bool m_bNotSearch; bool m_bCaptureSearch; bool m_bSizeC; bool m_endDialog; @@ -251,6 +252,7 @@ private: bool m_bAscending; std::wstring m_resultString; std::wstring m_toolTipReplaceString; + std::unique_ptr m_rtfDialog; bool m_bStayOnTop; BYTE m_OpacityNoFocus; diff --git a/grepWinNP3/src/last/version.h b/grepWinNP3/src/last/version.h index ef0679761..ed639ee73 100644 --- a/grepWinNP3/src/last/version.h +++ b/grepWinNP3/src/last/version.h @@ -6,13 +6,13 @@ //#pragma message(__LOC__"Run the NAnt script to get proper version info") -#define FILEVER 2, 1, 8, 40 -#define PRODUCTVER 2, 1, 8, 40 -#define STRFILEVER "2.1.8.40\0" -#define STRPRODUCTVER "2.1.8.40\0" +#define FILEVER 2, 1, 9, 41 +#define PRODUCTVER 2, 1, 9, 41 +#define STRFILEVER "2.1.9.41\0" +#define STRPRODUCTVER "2.1.9.41\0" #define GREPWIN_VERMAJOR 2 #define GREPWIN_VERMINOR 1 -#define GREPWIN_VERMICRO 8 -#define GREPWIN_VERBUILD 40 -#define GREPWIN_VERDATE "2021-10-19" +#define GREPWIN_VERMICRO 9 +#define GREPWIN_VERBUILD 41 +#define GREPWIN_VERDATE "2021-11-30" diff --git a/grepWinNP3/src/resource.h b/grepWinNP3/src/resource.h index aa44ecdca..d242cc581 100644 --- a/grepWinNP3/src/resource.h +++ b/grepWinNP3/src/resource.h @@ -39,7 +39,6 @@ #define IDS_REGEXINVALID 132 #define IDC_BKPOPUP 133 #define IDS_SIZE 133 -#define IDR_INFODLG 134 #define IDS_LINE 134 #define IDD_ABOUT 135 #define IDS_MATCHES 135 @@ -50,6 +49,8 @@ #define IDD_SETTINGS 138 #define IDS_ENCODING 138 #define IDS_DATEMODIFIED 139 +#define IDR_RTF1 139 +#define IDR_INFODLG 139 #define IDS_SELECTEDITOR 140 #define IDS_OPENWITHEDITOR 141 #define IDS_OPENCONTAININGFOLDER 142 @@ -201,7 +202,7 @@ #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NO_MFC 1 -#define _APS_NEXT_RESOURCE_VALUE 139 +#define _APS_NEXT_RESOURCE_VALUE 140 #define _APS_NEXT_COMMAND_VALUE 32776 #define _APS_NEXT_CONTROL_VALUE 1092 #define _APS_NEXT_SYMED_VALUE 110 diff --git a/grepWinNP3/version.build.in b/grepWinNP3/version.build.in index 924128827..9037b49d7 100644 --- a/grepWinNP3/version.build.in +++ b/grepWinNP3/version.build.in @@ -4,7 +4,7 @@ - + diff --git a/grepWinNP3/version.txt b/grepWinNP3/version.txt index d0f87c181..59c8b9c71 100644 --- a/grepWinNP3/version.txt +++ b/grepWinNP3/version.txt @@ -1,2 +1,2 @@ -2.0.8.1054 +2.0.9.1098 https://tools.stefankueng.com/grepWin.html