From 38bf6ecc352bc3b9a54993a6d99dc3ed4a9be65c Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sat, 22 Jan 2022 13:57:23 +0100 Subject: [PATCH] Use standard type instead of Microsoft MACRO --- PowerEditor/src/DarkMode/DarkMode.cpp | 2 +- PowerEditor/src/MISC/Common/Common.cpp | 2 +- PowerEditor/src/MISC/Common/Common.h | 2 +- PowerEditor/src/MISC/RegExt/regExtDlg.cpp | 2 +- PowerEditor/src/MISC/RegExt/regExtDlg.h | 2 +- PowerEditor/src/MISC/md5/md5Dlgs.cpp | 4 +- PowerEditor/src/MISC/md5/md5Dlgs.h | 4 +- PowerEditor/src/Notepad_plus.cpp | 138 +++++++++--------- PowerEditor/src/Notepad_plus.h | 18 +-- PowerEditor/src/NppBigSwitch.cpp | 14 +- PowerEditor/src/NppCommands.cpp | 34 ++--- PowerEditor/src/NppNotification.cpp | 2 +- PowerEditor/src/Parameters.h | 24 +-- .../src/ScintillaComponent/AutoCompletion.cpp | 34 ++--- .../src/ScintillaComponent/AutoCompletion.h | 2 +- .../src/ScintillaComponent/FindReplaceDlg.cpp | 58 ++++---- .../src/ScintillaComponent/FindReplaceDlg.h | 22 +-- .../ScintillaComponent/FunctionCallTip.cpp | 10 +- .../src/ScintillaComponent/FunctionCallTip.h | 4 +- .../src/ScintillaComponent/GoToLineDlg.cpp | 2 +- .../src/ScintillaComponent/GoToLineDlg.h | 2 +- .../ScintillaComponent/ScintillaEditView.cpp | 90 ++++++------ .../ScintillaComponent/ScintillaEditView.h | 52 +++---- .../ScintillaComponent/SmartHighlighter.cpp | 10 +- .../ScintillaComponent/UserDefineDialog.cpp | 18 +-- .../src/ScintillaComponent/UserDefineDialog.h | 18 +-- .../src/ScintillaComponent/columnEditor.cpp | 2 +- .../src/ScintillaComponent/columnEditor.h | 2 +- .../xmlMatchedTagsHighlighter.cpp | 86 +++++------ .../xmlMatchedTagsHighlighter.h | 26 ++-- .../src/WinControls/AboutDlg/AboutDlg.cpp | 8 +- .../src/WinControls/AboutDlg/AboutDlg.h | 8 +- .../AnsiCharPanel/ansiCharPanel.cpp | 2 +- .../WinControls/AnsiCharPanel/ansiCharPanel.h | 2 +- .../clipboardHistoryPanel.cpp | 2 +- .../ClipboardHistory/clipboardHistoryPanel.h | 2 +- .../WinControls/ColourPicker/ColourPopup.cpp | 4 +- .../WinControls/ColourPicker/ColourPopup.h | 4 +- .../WinControls/ColourPicker/WordStyleDlg.cpp | 2 +- .../WinControls/ColourPicker/WordStyleDlg.h | 2 +- .../WinControls/DockingWnd/DockingCont.cpp | 2 +- .../src/WinControls/DockingWnd/DockingCont.h | 2 +- .../DockingWnd/DockingDlgInterface.h | 2 +- .../WinControls/DocumentMap/documentMap.cpp | 14 +- .../src/WinControls/DocumentMap/documentMap.h | 8 +- .../DocumentMap/documentSnapshot.cpp | 6 +- .../DocumentMap/documentSnapshot.h | 2 +- .../WinControls/FileBrowser/fileBrowser.cpp | 8 +- .../src/WinControls/FileBrowser/fileBrowser.h | 2 +- .../FindCharsInRange/FindCharsInRange.cpp | 8 +- .../FindCharsInRange/FindCharsInRange.h | 4 +- .../FunctionList/functionListPanel.cpp | 18 +-- .../FunctionList/functionListPanel.h | 4 +- .../FunctionList/functionParser.cpp | 30 ++-- .../WinControls/FunctionList/functionParser.h | 6 +- .../src/WinControls/Grid/ShortcutMapper.cpp | 2 +- .../src/WinControls/Grid/ShortcutMapper.h | 2 +- .../WinControls/PluginsAdmin/pluginsAdmin.cpp | 2 +- .../WinControls/PluginsAdmin/pluginsAdmin.h | 2 +- .../WinControls/Preference/preferenceDlg.cpp | 38 ++--- .../WinControls/Preference/preferenceDlg.h | 38 ++--- .../WinControls/ProjectPanel/ProjectPanel.cpp | 8 +- .../WinControls/ProjectPanel/ProjectPanel.h | 4 +- .../StaticDialog/RunDlg/RunDlg.cpp | 6 +- .../WinControls/StaticDialog/RunDlg/RunDlg.h | 2 +- .../WinControls/StaticDialog/StaticDialog.cpp | 2 +- .../WinControls/StaticDialog/StaticDialog.h | 4 +- .../src/WinControls/TaskList/TaskListDlg.cpp | 2 +- .../src/WinControls/TaskList/TaskListDlg.h | 2 +- .../VerticalFileSwitcher.cpp | 2 +- .../VerticalFileSwitcher.h | 2 +- .../WinControls/WindowsDlg/SizeableDlg.cpp | 2 +- .../src/WinControls/WindowsDlg/SizeableDlg.h | 2 +- .../src/WinControls/WindowsDlg/WindowsDlg.cpp | 2 +- .../src/WinControls/WindowsDlg/WindowsDlg.h | 2 +- .../src/WinControls/shortcut/RunMacroDlg.cpp | 2 +- .../src/WinControls/shortcut/RunMacroDlg.h | 2 +- .../src/WinControls/shortcut/shortcut.cpp | 4 +- .../src/WinControls/shortcut/shortcut.h | 8 +- PowerEditor/src/lesDlgs.cpp | 4 +- PowerEditor/src/lesDlgs.h | 4 +- .../src/tools/NppShell/src/NppShell.cpp | 4 +- scintilla/include/Sci_Position.h | 6 +- 83 files changed, 497 insertions(+), 501 deletions(-) diff --git a/PowerEditor/src/DarkMode/DarkMode.cpp b/PowerEditor/src/DarkMode/DarkMode.cpp index 41be2b61a..460a3fd43 100644 --- a/PowerEditor/src/DarkMode/DarkMode.cpp +++ b/PowerEditor/src/DarkMode/DarkMode.cpp @@ -134,7 +134,7 @@ bool IsHighContrast() void SetTitleBarThemeColor(HWND hWnd, BOOL dark) { if (g_buildNumber < 18362) - SetPropW(hWnd, L"UseImmersiveDarkModeColors", reinterpret_cast(static_cast(dark))); + SetPropW(hWnd, L"UseImmersiveDarkModeColors", reinterpret_cast(static_cast(dark))); else if (_SetWindowCompositionAttribute) { WINDOWCOMPOSITIONATTRIBDATA data = { WCA_USEDARKMODECOLORS, &dark, sizeof(dark) }; diff --git a/PowerEditor/src/MISC/Common/Common.cpp b/PowerEditor/src/MISC/Common/Common.cpp index 4494aa952..7fee9e43f 100644 --- a/PowerEditor/src/MISC/Common/Common.cpp +++ b/PowerEditor/src/MISC/Common/Common.cpp @@ -397,7 +397,7 @@ const wchar_t * WcharMbcsConvertor::char2wchar(const char * mbcs2Convert, size_t // "mstart" and "mend" are pointers to indexes in mbcs2Convert, // which are converted to the corresponding indexes in the returned wchar_t string. -const wchar_t * WcharMbcsConvertor::char2wchar(const char * mbcs2Convert, size_t codepage, INT_PTR* mstart, INT_PTR* mend) +const wchar_t * WcharMbcsConvertor::char2wchar(const char * mbcs2Convert, size_t codepage, intptr_t* mstart, intptr_t* mend) { // Do not process NULL pointer if (!mbcs2Convert) return NULL; diff --git a/PowerEditor/src/MISC/Common/Common.h b/PowerEditor/src/MISC/Common/Common.h index 9f79e065a..a28e00f44 100644 --- a/PowerEditor/src/MISC/Common/Common.h +++ b/PowerEditor/src/MISC/Common/Common.h @@ -95,7 +95,7 @@ public: } const wchar_t * char2wchar(const char *mbStr, size_t codepage, int lenMbcs =-1, int* pLenOut=NULL, int* pBytesNotProcessed=NULL); - const wchar_t * char2wchar(const char *mbcs2Convert, size_t codepage, INT_PTR* mstart, INT_PTR* mend); + const wchar_t * char2wchar(const char *mbcs2Convert, size_t codepage, intptr_t* mstart, intptr_t* mend); const char * wchar2char(const wchar_t *wcStr, size_t codepage, int lenIn = -1, int* pLenOut = NULL); const char * wchar2char(const wchar_t *wcStr, size_t codepage, long* mstart, long* mend); diff --git a/PowerEditor/src/MISC/RegExt/regExtDlg.cpp b/PowerEditor/src/MISC/RegExt/regExtDlg.cpp index e243d941d..2ec2d7151 100644 --- a/PowerEditor/src/MISC/RegExt/regExtDlg.cpp +++ b/PowerEditor/src/MISC/RegExt/regExtDlg.cpp @@ -81,7 +81,7 @@ void RegExtDlg::doDialog(bool isRTL) ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_REGEXT_BOX), _hParent, dlgProc, reinterpret_cast(this)); } -INT_PTR CALLBACK RegExtDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK RegExtDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { switch (Message) { diff --git a/PowerEditor/src/MISC/RegExt/regExtDlg.h b/PowerEditor/src/MISC/RegExt/regExtDlg.h index 4411c90ff..4ca67031b 100644 --- a/PowerEditor/src/MISC/RegExt/regExtDlg.h +++ b/PowerEditor/src/MISC/RegExt/regExtDlg.h @@ -33,7 +33,7 @@ public : private : bool _isCustomize = false; - INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); void getRegisteredExts(); void getDefSupportedExts(); diff --git a/PowerEditor/src/MISC/md5/md5Dlgs.cpp b/PowerEditor/src/MISC/md5/md5Dlgs.cpp index 294e59a40..0e2147e8b 100644 --- a/PowerEditor/src/MISC/md5/md5Dlgs.cpp +++ b/PowerEditor/src/MISC/md5/md5Dlgs.cpp @@ -24,7 +24,7 @@ #include #include "resource.h" -INT_PTR CALLBACK HashFromFilesDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK HashFromFilesDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -327,7 +327,7 @@ void HashFromTextDlg::generateHashPerLine() } } -INT_PTR CALLBACK HashFromTextDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK HashFromTextDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { diff --git a/PowerEditor/src/MISC/md5/md5Dlgs.h b/PowerEditor/src/MISC/md5/md5Dlgs.h index 7ee2c46f4..65d944652 100644 --- a/PowerEditor/src/MISC/md5/md5Dlgs.h +++ b/PowerEditor/src/MISC/md5/md5Dlgs.h @@ -32,7 +32,7 @@ public : void setHashType(hashType hashType2set); protected : - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); hashType _ht = hash_md5; static LRESULT CALLBACK HashPathEditStaticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { @@ -62,7 +62,7 @@ public : void setHashType(hashType hashType2set); protected : - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); hashType _ht = hash_md5; static LRESULT CALLBACK HashTextEditStaticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 90fccbb3f..f9291d433 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -1055,7 +1055,7 @@ int Notepad_plus::getHtmlXmlEncoding(const TCHAR *fileName) const const char *intermediaire = "=[ \\t]*.+"; const char *encodingStrRE = "[^ \\t=]+"; - INT_PTR startPos = 0; + intptr_t startPos = 0; auto endPos = lenFile - 1; _invisibleEditView.execute(SCI_SETSEARCHFLAGS, SCFIND_REGEXP|SCFIND_POSIX); @@ -1093,8 +1093,8 @@ int Notepad_plus::getHtmlXmlEncoding(const TCHAR *fileName) const void Notepad_plus::setCodePageForInvisibleView(Buffer const *pBuffer) { - INT_PTR detectedCp = _invisibleEditView.execute(SCI_GETCODEPAGE); - INT_PTR cp2set = SC_CP_UTF8; + intptr_t detectedCp = _invisibleEditView.execute(SCI_GETCODEPAGE); + intptr_t cp2set = SC_CP_UTF8; if (pBuffer->getUnicodeMode() == uni8Bit) { cp2set = (detectedCp == SC_CP_UTF8 ? CP_ACP : detectedCp); @@ -1186,17 +1186,17 @@ bool Notepad_plus::replaceInOpenedFiles() void Notepad_plus::wsTabConvert(spaceTab whichWay) { - INT_PTR tabWidth = _pEditView->execute(SCI_GETTABWIDTH); - INT_PTR currentPos = _pEditView->execute(SCI_GETCURRENTPOS); - INT_PTR lastLine = _pEditView->lastZeroBasedLineNumber(); - INT_PTR docLength = _pEditView->execute(SCI_GETLENGTH) + 1; + intptr_t tabWidth = _pEditView->execute(SCI_GETTABWIDTH); + intptr_t currentPos = _pEditView->execute(SCI_GETCURRENTPOS); + intptr_t lastLine = _pEditView->lastZeroBasedLineNumber(); + intptr_t docLength = _pEditView->execute(SCI_GETLENGTH) + 1; if (docLength < 2) return; - INT_PTR count = 0; - INT_PTR column = 0; - INT_PTR newCurrentPos = 0; - INT_PTR tabStop = tabWidth - 1; // remember, counting from zero ! + intptr_t count = 0; + intptr_t column = 0; + intptr_t newCurrentPos = 0; + intptr_t tabStop = tabWidth - 1; // remember, counting from zero ! bool onlyLeading = false; vector bookmarks; vector folding; @@ -1249,7 +1249,7 @@ void Notepad_plus::wsTabConvert(spaceTab whichWay) { if (source[i] == '\t') { - INT_PTR insertTabs = tabWidth - (column % tabWidth); + intptr_t insertTabs = tabWidth - (column % tabWidth); for (int j = 0; j < insertTabs; ++j) { *dest++ = ' '; @@ -2011,8 +2011,8 @@ void Notepad_plus::filePrint(bool showDialog) { Printer printer; - INT_PTR startPos = _pEditView->execute(SCI_GETSELECTIONSTART); - INT_PTR endPos = _pEditView->execute(SCI_GETSELECTIONEND); + intptr_t startPos = _pEditView->execute(SCI_GETSELECTIONSTART); + intptr_t endPos = _pEditView->execute(SCI_GETSELECTIONEND); printer.init(_pPublicInterface->getHinst(), _pPublicInterface->getHSelf(), _pEditView, showDialog, int(startPos), int(endPos), _nativeLangSpeaker.isRTL()); printer.doPrint(); @@ -2399,9 +2399,9 @@ generic_string Notepad_plus::getLangDesc(LangType langType, bool getName) void Notepad_plus::copyMarkedLines() { - INT_PTR lastLine = _pEditView->lastZeroBasedLineNumber(); + intptr_t lastLine = _pEditView->lastZeroBasedLineNumber(); generic_string globalStr = TEXT(""); - for (INT_PTR i = lastLine ; i >= 0 ; i--) + for (intptr_t i = lastLine ; i >= 0 ; i--) { if (bookmarkPresent(i)) { @@ -2418,11 +2418,11 @@ void Notepad_plus::cutMarkedLines() { std::lock_guard lock(mark_mutex); - INT_PTR lastLine = _pEditView->lastZeroBasedLineNumber(); + intptr_t lastLine = _pEditView->lastZeroBasedLineNumber(); generic_string globalStr = TEXT(""); _pEditView->execute(SCI_BEGINUNDOACTION); - for (INT_PTR i = lastLine ; i >= 0 ; i--) + for (intptr_t i = lastLine ; i >= 0 ; i--) { if (bookmarkPresent(i)) { @@ -2440,10 +2440,10 @@ void Notepad_plus::deleteMarkedLines(bool isMarked) { std::lock_guard lock(mark_mutex); - INT_PTR lastLine = _pEditView->lastZeroBasedLineNumber(); + intptr_t lastLine = _pEditView->lastZeroBasedLineNumber(); _pEditView->execute(SCI_BEGINUNDOACTION); - for (INT_PTR i = lastLine ; i >= 0 ; i--) + for (intptr_t i = lastLine ; i >= 0 ; i--) { if (bookmarkPresent(i) == isMarked) deleteMarkedline(i); @@ -2461,7 +2461,7 @@ void Notepad_plus::pasteToMarkedLines() BOOL canPaste = ::IsClipboardFormatAvailable(clipFormat); if (!canPaste) return; - INT_PTR lastLine = _pEditView->lastZeroBasedLineNumber(); + intptr_t lastLine = _pEditView->lastZeroBasedLineNumber(); ::OpenClipboard(_pPublicInterface->getHSelf()); HANDLE clipboardData = ::GetClipboardData(clipFormat); @@ -2475,7 +2475,7 @@ void Notepad_plus::pasteToMarkedLines() ::CloseClipboard(); _pEditView->execute(SCI_BEGINUNDOACTION); - for (INT_PTR i = lastLine ; i >= 0 ; i--) + for (intptr_t i = lastLine ; i >= 0 ; i--) { if (bookmarkPresent(i)) { @@ -2487,8 +2487,8 @@ void Notepad_plus::pasteToMarkedLines() void Notepad_plus::deleteMarkedline(size_t ln) { - INT_PTR lineLen = _pEditView->execute(SCI_LINELENGTH, ln); - INT_PTR lineBegin = _pEditView->execute(SCI_POSITIONFROMLINE, ln); + intptr_t lineLen = _pEditView->execute(SCI_LINELENGTH, ln); + intptr_t lineBegin = _pEditView->execute(SCI_POSITIONFROMLINE, ln); bookmarkDelete(ln); TCHAR emptyString[2] = TEXT(""); @@ -2497,7 +2497,7 @@ void Notepad_plus::deleteMarkedline(size_t ln) void Notepad_plus::inverseMarks() { - INT_PTR lastLine = _pEditView->lastZeroBasedLineNumber(); + intptr_t lastLine = _pEditView->lastZeroBasedLineNumber(); for (int i = 0 ; i <= lastLine ; ++i) { if (bookmarkPresent(i)) @@ -2513,8 +2513,8 @@ void Notepad_plus::inverseMarks() void Notepad_plus::replaceMarkedline(size_t ln, const TCHAR *str) { - INT_PTR lineBegin = _pEditView->execute(SCI_POSITIONFROMLINE, ln); - INT_PTR lineEnd = _pEditView->execute(SCI_GETLINEENDPOSITION, ln); + intptr_t lineBegin = _pEditView->execute(SCI_POSITIONFROMLINE, ln); + intptr_t lineEnd = _pEditView->execute(SCI_GETLINEENDPOSITION, ln); _pEditView->replaceTarget(str, lineBegin, lineEnd); } @@ -2532,14 +2532,14 @@ generic_string Notepad_plus::getMarkedLine(size_t ln) return line; } -void Notepad_plus::findMatchingBracePos(INT_PTR& braceAtCaret, INT_PTR& braceOpposite) +void Notepad_plus::findMatchingBracePos(intptr_t& braceAtCaret, intptr_t& braceOpposite) { - INT_PTR caretPos = _pEditView->execute(SCI_GETCURRENTPOS); + intptr_t caretPos = _pEditView->execute(SCI_GETCURRENTPOS); braceAtCaret = -1; braceOpposite = -1; TCHAR charBefore = '\0'; - INT_PTR lengthDoc = _pEditView->execute(SCI_GETLENGTH); + intptr_t lengthDoc = _pEditView->execute(SCI_GETLENGTH); if ((lengthDoc > 0) && (caretPos > 0)) { @@ -2567,8 +2567,8 @@ void Notepad_plus::findMatchingBracePos(INT_PTR& braceAtCaret, INT_PTR& braceOpp // return true if 1 or 2 (matched) brace(s) is found bool Notepad_plus::braceMatch() { - INT_PTR braceAtCaret = -1; - INT_PTR braceOpposite = -1; + intptr_t braceAtCaret = -1; + intptr_t braceOpposite = -1; findMatchingBracePos(braceAtCaret, braceOpposite); if ((braceAtCaret != -1) && (braceOpposite == -1)) @@ -2582,8 +2582,8 @@ bool Notepad_plus::braceMatch() if (_pEditView->isShownIndentGuide()) { - INT_PTR columnAtCaret = _pEditView->execute(SCI_GETCOLUMN, braceAtCaret); - INT_PTR columnOpposite = _pEditView->execute(SCI_GETCOLUMN, braceOpposite); + intptr_t columnAtCaret = _pEditView->execute(SCI_GETCOLUMN, braceAtCaret); + intptr_t columnOpposite = _pEditView->execute(SCI_GETCOLUMN, braceOpposite); _pEditView->execute(SCI_SETHIGHLIGHTGUIDE, (columnAtCaret < columnOpposite)?columnAtCaret:columnOpposite); } } @@ -2993,8 +2993,8 @@ void Notepad_plus::addHotSpot(ScintillaEditView* view) pView->execute(SCI_INDICSETFLAGS, URL_INDIC, SC_INDICFLAG_VALUEFORE); } - INT_PTR startPos = 0; - INT_PTR endPos = -1; + intptr_t startPos = 0; + intptr_t endPos = -1; pView->getVisibleStartAndEndPosition(&startPos, &endPos); if (startPos >= endPos) return; pView->execute(SCI_SETINDICATORCURRENT, URL_INDIC); @@ -3041,7 +3041,7 @@ void Notepad_plus::addHotSpot(ScintillaEditView* view) delete[] wideText; } -bool Notepad_plus::isConditionExprLine(INT_PTR lineNumber) +bool Notepad_plus::isConditionExprLine(intptr_t lineNumber) { if (lineNumber < 0 || lineNumber > _pEditView->execute(SCI_GETLINECOUNT)) return false; @@ -3064,7 +3064,7 @@ bool Notepad_plus::isConditionExprLine(INT_PTR lineNumber) return false; } -INT_PTR Notepad_plus::findMachedBracePos(size_t startPos, size_t endPos, char targetSymbol, char matchedSymbol) +intptr_t Notepad_plus::findMachedBracePos(size_t startPos, size_t endPos, char targetSymbol, char matchedSymbol) { if (startPos == endPos) return -1; @@ -3072,7 +3072,7 @@ INT_PTR Notepad_plus::findMachedBracePos(size_t startPos, size_t endPos, char ta if (startPos > endPos) // backward { int balance = 0; - for (INT_PTR i = startPos; i >= static_cast(endPos); --i) + for (intptr_t i = startPos; i >= static_cast(endPos); --i) { char aChar = static_cast(_pEditView->execute(SCI_GETCHARAT, i)); if (aChar == targetSymbol) @@ -3095,11 +3095,11 @@ INT_PTR Notepad_plus::findMachedBracePos(size_t startPos, size_t endPos, char ta void Notepad_plus::maintainIndentation(TCHAR ch) { - INT_PTR eolMode = _pEditView->execute(SCI_GETEOLMODE); - INT_PTR curLine = _pEditView->getCurrentLineNumber(); - INT_PTR prevLine = curLine - 1; - INT_PTR indentAmountPrevLine = 0; - INT_PTR tabWidth = _pEditView->execute(SCI_GETTABWIDTH); + intptr_t eolMode = _pEditView->execute(SCI_GETEOLMODE); + intptr_t curLine = _pEditView->getCurrentLineNumber(); + intptr_t prevLine = curLine - 1; + intptr_t indentAmountPrevLine = 0; + intptr_t tabWidth = _pEditView->execute(SCI_GETTABWIDTH); LangType type = _pEditView->getCurrentBuffer()->getLangType(); @@ -3125,7 +3125,7 @@ void Notepad_plus::maintainIndentation(TCHAR ch) } // get previous char from current line - INT_PTR prevPos = _pEditView->execute(SCI_GETCURRENTPOS) - (eolMode == SC_EOL_CRLF ? 3 : 2); + intptr_t prevPos = _pEditView->execute(SCI_GETCURRENTPOS) - (eolMode == SC_EOL_CRLF ? 3 : 2); UCHAR prevChar = (UCHAR)_pEditView->execute(SCI_GETCHARAT, prevPos); auto curPos = _pEditView->execute(SCI_GETCURRENTPOS); UCHAR nextChar = (UCHAR)_pEditView->execute(SCI_GETCHARAT, curPos); @@ -3200,7 +3200,7 @@ void Notepad_plus::maintainIndentation(TCHAR ch) const char braceExpr[] = "[ \t]*\\{.*"; - INT_PTR posFound = _pEditView->execute(SCI_SEARCHINTARGET, strlen(braceExpr), reinterpret_cast(braceExpr)); + intptr_t posFound = _pEditView->execute(SCI_SEARCHINTARGET, strlen(braceExpr), reinterpret_cast(braceExpr)); if (posFound >= 0) { auto end = _pEditView->execute(SCI_GETTARGETEND); @@ -3215,17 +3215,17 @@ void Notepad_plus::maintainIndentation(TCHAR ch) else if (ch == '}') { // Look backward for the pair { - INT_PTR startPos = _pEditView->execute(SCI_GETCURRENTPOS); + intptr_t startPos = _pEditView->execute(SCI_GETCURRENTPOS); if (startPos != 0) startPos -= 1; - INT_PTR posFound = findMachedBracePos(startPos - 1, 0, '{', '}'); + intptr_t posFound = findMachedBracePos(startPos - 1, 0, '{', '}'); // if no { found, do nothing if (posFound == -1) return; // if { is in the same line, do nothing - INT_PTR matchedPairLine = _pEditView->execute(SCI_LINEFROMPOSITION, posFound); + intptr_t matchedPairLine = _pEditView->execute(SCI_LINEFROMPOSITION, posFound); if (matchedPairLine == curLine) return; @@ -3741,7 +3741,7 @@ void Notepad_plus::updateStatusBar() TCHAR strDocLen[256]; size_t docLen = _pEditView->getCurrentDocLen(); - INT_PTR nbLine = _pEditView->execute(SCI_GETLINECOUNT); + intptr_t nbLine = _pEditView->execute(SCI_GETLINECOUNT); wsprintf(strDocLen, TEXT("length : %s lines : %s"), commafyInt(docLen).c_str(), commafyInt(nbLine).c_str()); @@ -3815,8 +3815,8 @@ void Notepad_plus::updateStatusBar() } TCHAR strLnColSel[128]; - INT_PTR curLN = _pEditView->getCurrentLineNumber(); - INT_PTR curCN = _pEditView->getCurrentColumnNumber(); + intptr_t curLN = _pEditView->getCurrentLineNumber(); + intptr_t curCN = _pEditView->getCurrentColumnNumber(); wsprintf(strLnColSel, TEXT("Ln : %s Col : %s %s"), commafyInt(curLN + 1).c_str(), commafyInt(curCN + 1).c_str(), @@ -4454,14 +4454,14 @@ void Notepad_plus::bookmarkNext(bool forwardScan) size_t lineno = _pEditView->getCurrentLineNumber(); int sci_marker = SCI_MARKERNEXT; size_t lineStart = lineno + 1; //Scan starting from next line - INT_PTR lineRetry = 0; //If not found, try from the beginning + intptr_t lineRetry = 0; //If not found, try from the beginning if (!forwardScan) { lineStart = lineno - 1; //Scan starting from previous line lineRetry = _pEditView->execute(SCI_GETLINECOUNT); //If not found, try from the end sci_marker = SCI_MARKERPREVIOUS; } - INT_PTR nextLine = _pEditView->execute(sci_marker, lineStart, 1 << MARK_BOOKMARK); + intptr_t nextLine = _pEditView->execute(sci_marker, lineStart, 1 << MARK_BOOKMARK); if (nextLine < 0) nextLine = _pEditView->execute(sci_marker, lineRetry, 1 << MARK_BOOKMARK); @@ -4762,9 +4762,9 @@ bool Notepad_plus::doBlockComment(comment_mode currCommentMode) size_t caretPosition = _pEditView->execute(SCI_GETCURRENTPOS); // checking if caret is located in _beginning_ of selected block bool move_caret = caretPosition < selectionEnd; - INT_PTR selStartLine = _pEditView->execute(SCI_LINEFROMPOSITION, selectionStart); - INT_PTR selEndLine = _pEditView->execute(SCI_LINEFROMPOSITION, selectionEnd); - INT_PTR lines = selEndLine - selStartLine; + intptr_t selStartLine = _pEditView->execute(SCI_LINEFROMPOSITION, selectionStart); + intptr_t selEndLine = _pEditView->execute(SCI_LINEFROMPOSITION, selectionEnd); + intptr_t lines = selEndLine - selStartLine; // "caret return" is part of the last selected line if ((lines > 0) && (selectionEnd == static_cast(_pEditView->execute(SCI_POSITIONFROMLINE, selEndLine)))) selEndLine--; @@ -4777,7 +4777,7 @@ bool Notepad_plus::doBlockComment(comment_mode currCommentMode) _pEditView->execute(SCI_BEGINUNDOACTION); - for (INT_PTR i = selStartLine; i <= selEndLine; ++i) + for (intptr_t i = selStartLine; i <= selEndLine; ++i) { size_t lineStart = _pEditView->execute(SCI_POSITIONFROMLINE, i); size_t lineIndent = _pEditView->execute(SCI_GETLINEINDENTPOSITION, i); @@ -5596,17 +5596,17 @@ void Notepad_plus::distractionFreeToggle() void Notepad_plus::doSynScorll(HWND whichView) { - INT_PTR column = 0; - INT_PTR line = 0; + intptr_t column = 0; + intptr_t line = 0; ScintillaEditView *pView; // var for Line - INT_PTR mainCurrentLine, subCurrentLine; + intptr_t mainCurrentLine, subCurrentLine; // var for Column - INT_PTR mxoffset, sxoffset; - INT_PTR pixel; - INT_PTR mainColumn, subColumn; + intptr_t mxoffset, sxoffset; + intptr_t pixel; + intptr_t mainColumn, subColumn; if (whichView == _mainEditView.getHSelf()) { @@ -7905,10 +7905,10 @@ bool Notepad_plus::undoStreamComment(bool tryBlockComment) //-- First, search all start_comment and end_comment before and after the selectionStart and selectionEnd position. const int iSelStart=0, iSelEnd=1; const size_t N_CMNT = 2; - INT_PTR posStartCommentBefore[N_CMNT], posEndCommentBefore[N_CMNT], posStartCommentAfter[N_CMNT], posEndCommentAfter[N_CMNT]; + intptr_t posStartCommentBefore[N_CMNT], posEndCommentBefore[N_CMNT], posStartCommentAfter[N_CMNT], posEndCommentAfter[N_CMNT]; bool blnStartCommentBefore[N_CMNT], blnEndCommentBefore[N_CMNT], blnStartCommentAfter[N_CMNT], blnEndCommentAfter[N_CMNT]; - INT_PTR posStartComment, posEndComment; - INT_PTR selectionStartMove, selectionEndMove; + intptr_t posStartComment, posEndComment; + intptr_t selectionStartMove, selectionEndMove; int flags; //-- Directly use Scintilla-Functions @@ -7977,8 +7977,8 @@ bool Notepad_plus::undoStreamComment(bool tryBlockComment) //-- Ok, there are valid start-comment and valid end-comment around the caret-position. // Now, un-comment stream-comment: retVal = true; - INT_PTR startCommentLength = start_comment_length; - INT_PTR endCommentLength = end_comment_length; + intptr_t startCommentLength = start_comment_length; + intptr_t endCommentLength = end_comment_length; //-- First delete end-comment, so that posStartCommentBefore does not change! //-- Get character before end-comment to decide, if there is a white character before the end-comment, which will be removed too! diff --git a/PowerEditor/src/Notepad_plus.h b/PowerEditor/src/Notepad_plus.h index 835ef8321..9806125ec 100644 --- a/PowerEditor/src/Notepad_plus.h +++ b/PowerEditor/src/Notepad_plus.h @@ -360,8 +360,8 @@ private: //Synchronized Scolling struct SyncInfo final { - INT_PTR _line = 0; - INT_PTR _column = 0; + intptr_t _line = 0; + intptr_t _column = 0; bool _isSynScollV = false; bool _isSynScollH = false; @@ -372,7 +372,7 @@ private: bool _isUDDocked = false; trayIconControler* _pTrayIco = nullptr; - INT_PTR _zoomOriginalValue = 0; + intptr_t _zoomOriginalValue = 0; Accelerator _accelerator; ScintillaAccelerator _scintaccelerator; @@ -496,13 +496,13 @@ private: ::CheckMenuItem(_mainMenuHandle, itemID, MF_BYCOMMAND | (willBeChecked?MF_CHECKED:MF_UNCHECKED)); } - bool isConditionExprLine(INT_PTR lineNumber); - INT_PTR findMachedBracePos(size_t startPos, size_t endPos, char targetSymbol, char matchedSymbol); + bool isConditionExprLine(intptr_t lineNumber); + intptr_t findMachedBracePos(size_t startPos, size_t endPos, char targetSymbol, char matchedSymbol); void maintainIndentation(TCHAR ch); void addHotSpot(ScintillaEditView* view = NULL); - void bookmarkAdd(INT_PTR lineno) const { + void bookmarkAdd(intptr_t lineno) const { if (lineno == -1) lineno = _pEditView->getCurrentLineNumber(); if (!bookmarkPresent(lineno)) @@ -516,14 +516,14 @@ private: _pEditView->execute(SCI_MARKERDELETE, lineno, MARK_BOOKMARK); } - bool bookmarkPresent(INT_PTR lineno) const { + bool bookmarkPresent(intptr_t lineno) const { if (lineno == -1) lineno = _pEditView->getCurrentLineNumber(); LRESULT state = _pEditView->execute(SCI_MARKERGET, lineno); return ((state & (1 << MARK_BOOKMARK)) != 0); } - void bookmarkToggle(INT_PTR lineno) const { + void bookmarkToggle(intptr_t lineno) const { if (lineno == -1) lineno = _pEditView->getCurrentLineNumber(); @@ -546,7 +546,7 @@ private: void inverseMarks(); void replaceMarkedline(size_t ln, const TCHAR *str); generic_string getMarkedLine(size_t ln); - void findMatchingBracePos(INT_PTR& braceAtCaret, INT_PTR& braceOpposite); + void findMatchingBracePos(intptr_t& braceAtCaret, intptr_t& braceOpposite); bool braceMatch(); void activateNextDoc(bool direction); diff --git a/PowerEditor/src/NppBigSwitch.cpp b/PowerEditor/src/NppBigSwitch.cpp index c348a6245..52eb5dd5a 100644 --- a/PowerEditor/src/NppBigSwitch.cpp +++ b/PowerEditor/src/NppBigSwitch.cpp @@ -881,7 +881,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa TCHAR str[strSize]; TCHAR strLine[strSize]; size_t lineNumber; - INT_PTR col; + intptr_t col; int hasSlash; TCHAR *pTchar = reinterpret_cast(lParam); @@ -894,8 +894,8 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa if (hasSlash == FALSE) { // it's not a full file name so try to find the beginning and ending of it - INT_PTR start; - INT_PTR end; + intptr_t start; + intptr_t end; const TCHAR *delimiters; lineNumber = _pEditView->getCurrentLineNumber(); @@ -1313,11 +1313,11 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa break; int counter = 0; - INT_PTR lastLine = _pEditView->execute(SCI_GETLINECOUNT) - 1; - INT_PTR currLine = _pEditView->getCurrentLineNumber(); + intptr_t lastLine = _pEditView->execute(SCI_GETLINECOUNT) - 1; + intptr_t currLine = _pEditView->getCurrentLineNumber(); int indexMacro = _runMacroDlg.getMacro2Exec(); - INT_PTR deltaLastLine = 0; - INT_PTR deltaCurrLine = 0; + intptr_t deltaLastLine = 0; + intptr_t deltaCurrLine = 0; Macro m = _macro; diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 61ce360ab..7753fa7a8 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -163,7 +163,7 @@ void Notepad_plus::command(int id) // As per MSDN (https://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx) // If the function succeeds, it returns a value greater than 32. // If the function fails, it returns an error value that indicates the cause of the failure. - int retResult = static_cast(reinterpret_cast(res)); + int retResult = static_cast(reinterpret_cast(res)); if (retResult <= 32) { generic_string errorMsg; @@ -432,7 +432,7 @@ void Notepad_plus::command(int id) case IDM_EDIT_PASTE: { std::lock_guard lock(command_mutex); - INT_PTR eolMode = _pEditView->execute(SCI_GETEOLMODE); + intptr_t eolMode = _pEditView->execute(SCI_GETEOLMODE); _pEditView->execute(SCI_PASTE); _pEditView->execute(SCI_CONVERTEOLS, eolMode); } @@ -1596,8 +1596,8 @@ void Notepad_plus::command(int id) case IDM_SEARCH_GOTOMATCHINGBRACE : case IDM_SEARCH_SELECTMATCHINGBRACES : { - INT_PTR braceAtCaret = -1; - INT_PTR braceOpposite = -1; + intptr_t braceAtCaret = -1; + intptr_t braceOpposite = -1; findMatchingBracePos(braceAtCaret, braceOpposite); if (braceOpposite != -1) @@ -1720,9 +1720,9 @@ void Notepad_plus::command(int id) // zero-length selection (simple single caret) or selected text is all on single line // depart from Scintilla behavior and do it our way size_t currentIndent = _pEditView->execute(SCI_GETLINEINDENTATION, lineNumber); - INT_PTR indentDelta = _pEditView->execute(SCI_GETTABWIDTH); + intptr_t indentDelta = _pEditView->execute(SCI_GETTABWIDTH); if (!forwards) indentDelta = -indentDelta; - _pEditView->setLineIndent(lineNumber, static_cast(currentIndent) + indentDelta); + _pEditView->setLineIndent(lineNumber, static_cast(currentIndent) + indentDelta); } } break; @@ -2386,8 +2386,8 @@ void Notepad_plus::command(int id) _syncInfo._isSynScollV = isSynScollV; if (_syncInfo._isSynScollV) { - INT_PTR mainCurrentLine = _mainEditView.execute(SCI_GETFIRSTVISIBLELINE); - INT_PTR subCurrentLine = _subEditView.execute(SCI_GETFIRSTVISIBLELINE); + intptr_t mainCurrentLine = _mainEditView.execute(SCI_GETFIRSTVISIBLELINE); + intptr_t subCurrentLine = _subEditView.execute(SCI_GETFIRSTVISIBLELINE); _syncInfo._line = mainCurrentLine - subCurrentLine; } @@ -2403,13 +2403,13 @@ void Notepad_plus::command(int id) _syncInfo._isSynScollH = isSynScollH; if (_syncInfo._isSynScollH) { - INT_PTR mxoffset = _mainEditView.execute(SCI_GETXOFFSET); - INT_PTR pixel = _mainEditView.execute(SCI_TEXTWIDTH, STYLE_DEFAULT, reinterpret_cast("P")); - INT_PTR mainColumn = mxoffset/pixel; + intptr_t mxoffset = _mainEditView.execute(SCI_GETXOFFSET); + intptr_t pixel = _mainEditView.execute(SCI_TEXTWIDTH, STYLE_DEFAULT, reinterpret_cast("P")); + intptr_t mainColumn = mxoffset/pixel; - INT_PTR sxoffset = _subEditView.execute(SCI_GETXOFFSET); + intptr_t sxoffset = _subEditView.execute(SCI_GETXOFFSET); pixel = _subEditView.execute(SCI_TEXTWIDTH, STYLE_DEFAULT, reinterpret_cast("P")); - INT_PTR subColumn = sxoffset/pixel; + intptr_t subColumn = sxoffset/pixel; _syncInfo._column = mainColumn - subColumn; } } @@ -3085,10 +3085,10 @@ void Notepad_plus::command(int id) size_t selectionStart = _pEditView->execute(SCI_GETSELECTIONSTART); size_t selectionEnd = _pEditView->execute(SCI_GETSELECTIONEND); - INT_PTR strLen = selectionEnd - selectionStart; + intptr_t strLen = selectionEnd - selectionStart; if (strLen) { - INT_PTR strSize = strLen + 1; + intptr_t strSize = strLen + 1; char *selectedStr = new char[strSize]; _pEditView->execute(SCI_GETSELTEXT, 0, reinterpret_cast(selectedStr)); @@ -3128,10 +3128,10 @@ void Notepad_plus::command(int id) size_t selectionStart = _pEditView->execute(SCI_GETSELECTIONSTART); size_t selectionEnd = _pEditView->execute(SCI_GETSELECTIONEND); - INT_PTR strLen = selectionEnd - selectionStart; + intptr_t strLen = selectionEnd - selectionStart; if (strLen) { - INT_PTR strSize = strLen + 1; + intptr_t strSize = strLen + 1; char *selectedStr = new char[strSize]; _pEditView->execute(SCI_GETSELTEXT, 0, reinterpret_cast(selectedStr)); diff --git a/PowerEditor/src/NppNotification.cpp b/PowerEditor/src/NppNotification.cpp index e309a4977..01a78d648 100644 --- a/PowerEditor/src/NppNotification.cpp +++ b/PowerEditor/src/NppNotification.cpp @@ -589,7 +589,7 @@ BOOL Notepad_plus::notify(SCNotification *notification) else if (notification->nmhdr.hwndFrom == _subEditView.getHSelf()) switchEditViewTo(SUB_VIEW); - INT_PTR lineClick = _pEditView->execute(SCI_LINEFROMPOSITION, notification->position); + intptr_t lineClick = _pEditView->execute(SCI_LINEFROMPOSITION, notification->position); if (notification->margin == ScintillaEditView::_SC_MARGE_FOLDER) { diff --git a/PowerEditor/src/Parameters.h b/PowerEditor/src/Parameters.h index 7df2f1ca6..e55ad3e60 100644 --- a/PowerEditor/src/Parameters.h +++ b/PowerEditor/src/Parameters.h @@ -156,24 +156,24 @@ struct Position struct MapPosition { - INT_PTR _firstVisibleDisplayLine = -1; + intptr_t _firstVisibleDisplayLine = -1; - INT_PTR _firstVisibleDocLine = -1; // map - INT_PTR _lastVisibleDocLine = -1; // map - INT_PTR _nbLine = -1; // map - INT_PTR _higherPos = -1; // map - INT_PTR _width = -1; - INT_PTR _height = -1; - INT_PTR _wrapIndentMode = -1; + intptr_t _firstVisibleDocLine = -1; // map + intptr_t _lastVisibleDocLine = -1; // map + intptr_t _nbLine = -1; // map + intptr_t _higherPos = -1; // map + intptr_t _width = -1; + intptr_t _height = -1; + intptr_t _wrapIndentMode = -1; - INT_PTR _KByteInDoc = _maxPeekLenInKB; + intptr_t _KByteInDoc = _maxPeekLenInKB; bool _isWrap = false; bool isValid() const { return (_firstVisibleDisplayLine != -1); }; bool canScroll() const { return (_KByteInDoc < _maxPeekLenInKB); }; // _nbCharInDoc < _maxPeekLen : Don't scroll the document for the performance issue private: - INT_PTR _maxPeekLenInKB = 512; // 512 KB + intptr_t _maxPeekLenInKB = 512; // 512 KB }; @@ -874,8 +874,8 @@ struct ScintillaViewParams bool _isEdgeBgMode = false; std::vector _edgeMultiColumnPos; - INT_PTR _zoom = 0; - INT_PTR _zoom2 = 0; + intptr_t _zoom = 0; + intptr_t _zoom2 = 0; bool _whiteSpaceShow = false; bool _eolShow = false; int _borderWidth = 2; diff --git a/PowerEditor/src/ScintillaComponent/AutoCompletion.cpp b/PowerEditor/src/ScintillaComponent/AutoCompletion.cpp index 00942ad25..85916626e 100644 --- a/PowerEditor/src/ScintillaComponent/AutoCompletion.cpp +++ b/PowerEditor/src/ScintillaComponent/AutoCompletion.cpp @@ -47,8 +47,8 @@ bool AutoCompletion::showApiComplete() return false; // calculate entered word's length - INT_PTR curPos = _pEditView->execute(SCI_GETCURRENTPOS); - INT_PTR startPos = _pEditView->execute(SCI_WORDSTARTPOSITION, curPos, true); + intptr_t curPos = _pEditView->execute(SCI_GETCURRENTPOS); + intptr_t startPos = _pEditView->execute(SCI_WORDSTARTPOSITION, curPos, true); if (curPos == startPos) return false; @@ -165,12 +165,12 @@ void AutoCompletion::getWordArray(vector & wordArray, TCHAR *beg int flags = SCFIND_WORDSTART | SCFIND_MATCHCASE | SCFIND_REGEXP | SCFIND_POSIX; _pEditView->execute(SCI_SETSEARCHFLAGS, flags); - INT_PTR posFind = _pEditView->searchInTarget(expr.c_str(), expr.length(), 0, docLength); + intptr_t posFind = _pEditView->searchInTarget(expr.c_str(), expr.length(), 0, docLength); while (posFind >= 0) { - INT_PTR wordStart = _pEditView->execute(SCI_GETTARGETSTART); - INT_PTR wordEnd = _pEditView->execute(SCI_GETTARGETEND); + intptr_t wordStart = _pEditView->execute(SCI_GETTARGETSTART); + intptr_t wordEnd = _pEditView->execute(SCI_GETTARGETEND); size_t foundTextLen = wordEnd - wordStart; if (foundTextLen < bufSize) @@ -346,9 +346,9 @@ bool AutoCompletion::showWordComplete(bool autoInsert) { // Get beginning of word and complete word - INT_PTR curPos = _pEditView->execute(SCI_GETCURRENTPOS); - INT_PTR startPos = _pEditView->execute(SCI_WORDSTARTPOSITION, curPos, true); - INT_PTR endPos = _pEditView->execute(SCI_WORDENDPOSITION, curPos, true); + intptr_t curPos = _pEditView->execute(SCI_GETCURRENTPOS); + intptr_t startPos = _pEditView->execute(SCI_WORDSTARTPOSITION, curPos, true); + intptr_t endPos = _pEditView->execute(SCI_WORDENDPOSITION, curPos, true); if (curPos == startPos) return false; @@ -379,7 +379,7 @@ bool AutoCompletion::showWordComplete(bool autoInsert) if (wordArray.size() == 1 && autoInsert) { - INT_PTR replacedLength = _pEditView->replaceTarget(wordArray[0].c_str(), startPos, curPos); + intptr_t replacedLength = _pEditView->replaceTarget(wordArray[0].c_str(), startPos, curPos); _pEditView->execute(SCI_GOTOPOS, startPos + replacedLength); return true; } @@ -442,17 +442,17 @@ void AutoCompletion::getCloseTag(char *closeTag, size_t closeTagSize, size_t car _pEditView->execute(SCI_SETSEARCHFLAGS, flags); TCHAR tag2find[] = TEXT("<[^\\s>]*"); - INT_PTR targetStart = _pEditView->searchInTarget(tag2find, lstrlen(tag2find), caretPos, 0); + intptr_t targetStart = _pEditView->searchInTarget(tag2find, lstrlen(tag2find), caretPos, 0); if (targetStart < 0) return; - INT_PTR targetEnd = _pEditView->execute(SCI_GETTARGETEND); - INT_PTR foundTextLen = targetEnd - targetStart; + intptr_t targetEnd = _pEditView->execute(SCI_GETTARGETEND); + intptr_t foundTextLen = targetEnd - targetStart; if (foundTextLen < 2) // "<>" will be ignored return; - if (foundTextLen > static_cast(closeTagSize) - 2) // buffer size is not large enough. -2 for '/' & '\0' + if (foundTextLen > static_cast(closeTagSize) - 2) // buffer size is not large enough. -2 for '/' & '\0' return; char tagHead[tagMaxLen]; @@ -527,7 +527,7 @@ void InsertedMatchedChars::add(MatchedCharInserted mci) // if current pos > matchedStartSybol Pos and current pos is on the same line of matchedStartSybolPos, it'll be checked then removed // otherwise it is just removed // return the pos of matchedEndSybol or -1 if matchedEndSybol not found -INT_PTR InsertedMatchedChars::search(char startChar, char endChar, size_t posToDetect) +intptr_t InsertedMatchedChars::search(char startChar, char endChar, size_t posToDetect) { if (isEmpty()) return -1; @@ -653,7 +653,7 @@ void AutoCompletion::insertMatchedChars(int character, const MatchedPairConf & m { if (!_insertedMatchedChars.isEmpty()) { - INT_PTR pos = _insertedMatchedChars.search('"', static_cast(character), caretPos); + intptr_t pos = _insertedMatchedChars.search('"', static_cast(character), caretPos); if (pos != -1) { _pEditView->execute(SCI_DELETERANGE, pos, 1); @@ -677,7 +677,7 @@ void AutoCompletion::insertMatchedChars(int character, const MatchedPairConf & m { if (!_insertedMatchedChars.isEmpty()) { - INT_PTR pos = _insertedMatchedChars.search('\'', static_cast(character), caretPos); + intptr_t pos = _insertedMatchedChars.search('\'', static_cast(character), caretPos); if (pos != -1) { _pEditView->execute(SCI_DELETERANGE, pos, 1); @@ -733,7 +733,7 @@ void AutoCompletion::insertMatchedChars(int character, const MatchedPairConf & m startChar = '{'; } - INT_PTR pos = _insertedMatchedChars.search(startChar, static_cast(character), caretPos); + intptr_t pos = _insertedMatchedChars.search(startChar, static_cast(character), caretPos); if (pos != -1) { _pEditView->execute(SCI_DELETERANGE, pos, 1); diff --git a/PowerEditor/src/ScintillaComponent/AutoCompletion.h b/PowerEditor/src/ScintillaComponent/AutoCompletion.h index d3295cd00..c5103b54a 100644 --- a/PowerEditor/src/ScintillaComponent/AutoCompletion.h +++ b/PowerEditor/src/ScintillaComponent/AutoCompletion.h @@ -37,7 +37,7 @@ public: void removeInvalidElements(MatchedCharInserted mci); void add(MatchedCharInserted mci); bool isEmpty() const { return _insertedMatchedChars.size() == 0; }; - INT_PTR search(char startChar, char endChar, size_t posToDetect); + intptr_t search(char startChar, char endChar, size_t posToDetect); private: std::vector _insertedMatchedChars; diff --git a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp index 8273e892b..660ce3060 100644 --- a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp @@ -703,7 +703,7 @@ void FindInFinderDlg::writeOptions() _options._dotMatchesNewline = isCheckedOrNot(IDREDOTMATCHNL_FIFOLDER); } -INT_PTR CALLBACK FindInFinderDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM /*lParam*/) +intptr_t CALLBACK FindInFinderDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM /*lParam*/) { switch (message) { @@ -880,7 +880,7 @@ void FindReplaceDlg::resizeDialogElements(LONG newWidth) std::mutex findOps_mutex; -INT_PTR CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -1115,7 +1115,7 @@ INT_PTR CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM if (LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE) { Sci_CharacterRange cr = (*_ppEditView)->getSelection(); - INT_PTR nbSelected = cr.cpMax - cr.cpMin; + intptr_t nbSelected = cr.cpMax - cr.cpMin; _options._isInSelection = isCheckedOrNot(IDC_IN_SELECTION_CHECK)?1:0; int checkVal = _options._isInSelection?BST_CHECKED:BST_UNCHECKED; @@ -1894,13 +1894,13 @@ bool FindReplaceDlg::processFindNext(const TCHAR *txt2find, const FindOption *op stringSizeFind = Searching::convertExtendedToString(txt2find, pText, stringSizeFind); } - INT_PTR docLength = (*_ppEditView)->execute(SCI_GETLENGTH); + intptr_t docLength = (*_ppEditView)->execute(SCI_GETLENGTH); Sci_CharacterRange cr = (*_ppEditView)->getSelection(); //The search "zone" is relative to the selection, so search happens 'outside' - INT_PTR startPosition = cr.cpMax; - INT_PTR endPosition = docLength; + intptr_t startPosition = cr.cpMax; + intptr_t endPosition = docLength; if (pOptions->_whichDirection == DIR_UP) @@ -1953,8 +1953,8 @@ bool FindReplaceDlg::processFindNext(const TCHAR *txt2find, const FindOption *op break; } - INT_PTR start, end; - INT_PTR posFind; + intptr_t start, end; + intptr_t posFind; // Never allow a zero length match in the middle of a line end marker if ((*_ppEditView)->execute(SCI_GETCHARAT, startPosition - 1) == '\r' @@ -2097,8 +2097,8 @@ bool FindReplaceDlg::processReplace(const TCHAR *txt2find, const TCHAR *txt2repl { bool isRegExp = replaceOptions._searchType == FindRegex; - INT_PTR start = currentSelection.cpMin; - INT_PTR replacedLen = 0; + intptr_t start = currentSelection.cpMin; + intptr_t replacedLen = 0; if (isRegExp) { replacedLen = (*_ppEditView)->replaceTargetRegExMode(txt2replace); @@ -2368,8 +2368,8 @@ int FindReplaceDlg::processRange(ProcessOperation op, FindReplaceInfo & findRepl } } - INT_PTR targetStart = 0; - INT_PTR targetEnd = 0; + intptr_t targetStart = 0; + intptr_t targetEnd = 0; //Initial range for searching pEditView->execute(SCI_SETSEARCHFLAGS, flags); @@ -2393,8 +2393,8 @@ int FindReplaceDlg::processRange(ProcessOperation op, FindReplaceInfo & findRepl break; } - INT_PTR foundTextLen = targetEnd - targetStart; - INT_PTR replaceDelta = 0; + intptr_t foundTextLen = targetEnd - targetStart; + intptr_t replaceDelta = 0; bool processed = true; switch (op) @@ -2412,9 +2412,9 @@ int FindReplaceDlg::processRange(ProcessOperation op, FindReplaceInfo & findRepl } auto lineNumber = pEditView->execute(SCI_LINEFROMPOSITION, targetStart); - INT_PTR lend = pEditView->execute(SCI_GETLINEENDPOSITION, lineNumber); - INT_PTR lstart = pEditView->execute(SCI_POSITIONFROMLINE, lineNumber); - INT_PTR nbChar = lend - lstart; + intptr_t lend = pEditView->execute(SCI_GETLINEENDPOSITION, lineNumber); + intptr_t lstart = pEditView->execute(SCI_POSITIONFROMLINE, lineNumber); + intptr_t nbChar = lend - lstart; // use the static buffer TCHAR lineBuf[SC_SEARCHRESULT_LINEBUFFERMAXLENGTH]; @@ -2422,8 +2422,8 @@ int FindReplaceDlg::processRange(ProcessOperation op, FindReplaceInfo & findRepl if (nbChar > SC_SEARCHRESULT_LINEBUFFERMAXLENGTH - 3) lend = lstart + SC_SEARCHRESULT_LINEBUFFERMAXLENGTH - 4; - INT_PTR start_mark = targetStart - lstart; - INT_PTR end_mark = targetEnd - lstart; + intptr_t start_mark = targetStart - lstart; + intptr_t end_mark = targetEnd - lstart; pEditView->getGenericText(lineBuf, SC_SEARCHRESULT_LINEBUFFERMAXLENGTH, lstart, lend, &start_mark, &end_mark); @@ -2445,9 +2445,9 @@ int FindReplaceDlg::processRange(ProcessOperation op, FindReplaceInfo & findRepl const TCHAR *pFileName = pFindersInfo->_pFileName ? pFindersInfo->_pFileName : TEXT(""); auto lineNumber = pEditView->execute(SCI_LINEFROMPOSITION, targetStart); - INT_PTR lend = pEditView->execute(SCI_GETLINEENDPOSITION, lineNumber); - INT_PTR lstart = pEditView->execute(SCI_POSITIONFROMLINE, lineNumber); - INT_PTR nbChar = lend - lstart; + intptr_t lend = pEditView->execute(SCI_GETLINEENDPOSITION, lineNumber); + intptr_t lstart = pEditView->execute(SCI_POSITIONFROMLINE, lineNumber); + intptr_t nbChar = lend - lstart; // use the static buffer TCHAR lineBuf[SC_SEARCHRESULT_LINEBUFFERMAXLENGTH]; @@ -2455,8 +2455,8 @@ int FindReplaceDlg::processRange(ProcessOperation op, FindReplaceInfo & findRepl if (nbChar > SC_SEARCHRESULT_LINEBUFFERMAXLENGTH - 3) lend = lstart + SC_SEARCHRESULT_LINEBUFFERMAXLENGTH - 4; - INT_PTR start_mark = targetStart - lstart; - INT_PTR end_mark = targetEnd - lstart; + intptr_t start_mark = targetStart - lstart; + intptr_t end_mark = targetEnd - lstart; pEditView->getGenericText(lineBuf, SC_SEARCHRESULT_LINEBUFFERMAXLENGTH, lstart, lend, &start_mark, &end_mark); @@ -2480,7 +2480,7 @@ int FindReplaceDlg::processRange(ProcessOperation op, FindReplaceInfo & findRepl case ProcessReplaceAll: { - INT_PTR replacedLength; + intptr_t replacedLength; if (isRegExp) replacedLength = pEditView->replaceTargetRegExMode(pTextReplace); else @@ -3433,8 +3433,8 @@ void FindReplaceDlg::clearMarks(const FindOption& opt) { Sci_CharacterRange cr = (*_ppEditView)->getSelection(); - INT_PTR startPosition = cr.cpMin; - INT_PTR endPosition = cr.cpMax; + intptr_t startPosition = cr.cpMin; + intptr_t endPosition = cr.cpMax; (*_ppEditView)->execute(SCI_SETINDICATORCURRENT, SCE_UNIVERSAL_FOUND_STYLE); (*_ppEditView)->execute(SCI_INDICATORCLEARRANGE, startPosition, endPosition - startPosition); @@ -4328,7 +4328,7 @@ void Finder::setFinderStyle() _scintView.setMakerStyle(svp._folderStyle == FOLDER_STYLE_NONE ? FOLDER_STYLE_BOX : svp._folderStyle); } -INT_PTR CALLBACK Finder::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK Finder::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -4540,7 +4540,7 @@ void FindIncrementDlg::display(bool toShow) const _pRebar->setIDVisible(_rbBand.wID, toShow); } -INT_PTR CALLBACK FindIncrementDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK FindIncrementDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { diff --git a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.h b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.h index a96b57bb9..1e8c44a5f 100644 --- a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.h +++ b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.h @@ -39,10 +39,10 @@ enum DIALOG_TYPE {FIND_DLG, REPLACE_DLG, FINDINFILES_DLG, FINDINPROJECTS_DLG, MA enum InWhat{ALL_OPEN_DOCS, FILES_IN_DIR, CURRENT_DOC, CURR_DOC_SELECTION, FILES_IN_PROJECTS}; struct FoundInfo { - FoundInfo(INT_PTR start, INT_PTR end, size_t lineNumber, const TCHAR *fullPath) + FoundInfo(intptr_t start, intptr_t end, size_t lineNumber, const TCHAR *fullPath) : _start(start), _end(end), _lineNumber(lineNumber), _fullPath(fullPath) {}; - INT_PTR _start; - INT_PTR _end; + intptr_t _start; + intptr_t _end; size_t _lineNumber; generic_string _fullPath; }; @@ -138,7 +138,7 @@ public: generic_string getHitsString(int count) const; protected : - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); bool notify(SCNotification *notification); private: @@ -157,8 +157,8 @@ private: ScintillaEditView _scintView; unsigned int _nbFoundFiles = 0; - INT_PTR _lastFileHeaderPos = 0; - INT_PTR _lastSearchHeaderPos = 0; + intptr_t _lastFileHeaderPos = 0; + intptr_t _lastSearchHeaderPos = 0; bool _canBeVolatiled = true; bool _longLinesAreWrapped = false; @@ -190,8 +190,8 @@ struct FindReplaceInfo { const TCHAR *_txt2find = nullptr; const TCHAR *_txt2replace = nullptr; - INT_PTR _startRange = -1; - INT_PTR _endRange = -1; + intptr_t _startRange = -1; + intptr_t _endRange = -1; }; struct FindersInfo @@ -216,7 +216,7 @@ private: Finder *_pFinder2Search = nullptr; FindOption _options; - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); void initFromOptions(); void writeOptions(); }; @@ -350,7 +350,7 @@ public : protected : void resizeDialogElements(LONG newWidth); - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); static LONG_PTR originalFinderProc; static LONG_PTR originalComboEditProc; @@ -473,7 +473,7 @@ private : ReBar* _pRebar = nullptr; REBARBANDINFO _rbBand; - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); void markSelectedTextInc(bool enable, FindOption *opt = NULL); }; diff --git a/PowerEditor/src/ScintillaComponent/FunctionCallTip.cpp b/PowerEditor/src/ScintillaComponent/FunctionCallTip.cpp index 42daa681d..0ec91deea 100644 --- a/PowerEditor/src/ScintillaComponent/FunctionCallTip.cpp +++ b/PowerEditor/src/ScintillaComponent/FunctionCallTip.cpp @@ -130,11 +130,11 @@ void FunctionCallTip::close() bool FunctionCallTip::getCursorFunction() { auto line = _pEditView->execute(SCI_LINEFROMPOSITION, _curPos); - INT_PTR startpos = _pEditView->execute(SCI_POSITIONFROMLINE, line); - INT_PTR endpos = _pEditView->execute(SCI_GETLINEENDPOSITION, line); - INT_PTR len = endpos - startpos + 3; //also take CRLF in account, even if not there - INT_PTR offset = _curPos - startpos; //offset is cursor location, only stuff before cursor has influence - const INT_PTR maxLen = 256; + intptr_t startpos = _pEditView->execute(SCI_POSITIONFROMLINE, line); + intptr_t endpos = _pEditView->execute(SCI_GETLINEENDPOSITION, line); + intptr_t len = endpos - startpos + 3; //also take CRLF in account, even if not there + intptr_t offset = _curPos - startpos; //offset is cursor location, only stuff before cursor has influence + const intptr_t maxLen = 256; if ((offset < 2) || (len >= maxLen)) { diff --git a/PowerEditor/src/ScintillaComponent/FunctionCallTip.h b/PowerEditor/src/ScintillaComponent/FunctionCallTip.h index 7b18c1a48..206fe51af 100644 --- a/PowerEditor/src/ScintillaComponent/FunctionCallTip.h +++ b/PowerEditor/src/ScintillaComponent/FunctionCallTip.h @@ -36,8 +36,8 @@ private: ScintillaEditView * _pEditView = nullptr; //Scintilla to display calltip in TiXmlElement * _pXmlKeyword = nullptr; //current keyword node (first one) - INT_PTR _curPos = 0; //cursor position - INT_PTR _startPos = 0; //display start position + intptr_t _curPos = 0; //cursor position + intptr_t _startPos = 0; //display start position TiXmlElement * _curFunction = nullptr; //current function element //cache some XML values n stuff diff --git a/PowerEditor/src/ScintillaComponent/GoToLineDlg.cpp b/PowerEditor/src/ScintillaComponent/GoToLineDlg.cpp index 324304cd8..dd6e20edc 100644 --- a/PowerEditor/src/ScintillaComponent/GoToLineDlg.cpp +++ b/PowerEditor/src/ScintillaComponent/GoToLineDlg.cpp @@ -18,7 +18,7 @@ #include "GoToLineDlg.h" -INT_PTR CALLBACK GoToLineDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +intptr_t CALLBACK GoToLineDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { switch (message) { diff --git a/PowerEditor/src/ScintillaComponent/GoToLineDlg.h b/PowerEditor/src/ScintillaComponent/GoToLineDlg.h index cab358cd1..dbe81558b 100644 --- a/PowerEditor/src/ScintillaComponent/GoToLineDlg.h +++ b/PowerEditor/src/ScintillaComponent/GoToLineDlg.h @@ -50,7 +50,7 @@ public : protected : enum mode {go2line, go2offsset}; mode _mode = go2line; - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private : ScintillaEditView **_ppEditView = nullptr; diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp index e8d111711..49b68ce73 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp @@ -386,8 +386,8 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa if (wParam == IMR_RECONVERTSTRING) { - INT_PTR textLength; - INT_PTR selectSize; + intptr_t textLength; + intptr_t selectSize; char smallTextBuffer[128]; char * selectedStr = smallTextBuffer; RECONVERTSTRING * reconvert = (RECONVERTSTRING *)lParam; @@ -1805,7 +1805,7 @@ void ScintillaEditView::restoreCurrentPosPreStep() execute(SCI_SETXOFFSET, pos._xOffset); } execute(SCI_CHOOSECARETX); // choose current x position - INT_PTR lineToShow = execute(SCI_VISIBLEFROMDOCLINE, pos._firstVisibleLine); + intptr_t lineToShow = execute(SCI_VISIBLEFROMDOCLINE, pos._firstVisibleLine); execute(SCI_SETFIRSTVISIBLELINE, lineToShow); if (isWrap()) { @@ -1848,7 +1848,7 @@ void ScintillaEditView::restoreCurrentPosPostStep() { // Scintilla has paint the buffer but the position is not correct. - INT_PTR lineToShow = execute(SCI_VISIBLEFROMDOCLINE, pos._firstVisibleLine); + intptr_t lineToShow = execute(SCI_VISIBLEFROMDOCLINE, pos._firstVisibleLine); execute(SCI_SETFIRSTVISIBLELINE, lineToShow); } else if (pos._offset > 0) @@ -2028,9 +2028,9 @@ namespace { struct FoldLevelStack { int levelCount = 0; // 1-based level number - INT_PTR levelStack[MAX_FOLD_COLLAPSE_LEVEL]{}; + intptr_t levelStack[MAX_FOLD_COLLAPSE_LEVEL]{}; - void push(INT_PTR level) + void push(intptr_t level) { while (levelCount != 0 && level <= levelStack[levelCount - 1]) { @@ -2049,12 +2049,12 @@ void ScintillaEditView::collapseFoldIndentationBased(int level2Collapse, bool mo FoldLevelStack levelStack; ++level2Collapse; // 1-based level number - const INT_PTR maxLine = execute(SCI_GETLINECOUNT); - INT_PTR line = 0; + const intptr_t maxLine = execute(SCI_GETLINECOUNT); + intptr_t line = 0; while (line < maxLine) { - INT_PTR level = execute(SCI_GETFOLDLEVEL, line); + intptr_t level = execute(SCI_GETFOLDLEVEL, line); if (level & SC_FOLDLEVELHEADERFLAG) { level &= SC_FOLDLEVELNUMBERMASK; @@ -2086,11 +2086,11 @@ void ScintillaEditView::collapse(int level2Collapse, bool mode) execute(SCI_COLOURISE, 0, -1); - INT_PTR maxLine = execute(SCI_GETLINECOUNT); + intptr_t maxLine = execute(SCI_GETLINECOUNT); for (int line = 0; line < maxLine; ++line) { - INT_PTR level = execute(SCI_GETFOLDLEVEL, line); + intptr_t level = execute(SCI_GETFOLDLEVEL, line); if (level & SC_FOLDLEVELHEADERFLAG) { level -= SC_FOLDLEVELBASE; @@ -2119,7 +2119,7 @@ void ScintillaEditView::fold(size_t line, bool mode) if (endStyled < len) execute(SCI_COLOURISE, 0, -1); - INT_PTR headerLine; + intptr_t headerLine; auto level = execute(SCI_GETFOLDLEVEL, line); if (level & SC_FOLDLEVELHEADERFLAG) @@ -2193,7 +2193,7 @@ void ScintillaEditView::getGenericText(TCHAR *dest, size_t destlen, size_t start // "mstart" and "mend" are pointers to indexes in the read string, // which are converted to the corresponding indexes in the returned TCHAR string. -void ScintillaEditView::getGenericText(TCHAR *dest, size_t destlen, size_t start, size_t end, INT_PTR* mstart, INT_PTR* mend) const +void ScintillaEditView::getGenericText(TCHAR *dest, size_t destlen, size_t start, size_t end, intptr_t* mstart, intptr_t* mend) const { WcharMbcsConvertor& wmc = WcharMbcsConvertor::getInstance(); char *destA = new char[end - start + 1]; @@ -2217,7 +2217,7 @@ void ScintillaEditView::replaceSelWith(const char * replaceText) execute(SCI_REPLACESEL, 0, reinterpret_cast(replaceText)); } -void ScintillaEditView::getVisibleStartAndEndPosition(INT_PTR* startPos, INT_PTR* endPos) +void ScintillaEditView::getVisibleStartAndEndPosition(intptr_t* startPos, intptr_t* endPos) { assert(startPos != NULL && endPos != NULL); // Get the position of the 1st and last showing chars from the edit view @@ -2302,7 +2302,7 @@ TCHAR * ScintillaEditView::getGenericSelectedText(TCHAR * txt, int size, bool ex return txt; } -INT_PTR ScintillaEditView::searchInTarget(const TCHAR * text2Find, size_t lenOfText2Find, size_t fromPos, size_t toPos) const +intptr_t ScintillaEditView::searchInTarget(const TCHAR * text2Find, size_t lenOfText2Find, size_t fromPos, size_t toPos) const { execute(SCI_SETTARGETRANGE, fromPos, toPos); @@ -2338,7 +2338,7 @@ void ScintillaEditView::addGenericText(const TCHAR * text2Append, long* mstart, execute(SCI_ADDTEXT, strlen(text2AppendA), reinterpret_cast(text2AppendA)); } -INT_PTR ScintillaEditView::replaceTarget(const TCHAR * str2replace, INT_PTR fromTargetPos, INT_PTR toTargetPos) const +intptr_t ScintillaEditView::replaceTarget(const TCHAR * str2replace, intptr_t fromTargetPos, intptr_t toTargetPos) const { if (fromTargetPos != -1 || toTargetPos != -1) { @@ -2350,7 +2350,7 @@ INT_PTR ScintillaEditView::replaceTarget(const TCHAR * str2replace, INT_PTR from return execute(SCI_REPLACETARGET, static_cast(-1), reinterpret_cast(str2replaceA)); } -INT_PTR ScintillaEditView::replaceTargetRegExMode(const TCHAR * re, INT_PTR fromTargetPos, INT_PTR toTargetPos) const +intptr_t ScintillaEditView::replaceTargetRegExMode(const TCHAR * re, intptr_t fromTargetPos, intptr_t toTargetPos) const { if (fromTargetPos != -1 || toTargetPos != -1) { @@ -2445,7 +2445,7 @@ void ScintillaEditView::showMargin(int whichMarge, bool willBeShowed) void ScintillaEditView::updateBeginEndSelectPosition(bool is_insert, size_t position, size_t length) { - if (_beginSelectPosition != -1 && static_cast(position) < _beginSelectPosition - 1) + if (_beginSelectPosition != -1 && static_cast(position) < _beginSelectPosition - 1) { if (is_insert) _beginSelectPosition += length; @@ -2459,7 +2459,7 @@ void ScintillaEditView::updateBeginEndSelectPosition(bool is_insert, size_t posi void ScintillaEditView::marginClick(Sci_Position position, int modifiers) { size_t lineClick = execute(SCI_LINEFROMPOSITION, position, 0); - INT_PTR levelClick = execute(SCI_GETFOLDLEVEL, lineClick, 0); + intptr_t levelClick = execute(SCI_GETFOLDLEVEL, lineClick, 0); if (levelClick & SC_FOLDLEVELHEADERFLAG) { if (modifiers & SCMOD_SHIFT) @@ -2493,7 +2493,7 @@ void ScintillaEditView::marginClick(Sci_Position position, int modifiers) } } -void ScintillaEditView::expand(size_t& line, bool doExpand, bool force, INT_PTR visLevels, INT_PTR level) +void ScintillaEditView::expand(size_t& line, bool doExpand, bool force, intptr_t visLevels, intptr_t level) { size_t lineMaxSubord = execute(SCI_GETLASTCHILD, line, level & SC_FOLDLEVELNUMBERMASK); ++line; @@ -2509,7 +2509,7 @@ void ScintillaEditView::expand(size_t& line, bool doExpand, bool force, INT_PTR execute(SCI_SHOWLINES, line, line); } - INT_PTR levelLine = level; + intptr_t levelLine = level; if (levelLine == -1) levelLine = execute(SCI_GETFOLDLEVEL, line, 0); @@ -2738,8 +2738,8 @@ void ScintillaEditView::setMultiSelections(const ColumnModeInfos & cmi) { if (cmi[i].isValid()) { - INT_PTR selStart = cmi[i]._direction == L2R?cmi[i]._selLpos:cmi[i]._selRpos; - INT_PTR selEnd = cmi[i]._direction == L2R?cmi[i]._selRpos:cmi[i]._selLpos; + intptr_t selStart = cmi[i]._direction == L2R?cmi[i]._selLpos:cmi[i]._selRpos; + intptr_t selEnd = cmi[i]._direction == L2R?cmi[i]._selRpos:cmi[i]._selLpos; execute(SCI_SETSELECTIONNSTART, i, selStart); execute(SCI_SETSELECTIONNEND, i, selEnd); } @@ -2753,7 +2753,7 @@ void ScintillaEditView::setMultiSelections(const ColumnModeInfos & cmi) // Get selection range (fromLine, toLine) for the specified selection // specify selectionNumber = -1 for the MAIN selection -pair ScintillaEditView::getSelectionLinesRange(INT_PTR selectionNumber /* = -1 */) const +pair ScintillaEditView::getSelectionLinesRange(intptr_t selectionNumber /* = -1 */) const { size_t numSelections = execute(SCI_GETSELECTIONS); @@ -2933,12 +2933,12 @@ void ScintillaEditView::convertSelectedTextTo(const TextCase & caseToConvert) for (size_t i = 0, cmiLen = cmi.size(); i < cmiLen ; ++i) { - const INT_PTR len = cmi[i]._selRpos - cmi[i]._selLpos; + const intptr_t len = cmi[i]._selRpos - cmi[i]._selLpos; char *srcStr = new char[len+1]; wchar_t *destStr = new wchar_t[len+1]; - INT_PTR start = cmi[i]._selLpos; - INT_PTR end = cmi[i]._selRpos; + intptr_t start = cmi[i]._selLpos; + intptr_t end = cmi[i]._selRpos; getText(srcStr, start, end); int nbChar = ::MultiByteToWideChar(codepage, 0, srcStr, (int)len, destStr, (int)len); @@ -3073,14 +3073,14 @@ ColumnModeInfos ScintillaEditView::getColumnModeSelectInfo() ColumnModeInfos columnModeInfos; if (execute(SCI_GETSELECTIONS) > 1) // Multi-Selection || Column mode { - INT_PTR nbSel = execute(SCI_GETSELECTIONS); + intptr_t nbSel = execute(SCI_GETSELECTIONS); for (int i = 0 ; i < nbSel ; ++i) { - INT_PTR absPosSelStartPerLine = execute(SCI_GETSELECTIONNANCHOR, i); - INT_PTR absPosSelEndPerLine = execute(SCI_GETSELECTIONNCARET, i); - INT_PTR nbVirtualAnchorSpc = execute(SCI_GETSELECTIONNANCHORVIRTUALSPACE, i); - INT_PTR nbVirtualCaretSpc = execute(SCI_GETSELECTIONNCARETVIRTUALSPACE, i); + intptr_t absPosSelStartPerLine = execute(SCI_GETSELECTIONNANCHOR, i); + intptr_t absPosSelEndPerLine = execute(SCI_GETSELECTIONNCARET, i); + intptr_t nbVirtualAnchorSpc = execute(SCI_GETSELECTIONNANCHORVIRTUALSPACE, i); + intptr_t nbVirtualCaretSpc = execute(SCI_GETSELECTIONNCARETVIRTUALSPACE, i); if (absPosSelStartPerLine == absPosSelEndPerLine && execute(SCI_SELECTIONISRECTANGLE)) { @@ -3098,13 +3098,13 @@ ColumnModeInfos ScintillaEditView::getColumnModeSelectInfo() void ScintillaEditView::columnReplace(ColumnModeInfos & cmi, const TCHAR *str) { - INT_PTR totalDiff = 0; + intptr_t totalDiff = 0; for (size_t i = 0, len = cmi.size(); i < len ; ++i) { if (cmi[i].isValid()) { - INT_PTR len2beReplace = cmi[i]._selRpos - cmi[i]._selLpos; - INT_PTR diff = lstrlen(str) - len2beReplace; + intptr_t len2beReplace = cmi[i]._selRpos - cmi[i]._selLpos; + intptr_t diff = lstrlen(str) - len2beReplace; cmi[i]._selLpos += totalDiff; cmi[i]._selRpos += totalDiff; @@ -3112,7 +3112,7 @@ void ScintillaEditView::columnReplace(ColumnModeInfos & cmi, const TCHAR *str) if (hasVirtualSpc) // if virtual space is present, then insert space { - for (INT_PTR j = 0, k = cmi[i]._selLpos; j < cmi[i]._nbVirtualCaretSpc ; ++j, ++k) + for (intptr_t j = 0, k = cmi[i]._selLpos; j < cmi[i]._nbVirtualCaretSpc ; ++j, ++k) { execute(SCI_INSERTTEXT, k, reinterpret_cast(" ")); } @@ -3203,14 +3203,14 @@ void ScintillaEditView::columnReplace(ColumnModeInfos & cmi, int initial, int in const int kibInit = getNbDigits(initial, base); const int kib = std::max(kibInit, kibEnd); - INT_PTR totalDiff = 0; + intptr_t totalDiff = 0; const size_t len = cmi.size(); for (size_t i = 0 ; i < len ; i++) { if (cmi[i].isValid()) { - const INT_PTR len2beReplaced = cmi[i]._selRpos - cmi[i]._selLpos; - const INT_PTR diff = kib - len2beReplaced; + const intptr_t len2beReplaced = cmi[i]._selRpos - cmi[i]._selLpos; + const intptr_t diff = kib - len2beReplaced; cmi[i]._selLpos += totalDiff; cmi[i]._selRpos += totalDiff; @@ -3220,7 +3220,7 @@ void ScintillaEditView::columnReplace(ColumnModeInfos & cmi, int initial, int in const bool hasVirtualSpc = cmi[i]._nbVirtualAnchorSpc > 0; if (hasVirtualSpc) // if virtual space is present, then insert space { - for (INT_PTR j = 0, k = cmi[i]._selLpos; j < cmi[i]._nbVirtualCaretSpc ; ++j, ++k) + for (intptr_t j = 0, k = cmi[i]._selLpos; j < cmi[i]._nbVirtualCaretSpc ; ++j, ++k) { execute(SCI_INSERTTEXT, k, reinterpret_cast(" ")); } @@ -3276,7 +3276,7 @@ void ScintillaEditView::foldChanged(size_t line, int levelNow, int levelPrev) ((levelPrev & SC_FOLDLEVELNUMBERMASK) > (levelNow & SC_FOLDLEVELNUMBERMASK))) { // See if should still be hidden - INT_PTR parentLine = execute(SCI_GETFOLDPARENT, line); + intptr_t parentLine = execute(SCI_GETFOLDPARENT, line); if ((parentLine < 0) || !isFolded(parentLine && execute(SCI_GETLINEVISIBLE, parentLine))) execute(SCI_SHOWLINES, line, line); } @@ -3683,7 +3683,7 @@ void ScintillaEditView::changeTextDirection(bool isRTL) generic_string ScintillaEditView::getEOLString() { - INT_PTR eol_mode = execute(SCI_GETEOLMODE); + intptr_t eol_mode = execute(SCI_GETEOLMODE); if (eol_mode == SC_EOL_CRLF) { return TEXT("\r\n"); @@ -3750,7 +3750,7 @@ int ScintillaEditView::getTextZoneWidth() const RECT editorRect; getClientRect(editorRect); - INT_PTR marginWidths = 0; + intptr_t marginWidths = 0; for (int m = 0; m < 4; ++m) { marginWidths += execute(SCI_GETMARGINWIDTHN, m); @@ -3790,7 +3790,7 @@ pair ScintillaEditView::getSelectedCharsAndLinesCount(long long v.push_back(getSelectionLinesRange(s)); } sort(v.begin(), v.end()); - INT_PTR previousSecondLine = -1; + intptr_t previousSecondLine = -1; for (auto lineRange : v) { selectedCharsAndLines.second += lineRange.second - lineRange.first; @@ -3798,7 +3798,7 @@ pair ScintillaEditView::getSelectedCharsAndLinesCount(long long { ++selectedCharsAndLines.second; } - previousSecondLine = static_cast(lineRange.second); + previousSecondLine = static_cast(lineRange.second); } } diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.h b/PowerEditor/src/ScintillaComponent/ScintillaEditView.h index 1e1c1a6f8..c6860fb10 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.h +++ b/PowerEditor/src/ScintillaComponent/ScintillaEditView.h @@ -134,14 +134,14 @@ const bool L2R = true; const bool R2L = false; struct ColumnModeInfo { - INT_PTR _selLpos = 0; - INT_PTR _selRpos = 0; - INT_PTR _order = -1; // 0 based index + intptr_t _selLpos = 0; + intptr_t _selRpos = 0; + intptr_t _order = -1; // 0 based index bool _direction = L2R; // L2R or R2L - INT_PTR _nbVirtualCaretSpc = 0; - INT_PTR _nbVirtualAnchorSpc = 0; + intptr_t _nbVirtualCaretSpc = 0; + intptr_t _nbVirtualAnchorSpc = 0; - ColumnModeInfo(INT_PTR lPos, INT_PTR rPos, INT_PTR order, bool dir = L2R, INT_PTR vAnchorNbSpc = 0, INT_PTR vCaretNbSpc = 0) + ColumnModeInfo(intptr_t lPos, intptr_t rPos, intptr_t order, bool dir = L2R, intptr_t vAnchorNbSpc = 0, intptr_t vCaretNbSpc = 0) : _selLpos(lPos), _selRpos(rPos), _order(order), _direction(dir), _nbVirtualAnchorSpc(vAnchorNbSpc), _nbVirtualCaretSpc(vCaretNbSpc){}; bool isValid() const { @@ -229,28 +229,28 @@ public: void getText(char *dest, size_t start, size_t end) const; void getGenericText(TCHAR *dest, size_t destlen, size_t start, size_t end) const; - void getGenericText(TCHAR *dest, size_t deslen, size_t start, size_t end, INT_PTR* mstart, INT_PTR* mend) const; + void getGenericText(TCHAR *dest, size_t deslen, size_t start, size_t end, intptr_t* mstart, intptr_t* mend) const; generic_string getGenericTextAsString(size_t start, size_t end) const; void insertGenericTextFrom(size_t position, const TCHAR *text2insert) const; void replaceSelWith(const char * replaceText); - INT_PTR getSelectedTextCount() { + intptr_t getSelectedTextCount() { Sci_CharacterRange range = getSelection(); return (range.cpMax - range.cpMin); }; - void getVisibleStartAndEndPosition(INT_PTR* startPos, INT_PTR* endPos); + void getVisibleStartAndEndPosition(intptr_t* startPos, intptr_t* endPos); char * getWordFromRange(char * txt, size_t size, size_t pos1, size_t pos2); char * getSelectedText(char * txt, size_t size, bool expand = true); char * getWordOnCaretPos(char * txt, size_t size); TCHAR * getGenericWordOnCaretPos(TCHAR * txt, int size); TCHAR * getGenericSelectedText(TCHAR * txt, int size, bool expand = true); - INT_PTR searchInTarget(const TCHAR * Text2Find, size_t lenOfText2Find, size_t fromPos, size_t toPos) const; + intptr_t searchInTarget(const TCHAR * Text2Find, size_t lenOfText2Find, size_t fromPos, size_t toPos) const; void appandGenericText(const TCHAR * text2Append) const; void addGenericText(const TCHAR * text2Append) const; void addGenericText(const TCHAR * text2Append, long* mstart, long* mend) const; - INT_PTR replaceTarget(const TCHAR * str2replace, INT_PTR fromTargetPos = -1, INT_PTR toTargetPos = -1) const; - INT_PTR replaceTargetRegExMode(const TCHAR * re, INT_PTR fromTargetPos = -1, INT_PTR toTargetPos = -1) const; + intptr_t replaceTarget(const TCHAR * str2replace, intptr_t fromTargetPos = -1, intptr_t toTargetPos = -1) const; + intptr_t replaceTargetRegExMode(const TCHAR * re, intptr_t fromTargetPos = -1, intptr_t toTargetPos = -1) const; void showAutoComletion(size_t lenEntered, const TCHAR * list); void showCallTip(size_t startPos, const TCHAR * def); generic_string getLine(size_t lineNumber); @@ -280,7 +280,7 @@ public: return crange; }; - void getWordToCurrentPos(TCHAR * str, INT_PTR strLen) const { + void getWordToCurrentPos(TCHAR * str, intptr_t strLen) const { auto caretPos = execute(SCI_GETCURRENTPOS); auto startPos = execute(SCI_WORDSTARTPOSITION, caretPos, true); @@ -391,16 +391,16 @@ public: execute(SCI_SETWRAPVISUALFLAGS, willBeShown?SC_WRAPVISUALFLAG_END:SC_WRAPVISUALFLAG_NONE); }; - INT_PTR getCurrentLineNumber()const { + intptr_t getCurrentLineNumber()const { return execute(SCI_LINEFROMPOSITION, execute(SCI_GETCURRENTPOS)); }; - INT_PTR lastZeroBasedLineNumber() const { + intptr_t lastZeroBasedLineNumber() const { auto endPos = execute(SCI_GETLENGTH); return execute(SCI_LINEFROMPOSITION, endPos); }; - INT_PTR getCurrentXOffset()const{ + intptr_t getCurrentXOffset()const{ return execute(SCI_GETXOFFSET); }; @@ -412,26 +412,26 @@ public: execute(SCI_LINESCROLL, column, line); }; - INT_PTR getCurrentPointX()const{ + intptr_t getCurrentPointX()const{ return execute(SCI_POINTXFROMPOSITION, 0, execute(SCI_GETCURRENTPOS)); }; - INT_PTR getCurrentPointY()const{ + intptr_t getCurrentPointY()const{ return execute(SCI_POINTYFROMPOSITION, 0, execute(SCI_GETCURRENTPOS)); }; - INT_PTR getTextHeight()const{ + intptr_t getTextHeight()const{ return execute(SCI_TEXTHEIGHT); }; int getTextZoneWidth() const; - void gotoLine(INT_PTR line){ + void gotoLine(intptr_t line){ if (line < execute(SCI_GETLINECOUNT)) execute(SCI_GOTOLINE,line); }; - INT_PTR getCurrentColumnNumber() const { + intptr_t getCurrentColumnNumber() const { return execute(SCI_GETCOLUMN, execute(SCI_GETCURRENTPOS)); }; @@ -439,11 +439,11 @@ public: size_t getUnicodeSelectedLength() const; - INT_PTR getLineLength(size_t line) const { + intptr_t getLineLength(size_t line) const { return execute(SCI_GETLINEENDPOSITION, line) - execute(SCI_POSITIONFROMLINE, line); }; - INT_PTR getLineIndent(size_t line) const { + intptr_t getLineIndent(size_t line) const { return execute(SCI_GETLINEINDENTATION, line); }; @@ -481,9 +481,9 @@ public: void performGlobalStyles(); - void expand(size_t& line, bool doExpand, bool force = false, INT_PTR visLevels = 0, INT_PTR level = -1); + void expand(size_t& line, bool doExpand, bool force = false, intptr_t visLevels = 0, intptr_t level = -1); - std::pair getSelectionLinesRange(INT_PTR selectionNumber = -1) const; + std::pair getSelectionLinesRange(intptr_t selectionNumber = -1) const; void currentLinesUp() const; void currentLinesDown() const; @@ -641,7 +641,7 @@ protected: typedef std::unordered_map BufferStyleMap; BufferStyleMap _hotspotStyles; - INT_PTR _beginSelectPosition = -1; + intptr_t _beginSelectPosition = -1; static std::string _defaultCharList; diff --git a/PowerEditor/src/ScintillaComponent/SmartHighlighter.cpp b/PowerEditor/src/ScintillaComponent/SmartHighlighter.cpp index 363acb201..159fedf07 100644 --- a/PowerEditor/src/ScintillaComponent/SmartHighlighter.cpp +++ b/PowerEditor/src/ScintillaComponent/SmartHighlighter.cpp @@ -38,9 +38,9 @@ void SmartHighlighter::highlightViewWithWord(ScintillaEditView * pHighlightView, auto nbLines = min(nbLineOnScreen, MAXLINEHIGHLIGHT) + 1; auto lastLine = firstLine + nbLines; size_t startPos = 0; - INT_PTR endPos = 0; + intptr_t endPos = 0; auto currentLine = firstLine; - INT_PTR prevDocLineChecked = -1; //invalid start + intptr_t prevDocLineChecked = -1; //invalid start // Determine mode for SmartHighlighting bool isWordOnly = true; @@ -71,10 +71,10 @@ void SmartHighlighter::highlightViewWithWord(ScintillaEditView * pHighlightView, for (; currentLine < lastLine; ++currentLine) { - INT_PTR docLine = pHighlightView->execute(SCI_DOCLINEFROMVISIBLE, currentLine); + intptr_t docLine = pHighlightView->execute(SCI_DOCLINEFROMVISIBLE, currentLine); if (docLine == prevDocLineChecked) continue; //still on same line (wordwrap) - prevDocLineChecked = static_cast(docLine); + prevDocLineChecked = static_cast(docLine); startPos = pHighlightView->execute(SCI_POSITIONFROMLINE, docLine); endPos = pHighlightView->execute(SCI_POSITIONFROMLINE, docLine + 1); @@ -116,7 +116,7 @@ void SmartHighlighter::highlightView(ScintillaEditView * pHighlightView, Scintil auto curPos = pHighlightView->execute(SCI_GETCURRENTPOS); auto range = pHighlightView->getSelection(); - INT_PTR textlen = range.cpMax - range.cpMin; + intptr_t textlen = range.cpMax - range.cpMin; // Determine mode for SmartHighlighting bool isWordOnly = true; diff --git a/PowerEditor/src/ScintillaComponent/UserDefineDialog.cpp b/PowerEditor/src/ScintillaComponent/UserDefineDialog.cpp index 67354afe1..def2a1c51 100644 --- a/PowerEditor/src/ScintillaComponent/UserDefineDialog.cpp +++ b/PowerEditor/src/ScintillaComponent/UserDefineDialog.cpp @@ -96,7 +96,7 @@ bool SharedParametersDialog::setPropertyByCheck(HWND hwnd, WPARAM id, bool & boo return TRUE; } -INT_PTR CALLBACK SharedParametersDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM /*lParam*/) +intptr_t CALLBACK SharedParametersDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM /*lParam*/) { switch (Message) { @@ -151,7 +151,7 @@ INT_PTR CALLBACK SharedParametersDialog::run_dlgProc(UINT Message, WPARAM wParam return FALSE; } -INT_PTR CALLBACK FolderStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK FolderStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { switch (Message) { @@ -268,7 +268,7 @@ void FolderStyleDialog::retrieve(TCHAR *dest, const TCHAR *toRetrieve, TCHAR *pr dest[j++] = '\0'; } -INT_PTR CALLBACK KeyWordsStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK KeyWordsStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { switch (Message) { @@ -409,7 +409,7 @@ void KeyWordsStyleDialog::updateDlg() ::SendDlgItemMessage(_hSelf, IDC_KEYWORD8_PREFIX_CHECK, BM_SETCHECK, _pUserLang->_isPrefix[7], 0); } -INT_PTR CALLBACK CommentStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK CommentStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { switch (Message) { @@ -676,7 +676,7 @@ void SymbolsStyleDialog::updateDlg() ::SendDlgItemMessage(_hSelf, IDC_OPERATOR2_EDIT, WM_SETTEXT, 0, reinterpret_cast(_pUserLang->_keywordLists[SCE_USER_KWLIST_OPERATORS2])); } -INT_PTR CALLBACK SymbolsStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK SymbolsStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { switch (Message) { @@ -976,7 +976,7 @@ void UserDefineDialog::updateDlg() } -INT_PTR CALLBACK UserDefineDialog::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK UserDefineDialog::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { NppParameters& nppParam = NppParameters::getInstance(); NativeLangSpeaker * pNativeSpeaker = nppParam.getNativeLangSpeaker(); @@ -1522,7 +1522,7 @@ INT_PTR CALLBACK UserDefineDialog::run_dlgProc(UINT message, WPARAM wParam, LPAR return FALSE; } -INT_PTR CALLBACK StringDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +intptr_t CALLBACK StringDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { switch (Message) { @@ -1616,7 +1616,7 @@ INT_PTR CALLBACK StringDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) tmpName[0] = '\0'; ::GetDlgItemText(_hSelf, IDC_STRING_EDIT, tmpName, langNameLenMax); _textValue = tmpName; - ::EndDialog(_hSelf, reinterpret_cast(_textValue.c_str())); + ::EndDialog(_hSelf, reinterpret_cast(_textValue.c_str())); return TRUE; } @@ -1723,7 +1723,7 @@ void StylerDlg::move2CtrlRight(HWND hwndDlg, int ctrlID, HWND handle2Move, int h ::MoveWindow(handle2Move, p.x, p.y, handle2MoveWidth, handle2MoveHeight, TRUE); } -INT_PTR CALLBACK StylerDlg::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK StylerDlg::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { StylerDlg * dlg = (StylerDlg *)::GetProp(hwnd, TEXT("Styler dialog prop")); NppParameters& nppParam = NppParameters::getInstance(); diff --git a/PowerEditor/src/ScintillaComponent/UserDefineDialog.h b/PowerEditor/src/ScintillaComponent/UserDefineDialog.h index 09b6854b5..95e80acc4 100644 --- a/PowerEditor/src/ScintillaComponent/UserDefineDialog.h +++ b/PowerEditor/src/ScintillaComponent/UserDefineDialog.h @@ -247,7 +247,7 @@ protected : //Shared data static UserLangContainer *_pUserLang; static ScintillaEditView *_pScintilla; - INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); bool setPropertyByCheck(HWND hwnd, WPARAM id, bool & bool2set); virtual void setKeywords2List(int ctrlID) = 0; }; @@ -258,7 +258,7 @@ public: FolderStyleDialog() = default; void updateDlg(); protected : - INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); void setKeywords2List(int ctrlID); private : void retrieve(TCHAR *dest, const TCHAR *toRetrieve, TCHAR *prefix) const; @@ -271,7 +271,7 @@ public: KeyWordsStyleDialog() = default; void updateDlg(); protected : - INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); void setKeywords2List(int id); }; @@ -281,7 +281,7 @@ public : CommentStyleDialog() = default; void updateDlg(); protected : - INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); void setKeywords2List(int id); private : void retrieve(TCHAR *dest, const TCHAR *toRetrieve, TCHAR *prefix) const; @@ -293,7 +293,7 @@ public : SymbolsStyleDialog() = default; void updateDlg(); protected : - INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); void setKeywords2List(int id); private : void retrieve(TCHAR *dest, const TCHAR *toRetrieve, TCHAR *prefix) const; @@ -358,7 +358,7 @@ public : _ctrlTab.renameTab(index, name2set); }; protected : - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private : ControlsTab _ctrlTab; WindowVector _wVector; @@ -401,14 +401,14 @@ public : } }; - INT_PTR doDialog() { + intptr_t doDialog() { return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_STRING_DLG), _hParent, dlgProc, reinterpret_cast(this)); }; virtual void destroy() {}; protected : - INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM); + intptr_t CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM); // Custom proc to subclass edit control LRESULT static CALLBACK customEditProc(HWND hEdit, UINT msg, WPARAM wParam, LPARAM lParam); @@ -447,7 +447,7 @@ public: return long(::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_STYLER_POPUP_DLG), _parent, dlgProc, reinterpret_cast(this))); }; - static INT_PTR CALLBACK dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); + static intptr_t CALLBACK dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); private: HINSTANCE _hInst = nullptr; diff --git a/PowerEditor/src/ScintillaComponent/columnEditor.cpp b/PowerEditor/src/ScintillaComponent/columnEditor.cpp index 170045849..0324860a5 100644 --- a/PowerEditor/src/ScintillaComponent/columnEditor.cpp +++ b/PowerEditor/src/ScintillaComponent/columnEditor.cpp @@ -36,7 +36,7 @@ void ColumnEditorDlg::display(bool toShow) const ::SetFocus(::GetDlgItem(_hSelf, ID_GOLINE_EDIT)); } -INT_PTR CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { switch (message) { diff --git a/PowerEditor/src/ScintillaComponent/columnEditor.h b/PowerEditor/src/ScintillaComponent/columnEditor.h index 5b6787cdd..4167e4e3c 100644 --- a/PowerEditor/src/ScintillaComponent/columnEditor.h +++ b/PowerEditor/src/ScintillaComponent/columnEditor.h @@ -47,7 +47,7 @@ public : UCHAR getFormat(); protected : - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private : ScintillaEditView **_ppEditView = nullptr; diff --git a/PowerEditor/src/ScintillaComponent/xmlMatchedTagsHighlighter.cpp b/PowerEditor/src/ScintillaComponent/xmlMatchedTagsHighlighter.cpp index c622ab17f..6483121ea 100644 --- a/PowerEditor/src/ScintillaComponent/xmlMatchedTagsHighlighter.cpp +++ b/PowerEditor/src/ScintillaComponent/xmlMatchedTagsHighlighter.cpp @@ -25,11 +25,11 @@ using namespace std; -vector< pair > XmlMatchedTagsHighlighter::getAttributesPos(INT_PTR start, INT_PTR end) +vector< pair > XmlMatchedTagsHighlighter::getAttributesPos(intptr_t start, intptr_t end) { - vector< pair > attributes; + vector< pair > attributes; - INT_PTR bufLen = end - start + 1; + intptr_t bufLen = end - start + 1; char *buf = new char[bufLen+1]; _pEditView->getText(buf, start, end); @@ -119,12 +119,12 @@ vector< pair > XmlMatchedTagsHighlighter::getAttributesPos(INT if (state == attr_valid) { - attributes.push_back(pair(start+startPos, start+i+oneMoreChar)); + attributes.push_back(pair(start+startPos, start+i+oneMoreChar)); state = attr_invalid; } } if (state == attr_value) - attributes.push_back(pair(start+startPos, start+i-1)); + attributes.push_back(pair(start+startPos, start+i-1)); delete [] buf; return attributes; @@ -135,8 +135,8 @@ vector< pair > XmlMatchedTagsHighlighter::getAttributesPos(INT bool XmlMatchedTagsHighlighter::getXmlMatchedTagsPos(XmlMatchedTagsPos &xmlTags) { bool tagFound = false; - INT_PTR caret = _pEditView->execute(SCI_GETCURRENTPOS); - INT_PTR searchStartPoint = caret; + intptr_t caret = _pEditView->execute(SCI_GETCURRENTPOS); + intptr_t searchStartPoint = caret; LRESULT styleAt; FindResult openFound; @@ -164,7 +164,7 @@ bool XmlMatchedTagsHighlighter::getXmlMatchedTagsPos(XmlMatchedTagsPos &xmlTags) if (!closeFound.success) { // We're in a tag (either a start tag or an end tag) - INT_PTR nextChar = _pEditView->execute(SCI_GETCHARAT, openFound.start + 1); + intptr_t nextChar = _pEditView->execute(SCI_GETCHARAT, openFound.start + 1); ///////////////////////////////////////////////////////////////////////// @@ -173,14 +173,14 @@ bool XmlMatchedTagsHighlighter::getXmlMatchedTagsPos(XmlMatchedTagsPos &xmlTags) if ('/' == nextChar) { xmlTags.tagCloseStart = openFound.start; - INT_PTR docLength = _pEditView->execute(SCI_GETLENGTH); + intptr_t docLength = _pEditView->execute(SCI_GETLENGTH); FindResult endCloseTag = findText(">", caret, docLength, 0); if (endCloseTag.success) { xmlTags.tagCloseEnd = endCloseTag.end; } // Now find the tagName - INT_PTR position = openFound.start + 2; + intptr_t position = openFound.start + 2; // UTF-8 or ASCII tag name std::string tagName; @@ -212,8 +212,8 @@ bool XmlMatchedTagsHighlighter::getXmlMatchedTagsPos(XmlMatchedTagsPos &xmlTags) * something * Maybe count all closing tags between start point and start of our end tag.??? */ - INT_PTR currentEndPoint = xmlTags.tagCloseStart; - INT_PTR openTagsRemaining = 1; + intptr_t currentEndPoint = xmlTags.tagCloseStart; + intptr_t openTagsRemaining = 1; FindResult nextOpenTag; do { @@ -229,8 +229,8 @@ bool XmlMatchedTagsHighlighter::getXmlMatchedTagsPos(XmlMatchedTagsPos &xmlTags) // ^^^^^^^^ we've found this guy // ^^^^^^^^^^ ^^^^^^^^ Now we need to cound these fellas FindResult inbetweenCloseTag; - INT_PTR currentStartPosition = nextOpenTag.end; - INT_PTR closeTagsFound = 0; + intptr_t currentStartPosition = nextOpenTag.end; + intptr_t closeTagsFound = 0; bool forwardSearch = (currentStartPosition < currentEndPoint); do @@ -278,8 +278,8 @@ bool XmlMatchedTagsHighlighter::getXmlMatchedTagsPos(XmlMatchedTagsPos &xmlTags) ///////////////////////////////////////////////////////////////////////// // CURSOR IN OPEN TAG ///////////////////////////////////////////////////////////////////////// - INT_PTR position = openFound.start + 1; - INT_PTR docLength = _pEditView->execute(SCI_GETLENGTH); + intptr_t position = openFound.start + 1; + intptr_t docLength = _pEditView->execute(SCI_GETLENGTH); xmlTags.tagOpenStart = openFound.start; @@ -299,7 +299,7 @@ bool XmlMatchedTagsHighlighter::getXmlMatchedTagsPos(XmlMatchedTagsPos &xmlTags) // First we need to check if this is a self-closing tag. // If it is, then we can just return this tag to highlight itself. xmlTags.tagNameEnd = openFound.start + static_cast(tagName.size()) + 1; - INT_PTR closeAnglePosition = findCloseAngle(position, docLength); + intptr_t closeAnglePosition = findCloseAngle(position, docLength); if (-1 != closeAnglePosition) { xmlTags.tagOpenEnd = closeAnglePosition + 1; @@ -325,8 +325,8 @@ bool XmlMatchedTagsHighlighter::getXmlMatchedTagsPos(XmlMatchedTagsPos &xmlTags) * e.g. some text * (cursor represented by |) */ - INT_PTR currentStartPosition = xmlTags.tagOpenEnd; - INT_PTR closeTagsRemaining = 1; + intptr_t currentStartPosition = xmlTags.tagOpenEnd; + intptr_t closeTagsRemaining = 1; FindResult nextCloseTag; do { @@ -342,8 +342,8 @@ bool XmlMatchedTagsHighlighter::getXmlMatchedTagsPos(XmlMatchedTagsPos &xmlTags) // ^^^^^^^^ we've found this guy // ^^^^^^^^^ Now we need to find this fella FindResult inbetweenOpenTag; - INT_PTR currentEndPosition = nextCloseTag.start; - INT_PTR openTagsFound = 0; + intptr_t currentEndPosition = nextCloseTag.start; + intptr_t openTagsFound = 0; do { @@ -385,17 +385,17 @@ bool XmlMatchedTagsHighlighter::getXmlMatchedTagsPos(XmlMatchedTagsPos &xmlTags) return tagFound; } -XmlMatchedTagsHighlighter::FindResult XmlMatchedTagsHighlighter::findOpenTag(const std::string& tagName, INT_PTR start, INT_PTR end) +XmlMatchedTagsHighlighter::FindResult XmlMatchedTagsHighlighter::findOpenTag(const std::string& tagName, intptr_t start, intptr_t end) { std::string search("<"); search.append(tagName); FindResult openTagFound; openTagFound.success = false; FindResult result; - INT_PTR nextChar = 0; - INT_PTR styleAt; - INT_PTR searchStart = start; - INT_PTR searchEnd = end; + intptr_t nextChar = 0; + intptr_t styleAt; + intptr_t searchStart = start; + intptr_t searchEnd = end; bool forwardSearch = (start < end); do { @@ -418,7 +418,7 @@ XmlMatchedTagsHighlighter::FindResult XmlMatchedTagsHighlighter::findOpenTag(con } else if (isWhitespace(nextChar)) { - INT_PTR closeAnglePosition = findCloseAngle(result.end, forwardSearch ? end : start); + intptr_t closeAnglePosition = findCloseAngle(result.end, forwardSearch ? end : start); if (-1 != closeAnglePosition && '/' != _pEditView->execute(SCI_GETCHARAT, closeAnglePosition - 1)) { openTagFound.end = closeAnglePosition; @@ -450,18 +450,18 @@ XmlMatchedTagsHighlighter::FindResult XmlMatchedTagsHighlighter::findOpenTag(con } -INT_PTR XmlMatchedTagsHighlighter::findCloseAngle(INT_PTR startPosition, INT_PTR endPosition) +intptr_t XmlMatchedTagsHighlighter::findCloseAngle(intptr_t startPosition, intptr_t endPosition) { // We'll search for the next '>', and check it's not in an attribute using the style FindResult closeAngle; bool isValidClose; - INT_PTR returnPosition = -1; + intptr_t returnPosition = -1; // Only search forwards if (startPosition > endPosition) { - INT_PTR temp = endPosition; + intptr_t temp = endPosition; endPosition = startPosition; startPosition = temp; } @@ -492,16 +492,16 @@ INT_PTR XmlMatchedTagsHighlighter::findCloseAngle(INT_PTR startPosition, INT_PTR } -XmlMatchedTagsHighlighter::FindResult XmlMatchedTagsHighlighter::findCloseTag(const std::string& tagName, INT_PTR start, INT_PTR end) +XmlMatchedTagsHighlighter::FindResult XmlMatchedTagsHighlighter::findCloseTag(const std::string& tagName, intptr_t start, intptr_t end) { std::string search("' - any other character is invalid. { - INT_PTR whitespacePoint = result.end; + intptr_t whitespacePoint = result.end; do { ++whitespacePoint; @@ -560,7 +560,7 @@ XmlMatchedTagsHighlighter::FindResult XmlMatchedTagsHighlighter::findCloseTag(co } -XmlMatchedTagsHighlighter::FindResult XmlMatchedTagsHighlighter::findText(const char *text, INT_PTR start, INT_PTR end, int flags) +XmlMatchedTagsHighlighter::FindResult XmlMatchedTagsHighlighter::findText(const char *text, intptr_t start, intptr_t end, int flags) { FindResult returnValue; @@ -568,7 +568,7 @@ XmlMatchedTagsHighlighter::FindResult XmlMatchedTagsHighlighter::findText(const search.lpstrText = const_cast(text); // Grrrrrr search.chrg.cpMin = static_cast(start); search.chrg.cpMax = static_cast(end); - INT_PTR result = _pEditView->execute(SCI_FINDTEXT, flags, reinterpret_cast(&search)); + intptr_t result = _pEditView->execute(SCI_FINDTEXT, flags, reinterpret_cast(&search)); if (-1 == result) { returnValue.success = false; @@ -600,7 +600,7 @@ void XmlMatchedTagsHighlighter::tagMatch(bool doHiliteAttr) std::string codeBeginTag = lang == L_PHP ? "" : "%>"; - const INT_PTR caret = 1 + _pEditView->execute(SCI_GETCURRENTPOS); // +1 to deal with the case when the caret is between the angle and the question mark in "execute(SCI_GETCURRENTPOS); // +1 to deal with the case when the caret is between the angle and the question mark in " > attributes = getAttributesPos(xmlTags.tagNameEnd, xmlTags.tagOpenEnd - openTagTailLen); + vector< pair > attributes = getAttributesPos(xmlTags.tagNameEnd, xmlTags.tagOpenEnd - openTagTailLen); _pEditView->execute(SCI_SETINDICATORCURRENT, SCE_UNIVERSAL_TAGATTR); for (size_t i = 0, len = attributes.size(); i < len ; ++i) { @@ -653,11 +653,11 @@ void XmlMatchedTagsHighlighter::tagMatch(bool doHiliteAttr) // Colouising indent guide line position if (_pEditView->isShownIndentGuide()) { - INT_PTR columnAtCaret = _pEditView->execute(SCI_GETCOLUMN, xmlTags.tagOpenStart); - INT_PTR columnOpposite = _pEditView->execute(SCI_GETCOLUMN, xmlTags.tagCloseStart); + intptr_t columnAtCaret = _pEditView->execute(SCI_GETCOLUMN, xmlTags.tagOpenStart); + intptr_t columnOpposite = _pEditView->execute(SCI_GETCOLUMN, xmlTags.tagCloseStart); - INT_PTR lineAtCaret = _pEditView->execute(SCI_LINEFROMPOSITION, xmlTags.tagOpenStart); - INT_PTR lineOpposite = _pEditView->execute(SCI_LINEFROMPOSITION, xmlTags.tagCloseStart); + intptr_t lineAtCaret = _pEditView->execute(SCI_LINEFROMPOSITION, xmlTags.tagOpenStart); + intptr_t lineOpposite = _pEditView->execute(SCI_LINEFROMPOSITION, xmlTags.tagCloseStart); if (xmlTags.tagCloseStart != -1 && lineAtCaret != lineOpposite) { diff --git a/PowerEditor/src/ScintillaComponent/xmlMatchedTagsHighlighter.h b/PowerEditor/src/ScintillaComponent/xmlMatchedTagsHighlighter.h index 506a1a1cc..15d673c12 100644 --- a/PowerEditor/src/ScintillaComponent/xmlMatchedTagsHighlighter.h +++ b/PowerEditor/src/ScintillaComponent/xmlMatchedTagsHighlighter.h @@ -33,31 +33,31 @@ private: ScintillaEditView *_pEditView; struct XmlMatchedTagsPos { - INT_PTR tagOpenStart; - INT_PTR tagNameEnd; - INT_PTR tagOpenEnd; + intptr_t tagOpenStart; + intptr_t tagNameEnd; + intptr_t tagOpenEnd; - INT_PTR tagCloseStart; - INT_PTR tagCloseEnd; + intptr_t tagCloseStart; + intptr_t tagCloseEnd; }; struct FindResult { - INT_PTR start; - INT_PTR end; + intptr_t start; + intptr_t end; bool success; }; bool getXmlMatchedTagsPos(XmlMatchedTagsPos & tagsPos); // Allowed whitespace characters in XML - bool isWhitespace(INT_PTR ch) { return ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n'; } + bool isWhitespace(intptr_t ch) { return ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n'; } - FindResult findText(const char *text, INT_PTR start, INT_PTR end, int flags = 0); - FindResult findOpenTag(const std::string& tagName, INT_PTR start, INT_PTR end); - FindResult findCloseTag(const std::string& tagName, INT_PTR start, INT_PTR end); - INT_PTR findCloseAngle(INT_PTR startPosition, INT_PTR endPosition); + FindResult findText(const char *text, intptr_t start, intptr_t end, int flags = 0); + FindResult findOpenTag(const std::string& tagName, intptr_t start, intptr_t end); + FindResult findCloseTag(const std::string& tagName, intptr_t start, intptr_t end); + intptr_t findCloseAngle(intptr_t startPosition, intptr_t endPosition); - std::vector< std::pair > getAttributesPos(INT_PTR start, INT_PTR end); + std::vector< std::pair > getAttributesPos(intptr_t start, intptr_t end); }; diff --git a/PowerEditor/src/WinControls/AboutDlg/AboutDlg.cpp b/PowerEditor/src/WinControls/AboutDlg/AboutDlg.cpp index ecdab59fc..7a8b4959a 100644 --- a/PowerEditor/src/WinControls/AboutDlg/AboutDlg.cpp +++ b/PowerEditor/src/WinControls/AboutDlg/AboutDlg.cpp @@ -21,7 +21,7 @@ #pragma warning(disable : 4996) // for GetVersion() -INT_PTR CALLBACK AboutDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK AboutDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -130,7 +130,7 @@ void AboutDlg::doDialog() } -INT_PTR CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM /*lParam*/) +intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM /*lParam*/) { switch (message) { @@ -402,7 +402,7 @@ void DoSaveOrNotBox::changeLang() ::SetDlgItemText(_hSelf, IDC_DOSAVEORNOTTEXT, msg.c_str()); } -INT_PTR CALLBACK DoSaveOrNotBox::run_dlgProc(UINT message, WPARAM wParam, LPARAM /*lParam*/) +intptr_t CALLBACK DoSaveOrNotBox::run_dlgProc(UINT message, WPARAM wParam, LPARAM /*lParam*/) { switch (message) { @@ -508,7 +508,7 @@ void DoSaveAllBox::changeLang() ::SetDlgItemText(_hSelf, IDC_DOSAVEALLTEXT, msg.c_str()); } -INT_PTR CALLBACK DoSaveAllBox::run_dlgProc(UINT message, WPARAM wParam, LPARAM /*lParam*/) +intptr_t CALLBACK DoSaveAllBox::run_dlgProc(UINT message, WPARAM wParam, LPARAM /*lParam*/) { switch (message) { diff --git a/PowerEditor/src/WinControls/AboutDlg/AboutDlg.h b/PowerEditor/src/WinControls/AboutDlg/AboutDlg.h index c7a057ff0..9ac879c37 100644 --- a/PowerEditor/src/WinControls/AboutDlg/AboutDlg.h +++ b/PowerEditor/src/WinControls/AboutDlg/AboutDlg.h @@ -49,7 +49,7 @@ public : }; protected : - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private : URLCtrl _emailLink; @@ -75,7 +75,7 @@ public: }; protected: - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private: typedef const CHAR * (__cdecl * PWINEGETVERSION)(); @@ -109,7 +109,7 @@ public: void changeLang(); protected: - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private: int clickedButtonId = -1; @@ -133,7 +133,7 @@ public: void changeLang(); protected: - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private: int clickedButtonId = -1; diff --git a/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.cpp b/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.cpp index 89e4d4c09..dc5e2bd0f 100644 --- a/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.cpp +++ b/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.cpp @@ -25,7 +25,7 @@ void AnsiCharPanel::switchEncoding() _listView.resetValues(codepage); } -INT_PTR CALLBACK AnsiCharPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK AnsiCharPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { diff --git a/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.h b/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.h index 747651d33..4dc22bbe5 100644 --- a/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.h +++ b/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.h @@ -57,7 +57,7 @@ public: }; protected: - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private: ScintillaEditView **_ppEditView = nullptr; diff --git a/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.cpp b/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.cpp index cec13a759..4eaf6b4fc 100644 --- a/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.cpp +++ b/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.cpp @@ -186,7 +186,7 @@ void ClipboardHistoryPanel::drawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) ::DrawText(lpDrawItemStruct->hDC, ptStr, lstrlen(ptStr), &(lpDrawItemStruct->rcItem), DT_SINGLELINE | DT_VCENTER | DT_LEFT); } -INT_PTR CALLBACK ClipboardHistoryPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK ClipboardHistoryPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { diff --git a/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.h b/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.h index 4e6358346..639f390b0 100644 --- a/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.h +++ b/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.h @@ -75,7 +75,7 @@ public: void drawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); protected: - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private: ScintillaEditView **_ppEditView = nullptr; diff --git a/PowerEditor/src/WinControls/ColourPicker/ColourPopup.cpp b/PowerEditor/src/WinControls/ColourPicker/ColourPopup.cpp index f93aaf8b2..fd309b4f9 100644 --- a/PowerEditor/src/WinControls/ColourPicker/ColourPopup.cpp +++ b/PowerEditor/src/WinControls/ColourPicker/ColourPopup.cpp @@ -43,7 +43,7 @@ void ColourPopup::create(int dialogID) display(); } -INT_PTR CALLBACK ColourPopup::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK ColourPopup::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -76,7 +76,7 @@ INT_PTR CALLBACK ColourPopup::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LP } } -INT_PTR CALLBACK ColourPopup::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK ColourPopup::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) diff --git a/PowerEditor/src/WinControls/ColourPicker/ColourPopup.h b/PowerEditor/src/WinControls/ColourPicker/ColourPopup.h index d2445dfba..1af8962e7 100644 --- a/PowerEditor/src/WinControls/ColourPicker/ColourPopup.h +++ b/PowerEditor/src/WinControls/ColourPicker/ColourPopup.h @@ -61,6 +61,6 @@ private : RECT _rc = {0}; COLORREF _colour = RGB(0xFF, 0xFF, 0xFF); - static INT_PTR CALLBACK dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + static intptr_t CALLBACK dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); }; diff --git a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp index d6dc5c62f..960dc1508 100644 --- a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp +++ b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp @@ -72,7 +72,7 @@ void WordStyleDlg::updateGlobalOverrideCtrls() ::SendDlgItemMessage(_hSelf, IDC_GLOBAL_UNDERLINE_CHECK, BM_SETCHECK, nppGUI._globalOverride.enableUnderLine, 0); } -INT_PTR CALLBACK WordStyleDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK WordStyleDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { switch (Message) { diff --git a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.h b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.h index d37b689a5..e3b9caf89 100644 --- a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.h +++ b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.h @@ -144,7 +144,7 @@ private : bool _isThemeDirty = false; bool _isShownGOCtrls = false; - INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); Style & getCurrentStyler() { diff --git a/PowerEditor/src/WinControls/DockingWnd/DockingCont.cpp b/PowerEditor/src/WinControls/DockingWnd/DockingCont.cpp index d2600a1bd..37b2b3378 100644 --- a/PowerEditor/src/WinControls/DockingWnd/DockingCont.cpp +++ b/PowerEditor/src/WinControls/DockingWnd/DockingCont.cpp @@ -1062,7 +1062,7 @@ void DockingCont::drawTabItem(DRAWITEMSTRUCT *pDrawItemStruct) //---------------------------------------------- // Process function of dialog // -INT_PTR CALLBACK DockingCont::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK DockingCont::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { switch (Message) { diff --git a/PowerEditor/src/WinControls/DockingWnd/DockingCont.h b/PowerEditor/src/WinControls/DockingWnd/DockingCont.h index b10e64de6..1526662cd 100644 --- a/PowerEditor/src/WinControls/DockingWnd/DockingCont.h +++ b/PowerEditor/src/WinControls/DockingWnd/DockingCont.h @@ -144,7 +144,7 @@ protected : return (((DockingCont *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA)))->runProcTab(hwnd, Message, wParam, lParam)); }; - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); // drawing functions void drawCaptionItem(DRAWITEMSTRUCT *pDrawItemStruct); diff --git a/PowerEditor/src/WinControls/DockingWnd/DockingDlgInterface.h b/PowerEditor/src/WinControls/DockingWnd/DockingDlgInterface.h index 384d39690..d58532a29 100644 --- a/PowerEditor/src/WinControls/DockingWnd/DockingDlgInterface.h +++ b/PowerEditor/src/WinControls/DockingWnd/DockingDlgInterface.h @@ -94,7 +94,7 @@ protected : generic_string _pluginName; bool _isClosed = false; - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_ERASEBKGND: diff --git a/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp b/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp index c8704fb89..d3f9f74cc 100644 --- a/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp +++ b/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp @@ -183,8 +183,8 @@ void DocumentMap::wrapMap(const ScintillaEditView *editView) if (svp._paddingLeft || svp._paddingRight) { - INT_PTR paddingMapLeft = static_cast(svp._paddingLeft / (editZoneWidth / docMapWidth)); - INT_PTR paddingMapRight = static_cast(svp._paddingRight / (editZoneWidth / docMapWidth)); + intptr_t paddingMapLeft = static_cast(svp._paddingLeft / (editZoneWidth / docMapWidth)); + intptr_t paddingMapRight = static_cast(svp._paddingRight / (editZoneWidth / docMapWidth)); _pMapView->execute(SCI_SETMARGINLEFT, 0, paddingMapLeft); _pMapView->execute(SCI_SETMARGINRIGHT, 0, paddingMapRight); } @@ -318,7 +318,7 @@ void DocumentMap::redraw(bool) const DockingDlgInterface::redraw(true); } -INT_PTR CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -424,9 +424,9 @@ INT_PTR CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP { int newPosY = HIWORD(lParam); int currentCenterPosY = _vzDlg.getCurrentCenterPosY(); - INT_PTR pixelPerLine = _pMapView->execute(SCI_TEXTHEIGHT, 0); - INT_PTR jumpDistance = newPosY - currentCenterPosY; - INT_PTR nbLine2jump = jumpDistance/pixelPerLine; + intptr_t pixelPerLine = _pMapView->execute(SCI_TEXTHEIGHT, 0); + intptr_t jumpDistance = newPosY - currentCenterPosY; + intptr_t nbLine2jump = jumpDistance/pixelPerLine; (*_ppEditView)->execute(SCI_LINESCROLL, 0, nbLine2jump); scrollMap(); @@ -495,7 +495,7 @@ void ViewZoneDlg::doDialog() display(); }; -INT_PTR CALLBACK ViewZoneDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK ViewZoneDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { diff --git a/PowerEditor/src/WinControls/DocumentMap/documentMap.h b/PowerEditor/src/WinControls/DocumentMap/documentMap.h index b86be7c67..a65da67f5 100644 --- a/PowerEditor/src/WinControls/DocumentMap/documentMap.h +++ b/PowerEditor/src/WinControls/DocumentMap/documentMap.h @@ -73,7 +73,7 @@ public : static void setColour(COLORREF colour2Set, ViewZoneColorIndex i); protected : - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); static LRESULT CALLBACK canvasStaticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK canvas_runProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); @@ -137,7 +137,7 @@ public: void setTemporarilyShowing(bool tempShowing) { _isTemporarilyShowing = tempShowing; } protected: - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); bool needToRecomputeWith(const ScintillaEditView *editView = nullptr); private: @@ -148,7 +148,7 @@ private: bool _isTemporarilyShowing = false; // for needToRecomputeWith function - INT_PTR _displayZoom = -1; - INT_PTR _displayWidth = 0; + intptr_t _displayZoom = -1; + intptr_t _displayWidth = 0; generic_string id4dockingCont = DM_NOFOCUSWHILECLICKINGCAPTION; }; diff --git a/PowerEditor/src/WinControls/DocumentMap/documentSnapshot.cpp b/PowerEditor/src/WinControls/DocumentMap/documentSnapshot.cpp index bbe217aef..7f95bacc0 100644 --- a/PowerEditor/src/WinControls/DocumentMap/documentSnapshot.cpp +++ b/PowerEditor/src/WinControls/DocumentMap/documentSnapshot.cpp @@ -18,7 +18,7 @@ #include "documentSnapshot.h" #include "ScintillaEditView.h" -INT_PTR CALLBACK DocumentPeeker::run_dlgProc(UINT message, WPARAM /*wParam*/, LPARAM /*lParam*/) +intptr_t CALLBACK DocumentPeeker::run_dlgProc(UINT message, WPARAM /*wParam*/, LPARAM /*lParam*/) { switch (message) { @@ -167,14 +167,14 @@ void DocumentPeeker::saveCurrentSnapshot(ScintillaEditView & editView) // Width RECT editorRect; editView.getClientRect(editorRect); - INT_PTR marginWidths = 0; + intptr_t marginWidths = 0; for (int m = 0; m < 4; ++m) { marginWidths += editView.execute(SCI_GETMARGINWIDTHN, m); } double editViewWidth = editorRect.right - editorRect.left - static_cast(marginWidths); double editViewHeight = editorRect.bottom - editorRect.top; - mapPos._width = static_cast((editViewWidth / editViewHeight) * static_cast(mapPos._height)); + mapPos._width = static_cast((editViewWidth / editViewHeight) * static_cast(mapPos._height)); mapPos._wrapIndentMode = editView.execute(SCI_GETWRAPINDENTMODE); mapPos._isWrap = editView.isWrap(); diff --git a/PowerEditor/src/WinControls/DocumentMap/documentSnapshot.h b/PowerEditor/src/WinControls/DocumentMap/documentSnapshot.h index 32290a7d5..6dbcc653a 100644 --- a/PowerEditor/src/WinControls/DocumentMap/documentSnapshot.h +++ b/PowerEditor/src/WinControls/DocumentMap/documentSnapshot.h @@ -44,7 +44,7 @@ public: void saveCurrentSnapshot(ScintillaEditView & editView); protected: - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); void goTo(POINT p); private: diff --git a/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp b/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp index a5f814d4b..8bbd26641 100644 --- a/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp +++ b/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp @@ -92,7 +92,7 @@ bool isRelatedRootFolder(const generic_string & relatedRoot, const generic_strin return relatedRootArray[index2Compare] == subFolderArray[index2Compare]; } -INT_PTR CALLBACK FileBrowser::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK FileBrowser::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -126,17 +126,17 @@ INT_PTR CALLBACK FileBrowser::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP tbButtons[0].iBitmap = 0; tbButtons[0].fsState = TBSTATE_ENABLED; tbButtons[0].fsStyle = BTNS_BUTTON | BTNS_AUTOSIZE; - tbButtons[0].iString = reinterpret_cast(TEXT("")); + tbButtons[0].iString = reinterpret_cast(TEXT("")); tbButtons[1].idCommand = FB_CMD_FOLDALL; tbButtons[1].iBitmap = 1; tbButtons[1].fsState = TBSTATE_ENABLED; tbButtons[1].fsStyle = BTNS_BUTTON | BTNS_AUTOSIZE; - tbButtons[1].iString = reinterpret_cast(TEXT("")); + tbButtons[1].iString = reinterpret_cast(TEXT("")); tbButtons[2].idCommand = FB_CMD_EXPANDALL; tbButtons[2].iBitmap = 2; tbButtons[2].fsState = TBSTATE_ENABLED; tbButtons[2].fsStyle = BTNS_BUTTON | BTNS_AUTOSIZE; - tbButtons[2].iString = reinterpret_cast(TEXT("")); + tbButtons[2].iString = reinterpret_cast(TEXT("")); // tips text for toolbar buttons NativeLangSpeaker *pNativeSpeaker = nppParam.getNativeLangSpeaker(); diff --git a/PowerEditor/src/WinControls/FileBrowser/fileBrowser.h b/PowerEditor/src/WinControls/FileBrowser/fileBrowser.h index 5b7a1cda2..4f7c9b13c 100644 --- a/PowerEditor/src/WinControls/FileBrowser/fileBrowser.h +++ b/PowerEditor/src/WinControls/FileBrowser/fileBrowser.h @@ -207,7 +207,7 @@ protected: void removeNamesAlreadyInNode(HTREEITEM parent, std::vector & labels) const; - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); void notified(LPNMHDR notification); void showContextMenu(int x, int y); void openSelectFile(); diff --git a/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.cpp b/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.cpp index cd690dba2..528f16aa7 100644 --- a/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.cpp +++ b/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.cpp @@ -20,7 +20,7 @@ #include "Parameters.h" #include "localization.h" -INT_PTR CALLBACK FindCharsInRangeDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +intptr_t CALLBACK FindCharsInRangeDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { switch (message) { @@ -92,7 +92,7 @@ INT_PTR CALLBACK FindCharsInRangeDlg::run_dlgProc(UINT message, WPARAM wParam, L case ID_FINDCHAR_NEXT: { - INT_PTR currentPos = (*_ppEditView)->execute(SCI_GETCURRENTPOS); + intptr_t currentPos = (*_ppEditView)->execute(SCI_GETCURRENTPOS); unsigned char startRange = 0; unsigned char endRange = 255; bool direction = dirDown; @@ -124,7 +124,7 @@ INT_PTR CALLBACK FindCharsInRangeDlg::run_dlgProc(UINT message, WPARAM wParam, L return FALSE; } -bool FindCharsInRangeDlg::findCharInRange(unsigned char beginRange, unsigned char endRange, INT_PTR startPos, bool direction, bool wrap) +bool FindCharsInRangeDlg::findCharInRange(unsigned char beginRange, unsigned char endRange, intptr_t startPos, bool direction, bool wrap) { size_t totalSize = (*_ppEditView)->getCurrentDocLen(); if (startPos == -1) @@ -138,7 +138,7 @@ bool FindCharsInRangeDlg::findCharInRange(unsigned char beginRange, unsigned cha bool isFound = false; size_t found = 0; - for (INT_PTR i = startPos - (direction == dirUp ? 1 : 0); + for (intptr_t i = startPos - (direction == dirUp ? 1 : 0); (direction == dirDown) ? i < static_cast(totalSize) : i >= 0 ; (direction == dirDown) ? (++i) : (--i)) { diff --git a/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.h b/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.h index 4309dcd9c..6890c71e2 100644 --- a/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.h +++ b/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.h @@ -47,11 +47,11 @@ public : }; protected : - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private : ScintillaEditView **_ppEditView = nullptr; - bool findCharInRange(unsigned char beginRange, unsigned char endRange, INT_PTR startPos, bool direction, bool wrap); + bool findCharInRange(unsigned char beginRange, unsigned char endRange, intptr_t startPos, bool direction, bool wrap); bool getRangeFromUI(unsigned char & startRange, unsigned char & endRange); void getDirectionFromUI(bool & whichDirection, bool & isWrap); }; diff --git a/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp b/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp index dbf730b57..bff330b0b 100644 --- a/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp +++ b/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp @@ -92,8 +92,8 @@ size_t FunctionListPanel::getBodyClosePos(size_t begin, const TCHAR *bodyOpenSym int flags = SCFIND_REGEXP | SCFIND_POSIX; (*_ppEditView)->execute(SCI_SETSEARCHFLAGS, flags); - INT_PTR targetStart = (*_ppEditView)->searchInTarget(exprToSearch.c_str(), exprToSearch.length(), begin, docLen); - INT_PTR targetEnd = 0; + intptr_t targetStart = (*_ppEditView)->searchInTarget(exprToSearch.c_str(), exprToSearch.length(), begin, docLen); + intptr_t targetEnd = 0; do { @@ -102,7 +102,7 @@ size_t FunctionListPanel::getBodyClosePos(size_t begin, const TCHAR *bodyOpenSym targetEnd = (*_ppEditView)->execute(SCI_GETTARGETEND); // Now we determinate the symbol (open or close) - INT_PTR tmpStart = (*_ppEditView)->searchInTarget(bodyOpenSymbol, lstrlen(bodyOpenSymbol), targetStart, targetEnd); + intptr_t tmpStart = (*_ppEditView)->searchInTarget(bodyOpenSymbol, lstrlen(bodyOpenSymbol), targetStart, targetEnd); if (tmpStart >= 0) // open symbol found { ++cntOpen; @@ -125,7 +125,7 @@ size_t FunctionListPanel::getBodyClosePos(size_t begin, const TCHAR *bodyOpenSym return targetEnd; } -generic_string FunctionListPanel::parseSubLevel(size_t begin, size_t end, std::vector< generic_string > dataToSearch, INT_PTR& foundPos) +generic_string FunctionListPanel::parseSubLevel(size_t begin, size_t end, std::vector< generic_string > dataToSearch, intptr_t& foundPos) { if (begin >= end) { @@ -140,14 +140,14 @@ generic_string FunctionListPanel::parseSubLevel(size_t begin, size_t end, std::v (*_ppEditView)->execute(SCI_SETSEARCHFLAGS, flags); const TCHAR *regExpr2search = dataToSearch[0].c_str(); - INT_PTR targetStart = (*_ppEditView)->searchInTarget(regExpr2search, lstrlen(regExpr2search), begin, end); + intptr_t targetStart = (*_ppEditView)->searchInTarget(regExpr2search, lstrlen(regExpr2search), begin, end); if (targetStart < 0) { foundPos = -1; return TEXT(""); } - INT_PTR targetEnd = (*_ppEditView)->execute(SCI_GETTARGETEND); + intptr_t targetEnd = (*_ppEditView)->execute(SCI_GETTARGETEND); if (dataToSearch.size() >= 2) { @@ -727,7 +727,7 @@ void FunctionListPanel::setSort(bool isEnabled) ::SendMessage(_hToolbarMenu, TB_SETBUTTONINFO, IDC_SORTBUTTON_FUNCLIST, reinterpret_cast(&tbbuttonInfo)); } -INT_PTR CALLBACK FunctionListPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK FunctionListPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -832,13 +832,13 @@ INT_PTR CALLBACK FunctionListPanel::run_dlgProc(UINT message, WPARAM wParam, LPA tbButtons[1].iBitmap = 0; tbButtons[1].fsState = TBSTATE_ENABLED; tbButtons[1].fsStyle = BTNS_CHECK | BTNS_AUTOSIZE; - tbButtons[1].iString = reinterpret_cast(TEXT("")); + tbButtons[1].iString = reinterpret_cast(TEXT("")); tbButtons[2].idCommand = IDC_RELOADBUTTON_FUNCLIST; tbButtons[2].iBitmap = 1; tbButtons[2].fsState = TBSTATE_ENABLED; tbButtons[2].fsStyle = BTNS_BUTTON | BTNS_AUTOSIZE; - tbButtons[2].iString = reinterpret_cast(TEXT("")); + tbButtons[2].iString = reinterpret_cast(TEXT("")); ::SendMessage(_hToolbarMenu, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0); ::SendMessage(_hToolbarMenu, TB_SETBUTTONSIZE, 0, MAKELONG(nppParams._dpiManager.scaleX(16), nppParams._dpiManager.scaleY(16))); diff --git a/PowerEditor/src/WinControls/FunctionList/functionListPanel.h b/PowerEditor/src/WinControls/FunctionList/functionListPanel.h index 6a66df412..e05172a0e 100644 --- a/PowerEditor/src/WinControls/FunctionList/functionListPanel.h +++ b/PowerEditor/src/WinControls/FunctionList/functionListPanel.h @@ -97,7 +97,7 @@ public: void searchFuncAndSwitchView(); protected: - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private: HWND _hToolbarMenu = nullptr; @@ -125,7 +125,7 @@ private: std::vector _treeParams; HIMAGELIST _hTreeViewImaLst = nullptr; - generic_string parseSubLevel(size_t begin, size_t end, std::vector< generic_string > dataToSearch, INT_PTR& foundPos); + generic_string parseSubLevel(size_t begin, size_t end, std::vector< generic_string > dataToSearch, intptr_t& foundPos); size_t getBodyClosePos(size_t begin, const TCHAR *bodyOpenSymbol, const TCHAR *bodyCloseSymbol); void notified(LPNMHDR notification); void addInStateArray(TreeStateNode tree2Update, const TCHAR *searchText, bool isSorted); diff --git a/PowerEditor/src/WinControls/FunctionList/functionParser.cpp b/PowerEditor/src/WinControls/FunctionList/functionParser.cpp index a66e12d98..4abd647e9 100644 --- a/PowerEditor/src/WinControls/FunctionList/functionParser.cpp +++ b/PowerEditor/src/WinControls/FunctionList/functionParser.cpp @@ -418,7 +418,7 @@ void FunctionParser::funcParse(std::vector & foundInfos, size_t begin } else { - INT_PTR foundPos; + intptr_t foundPos; if (_functionNameExprArray.size()) { fi._data = parseSubLevel(targetStart, targetEnd, _functionNameExprArray, foundPos, ppEditView); @@ -454,7 +454,7 @@ void FunctionParser::funcParse(std::vector & foundInfos, size_t begin } -generic_string FunctionParser::parseSubLevel(size_t begin, size_t end, std::vector< generic_string > dataToSearch, INT_PTR & foundPos, ScintillaEditView **ppEditView) +generic_string FunctionParser::parseSubLevel(size_t begin, size_t end, std::vector< generic_string > dataToSearch, intptr_t & foundPos, ScintillaEditView **ppEditView) { if (begin >= end) { @@ -469,14 +469,14 @@ generic_string FunctionParser::parseSubLevel(size_t begin, size_t end, std::vect (*ppEditView)->execute(SCI_SETSEARCHFLAGS, flags); const TCHAR *regExpr2search = dataToSearch[0].c_str(); - INT_PTR targetStart = (*ppEditView)->searchInTarget(regExpr2search, lstrlen(regExpr2search), begin, end); + intptr_t targetStart = (*ppEditView)->searchInTarget(regExpr2search, lstrlen(regExpr2search), begin, end); if (targetStart < 0) { foundPos = -1; return generic_string(); } - INT_PTR targetEnd = (*ppEditView)->execute(SCI_GETTARGETEND); + intptr_t targetEnd = (*ppEditView)->execute(SCI_GETTARGETEND); if (dataToSearch.size() >= 2) { @@ -527,7 +527,7 @@ size_t FunctionZoneParser::getBodyClosePos(size_t begin, const TCHAR *bodyOpenSy int flags = SCFIND_REGEXP | SCFIND_POSIX | SCFIND_REGEXP_DOTMATCHESNL; (*ppEditView)->execute(SCI_SETSEARCHFLAGS, flags); - INT_PTR targetStart = (*ppEditView)->searchInTarget(exprToSearch.c_str(), exprToSearch.length(), begin, docLen); + intptr_t targetStart = (*ppEditView)->searchInTarget(exprToSearch.c_str(), exprToSearch.length(), begin, docLen); LRESULT targetEnd = 0; do @@ -540,7 +540,7 @@ size_t FunctionZoneParser::getBodyClosePos(size_t begin, const TCHAR *bodyOpenSy if (!isInZones(targetStart, commentZones)) { // Now we determinate the symbol (open or close) - INT_PTR tmpStart = (*ppEditView)->searchInTarget(bodyOpenSymbol, lstrlen(bodyOpenSymbol), targetStart, targetEnd); + intptr_t tmpStart = (*ppEditView)->searchInTarget(bodyOpenSymbol, lstrlen(bodyOpenSymbol), targetStart, targetEnd); if (tmpStart >= 0) // open symbol found { ++cntOpen; @@ -572,16 +572,16 @@ void FunctionZoneParser::classParse(vector & foundInfos, vector< pair int flags = SCFIND_REGEXP | SCFIND_POSIX | SCFIND_REGEXP_DOTMATCHESNL; (*ppEditView)->execute(SCI_SETSEARCHFLAGS, flags); - INT_PTR targetStart = (*ppEditView)->searchInTarget(_rangeExpr.c_str(), _rangeExpr.length(), begin, end); + intptr_t targetStart = (*ppEditView)->searchInTarget(_rangeExpr.c_str(), _rangeExpr.length(), begin, end); - INT_PTR targetEnd = 0; + intptr_t targetEnd = 0; while (targetStart >= 0) { targetEnd = (*ppEditView)->execute(SCI_GETTARGETEND); // Get class name - INT_PTR foundPos = 0; + intptr_t foundPos = 0; generic_string classStructName = parseSubLevel(targetStart, targetEnd, _classNameExprArray, foundPos, ppEditView); @@ -590,7 +590,7 @@ void FunctionZoneParser::classParse(vector & foundInfos, vector< pair targetEnd = getBodyClosePos(targetEnd, _openSymbole.c_str(), _closeSymbole.c_str(), commentZones, ppEditView); } - if (targetEnd > static_cast(end)) //we found a result but outside our range, therefore do not process it + if (targetEnd > static_cast(end)) //we found a result but outside our range, therefore do not process it break; scannedZones.push_back(pair(targetStart, targetEnd)); @@ -619,20 +619,20 @@ void FunctionParser::getCommentZones(vector< pair > & commentZon int flags = SCFIND_REGEXP | SCFIND_POSIX | SCFIND_REGEXP_DOTMATCHESNL; (*ppEditView)->execute(SCI_SETSEARCHFLAGS, flags); - INT_PTR targetStart = (*ppEditView)->searchInTarget(_commentExpr.c_str(), _commentExpr.length(), begin, end); - INT_PTR targetEnd = 0; + intptr_t targetStart = (*ppEditView)->searchInTarget(_commentExpr.c_str(), _commentExpr.length(), begin, end); + intptr_t targetEnd = 0; while (targetStart >= 0) { targetStart = (*ppEditView)->execute(SCI_GETTARGETSTART); targetEnd = (*ppEditView)->execute(SCI_GETTARGETEND); - if (targetEnd > static_cast(end)) //we found a result but outside our range, therefore do not process it + if (targetEnd > static_cast(end)) //we found a result but outside our range, therefore do not process it break; commentZone.push_back(pair(targetStart, targetEnd)); - INT_PTR foundTextLen = targetEnd - targetStart; - if (targetStart + foundTextLen == static_cast(end)) + intptr_t foundTextLen = targetEnd - targetStart; + if (targetStart + foundTextLen == static_cast(end)) break; begin = targetStart + foundTextLen; diff --git a/PowerEditor/src/WinControls/FunctionList/functionParser.h b/PowerEditor/src/WinControls/FunctionList/functionParser.h index b38b06390..5344ec6ae 100644 --- a/PowerEditor/src/WinControls/FunctionList/functionParser.h +++ b/PowerEditor/src/WinControls/FunctionList/functionParser.h @@ -24,8 +24,8 @@ struct foundInfo final { generic_string _data; generic_string _data2; - INT_PTR _pos = -1; - INT_PTR _pos2 = -1; + intptr_t _pos = -1; + intptr_t _pos2 = -1; }; class FunctionParser @@ -49,7 +49,7 @@ protected: std::vector _classNameExprArray; void getCommentZones(std::vector< std::pair > & commentZone, size_t begin, size_t end, ScintillaEditView **ppEditView); void getInvertZones(std::vector< std::pair > & destZones, std::vector< std::pair > & sourceZones, size_t begin, size_t end); - generic_string parseSubLevel(size_t begin, size_t end, std::vector< generic_string > dataToSearch, INT_PTR & foundPos, ScintillaEditView **ppEditView); + generic_string parseSubLevel(size_t begin, size_t end, std::vector< generic_string > dataToSearch, intptr_t & foundPos, ScintillaEditView **ppEditView); }; diff --git a/PowerEditor/src/WinControls/Grid/ShortcutMapper.cpp b/PowerEditor/src/WinControls/Grid/ShortcutMapper.cpp index c3088f443..81ce28769 100644 --- a/PowerEditor/src/WinControls/Grid/ShortcutMapper.cpp +++ b/PowerEditor/src/WinControls/Grid/ShortcutMapper.cpp @@ -410,7 +410,7 @@ void ShortcutMapper::fillOutBabyGrid() _babygrid.setInitialContent(false); } -INT_PTR CALLBACK ShortcutMapper::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK ShortcutMapper::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { diff --git a/PowerEditor/src/WinControls/Grid/ShortcutMapper.h b/PowerEditor/src/WinControls/Grid/ShortcutMapper.h index 9af427d0c..0a266f574 100644 --- a/PowerEditor/src/WinControls/Grid/ShortcutMapper.h +++ b/PowerEditor/src/WinControls/Grid/ShortcutMapper.h @@ -59,7 +59,7 @@ public: bool isFilterValid(PluginCmdShortcut sc); protected : - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private: BabyGridWrapper _babygrid; diff --git a/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.cpp b/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.cpp index 69a688444..d11f72213 100644 --- a/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.cpp +++ b/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.cpp @@ -1111,7 +1111,7 @@ void PluginsAdminDlg::switchDialog(int indexToSwitch) ::EnableWindow(hRemoveButton, showInstalled); } -INT_PTR CALLBACK PluginsAdminDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK PluginsAdminDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { diff --git a/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.h b/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.h index e166d7e20..b0f6e6d42 100644 --- a/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.h +++ b/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.h @@ -199,7 +199,7 @@ public : generic_string getPluginListVerStr() const; protected: - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private : generic_string _updaterDir; diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp index 55f9296d2..ff084af02 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp @@ -91,7 +91,7 @@ static int encodings[] = { 20866 }; -INT_PTR CALLBACK PreferenceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK PreferenceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -422,7 +422,7 @@ void GeneralSubDlg::disableTabbarAlternateIcons() } -INT_PTR CALLBACK GeneralSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +intptr_t CALLBACK GeneralSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { NppParameters& nppParam = NppParameters::getInstance(); @@ -723,7 +723,7 @@ static LRESULT CALLBACK editNumSpaceProc(HWND hwnd, UINT message, WPARAM wParam, } -INT_PTR CALLBACK EditingSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK EditingSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { NppParameters& nppParam = NppParameters::getInstance(); NppGUI & nppGUI = nppParam.getNppGUI(); @@ -921,7 +921,7 @@ void DarkModeSubDlg::move2CtrlLeft(int ctrlID, HWND handle2Move, int handle2Move ::MoveWindow(handle2Move, p.x, p.y, handle2MoveWidth, handle2MoveHeight, TRUE); } -INT_PTR CALLBACK DarkModeSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK DarkModeSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { UNREFERENCED_PARAMETER(lParam); @@ -1365,7 +1365,7 @@ void MarginsBorderEdgeSubDlg::initScintParam() oldFunclstToolbarProc = reinterpret_cast(::SetWindowLongPtr(::GetDlgItem(_hSelf, IDC_COLUMNPOS_EDIT), GWLP_WNDPROC, reinterpret_cast(editNumSpaceProc))); } -INT_PTR CALLBACK MarginsBorderEdgeSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK MarginsBorderEdgeSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { NppParameters& nppParam = NppParameters::getInstance(); switch (message) @@ -1558,7 +1558,7 @@ INT_PTR CALLBACK MarginsBorderEdgeSubDlg::run_dlgProc(UINT message, WPARAM wPara const size_t fileUpdateChoiceEnable = 0; const size_t fileUpdateChoiceEnable4All = 1; const size_t fileUpdateChoiceDisable = 2; -INT_PTR CALLBACK MiscSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +intptr_t CALLBACK MiscSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { NppParameters& nppParam = NppParameters::getInstance(); NppGUI & nppGUI = nppParam.getNppGUI(); @@ -1833,7 +1833,7 @@ void RecentFilesHistorySubDlg::setCustomLen(int val) ::ShowWindow(::GetDlgItem(_hSelf, IDC_CUSTOMIZELENGTHVAL_STATIC), val > 0?SW_SHOW:SW_HIDE); } -INT_PTR CALLBACK NewDocumentSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +intptr_t CALLBACK NewDocumentSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { NppParameters& nppParam = NppParameters::getInstance(); NppGUI & nppGUI = (NppGUI & )nppParam.getNppGUI(); @@ -2068,7 +2068,7 @@ INT_PTR CALLBACK NewDocumentSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPA return FALSE; } -INT_PTR CALLBACK DefaultDirectorySubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +intptr_t CALLBACK DefaultDirectorySubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { NppParameters& nppParam = NppParameters::getInstance(); NppGUI & nppGUI = (NppGUI & )nppParam.getNppGUI(); @@ -2188,7 +2188,7 @@ INT_PTR CALLBACK DefaultDirectorySubDlg::run_dlgProc(UINT message, WPARAM wParam return FALSE; } -INT_PTR CALLBACK RecentFilesHistorySubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +intptr_t CALLBACK RecentFilesHistorySubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { NppParameters& nppParam = NppParameters::getInstance(); NppGUI & nppGUI = (NppGUI & )nppParam.getNppGUI(); @@ -2337,7 +2337,7 @@ INT_PTR CALLBACK RecentFilesHistorySubDlg::run_dlgProc(UINT message, WPARAM wPar return FALSE; } -INT_PTR CALLBACK LanguageSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK LanguageSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { NppParameters& nppParam = NppParameters::getInstance(); NppGUI & nppGUI = nppParam.getNppGUI(); @@ -2776,7 +2776,7 @@ INT_PTR CALLBACK LanguageSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM return FALSE; } -INT_PTR CALLBACK HighlightingSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM/* lParam*/) +intptr_t CALLBACK HighlightingSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM/* lParam*/) { NppParameters& nppParam = NppParameters::getInstance(); NppGUI & nppGUI = (NppGUI & )nppParam.getNppGUI(); @@ -2950,7 +2950,7 @@ INT_PTR CALLBACK HighlightingSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP return FALSE; } -INT_PTR CALLBACK PrintSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +intptr_t CALLBACK PrintSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { NppParameters& nppParam = NppParameters::getInstance(); NppGUI & nppGUI = (NppGUI & )nppParam.getNppGUI(); @@ -3303,7 +3303,7 @@ INT_PTR CALLBACK PrintSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) } -INT_PTR CALLBACK BackupSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK BackupSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { NppParameters& nppParam = NppParameters::getInstance(); NppGUI & nppGUI = nppParam.getNppGUI(); @@ -3534,7 +3534,7 @@ void BackupSubDlg::updateBackupGUI() } -INT_PTR CALLBACK AutoCompletionSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +intptr_t CALLBACK AutoCompletionSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { NppParameters& nppParam = NppParameters::getInstance(); NppGUI & nppGUI = nppParam.getNppGUI(); @@ -3885,7 +3885,7 @@ INT_PTR CALLBACK AutoCompletionSubDlg::run_dlgProc(UINT message, WPARAM wParam, } -INT_PTR CALLBACK MultiInstanceSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +intptr_t CALLBACK MultiInstanceSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { NppGUI & nppGUI = (NppParameters::getInstance()).getNppGUI(); switch (message) @@ -4088,7 +4088,7 @@ void DelimiterSubDlg::setWarningIfNeed() const ::SetDlgItemText(_hSelf, IDD_STATIC_WORDCHAR_WARNING, msg.c_str()); } -INT_PTR CALLBACK DelimiterSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK DelimiterSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { NppGUI & nppGUI = (NppParameters::getInstance()).getNppGUI(); switch (message) @@ -4297,7 +4297,7 @@ INT_PTR CALLBACK DelimiterSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA return FALSE; } -INT_PTR CALLBACK CloudAndLinkSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +intptr_t CALLBACK CloudAndLinkSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { NppParameters& nppParams = NppParameters::getInstance(); NppGUI & nppGUI = nppParams.getNppGUI(); @@ -4501,7 +4501,7 @@ INT_PTR CALLBACK CloudAndLinkSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP return FALSE; } -INT_PTR CALLBACK SearchEngineSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +intptr_t CALLBACK SearchEngineSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { NppParameters& nppParams = NppParameters::getInstance(); NppGUI & nppGUI = nppParams.getNppGUI(); @@ -4621,7 +4621,7 @@ INT_PTR CALLBACK SearchEngineSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP return FALSE; } -INT_PTR CALLBACK SearchingSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +intptr_t CALLBACK SearchingSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { NppParameters& nppParams = NppParameters::getInstance(); NppGUI& nppGUI = nppParams.getNppGUI(); diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.h b/PowerEditor/src/WinControls/Preference/preferenceDlg.h index 9b155ab3f..d13dfb19a 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.h +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.h @@ -30,7 +30,7 @@ public : MiscSubDlg() = default; private : - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); }; class GeneralSubDlg : public StaticDialog @@ -41,7 +41,7 @@ public : void disableTabbarAlternateIcons(); private : - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); }; class EditingSubDlg : public StaticDialog @@ -50,7 +50,7 @@ public : EditingSubDlg() = default; private : - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); void initScintParam(); }; @@ -71,7 +71,7 @@ private: ColourPicker* _pEdgeColorPicker = nullptr; ColourPicker* _pLinkColorPicker = nullptr; - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); void enableCustomizedColorCtrls(bool doEnable); void move2CtrlLeft(int ctrlID, HWND handle2Move, int handle2MoveWidth, int handle2MoveHeight); }; @@ -82,7 +82,7 @@ public : MarginsBorderEdgeSubDlg() = default; private : - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); void initScintParam(); }; @@ -104,7 +104,7 @@ private : ::SendDlgItemMessage(_hSelf, IDC_CHECK_OPENANSIASUTF8, BM_SETCHECK, BST_UNCHECKED, 0); ::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_OPENANSIASUTF8), doIt); }; - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); }; class DefaultDirectorySubDlg : public StaticDialog @@ -113,7 +113,7 @@ public : DefaultDirectorySubDlg() = default; private : - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); }; class RecentFilesHistorySubDlg : public StaticDialog @@ -128,7 +128,7 @@ private : URLCtrl _nbHistoryVal; URLCtrl _customLenVal; void setCustomLen(int val); - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); }; class LanguageSubDlg : public StaticDialog @@ -142,7 +142,7 @@ public : private : LexerStylerArray _lsArray; URLCtrl _tabSizeVal; - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); std::vector _langList; }; @@ -153,7 +153,7 @@ public : private : - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); }; @@ -163,7 +163,7 @@ public: SearchingSubDlg() = default; private: - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); }; struct strCouple { @@ -178,7 +178,7 @@ public : PrintSubDlg() = default; private : - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); std::vector varList; int _focusedEditCtrl = 0; }; @@ -190,7 +190,7 @@ public : private : void updateBackupGUI(); - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); }; @@ -200,7 +200,7 @@ public : AutoCompletionSubDlg() = default; private : URLCtrl _nbCharVal; - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); }; class MultiInstanceSubDlg : public StaticDialog @@ -210,7 +210,7 @@ public : private : const SYSTEMTIME _BTTF_time = {1985, 10, 6, 26, 16, 24, 42, 0}; - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); }; class DelimiterSubDlg : public StaticDialog @@ -228,7 +228,7 @@ private : RECT _closerLabelRect = { 0 }; HWND _tip = nullptr; - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); void detectSpace(const char *text2Check, int & nbSp, int & nbTab) const; generic_string getWarningText(size_t nbSp, size_t nbTab) const; void setWarningIfNeed() const; @@ -240,7 +240,7 @@ public : CloudAndLinkSubDlg() = default; private : - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); }; class SearchEngineSubDlg : public StaticDialog @@ -249,7 +249,7 @@ public : SearchEngineSubDlg() = default; private : - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); }; class PreferenceDlg : public StaticDialog @@ -283,7 +283,7 @@ public : virtual void destroy(); private : - INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); void makeCategoryList(); int32_t getIndexFromName(const TCHAR *name) const; void showDialogByIndex(size_t index) const; diff --git a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp index c2a395880..ab30cd781 100644 --- a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp +++ b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp @@ -39,7 +39,7 @@ ProjectPanel::~ProjectPanel() } } -INT_PTR CALLBACK ProjectPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK ProjectPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -65,13 +65,13 @@ INT_PTR CALLBACK ProjectPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM l tbButtons[0].iBitmap = I_IMAGENONE; tbButtons[0].fsState = TBSTATE_ENABLED; tbButtons[0].fsStyle = BTNS_BUTTON | BTNS_AUTOSIZE; - tbButtons[0].iString = (INT_PTR)workspace_entry.c_str(); + tbButtons[0].iString = (intptr_t)workspace_entry.c_str(); tbButtons[1].idCommand = IDB_EDIT_BTN; tbButtons[1].iBitmap = I_IMAGENONE; tbButtons[1].fsState = TBSTATE_ENABLED; tbButtons[1].fsStyle = BTNS_BUTTON | BTNS_AUTOSIZE; - tbButtons[1].iString = (INT_PTR)edit_entry.c_str(); + tbButtons[1].iString = (intptr_t)edit_entry.c_str(); SendMessage(_hToolbarMenu, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0); SendMessage(_hToolbarMenu, TB_ADDBUTTONS, sizeof(tbButtons) / sizeof(TBBUTTON), reinterpret_cast(&tbButtons)); @@ -1343,7 +1343,7 @@ void ProjectPanel::addFilesFromDirectory(HTREEITEM hTreeItem) } } -INT_PTR CALLBACK FileRelocalizerDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +intptr_t CALLBACK FileRelocalizerDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { switch (Message) { diff --git a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.h b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.h index 345e2da31..7bf49e3a6 100644 --- a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.h +++ b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.h @@ -132,7 +132,7 @@ protected: void setWorkSpaceDirty(bool isDirty); void popupMenuCmd(int cmdID); POINT getMenuDisplayPoint(int iButton); - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); bool buildTreeFrom(TiXmlNode *projectRoot, HTREEITEM hParentItem); void notified(LPNMHDR notification); void showContextMenu(int x, int y); @@ -162,7 +162,7 @@ public : }; protected : - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private : generic_string _fullFilePath; diff --git a/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp b/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp index 743c62f3e..ce100f8dd 100644 --- a/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp +++ b/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp @@ -217,7 +217,7 @@ HINSTANCE Command::run(HWND hWnd, const TCHAR* cwd) // As per MSDN (https://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx) // If the function succeeds, it returns a value greater than 32. // If the function fails, it returns an error value that indicates the cause of the failure. - int retResult = static_cast(reinterpret_cast(res)); + int retResult = static_cast(reinterpret_cast(res)); if (retResult <= 32) { generic_string errorMsg; @@ -238,7 +238,7 @@ HINSTANCE Command::run(HWND hWnd, const TCHAR* cwd) return res; } -INT_PTR CALLBACK RunDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK RunDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -309,7 +309,7 @@ INT_PTR CALLBACK RunDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) _cmdLine = cmd; HINSTANCE hInst = run(_hParent); - if (reinterpret_cast(hInst) > 32) + if (reinterpret_cast(hInst) > 32) { addTextToCombo(_cmdLine.c_str()); display(false); diff --git a/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.h b/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.h index 5adeb0b9b..949fb4464 100644 --- a/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.h +++ b/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.h @@ -59,7 +59,7 @@ public : virtual void destroy() {}; protected : - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private : void addTextToCombo(const TCHAR *txt2Add) const; diff --git a/PowerEditor/src/WinControls/StaticDialog/StaticDialog.cpp b/PowerEditor/src/WinControls/StaticDialog/StaticDialog.cpp index a292fc521..07077921e 100644 --- a/PowerEditor/src/WinControls/StaticDialog/StaticDialog.cpp +++ b/PowerEditor/src/WinControls/StaticDialog/StaticDialog.cpp @@ -234,7 +234,7 @@ void StaticDialog::create(int dialogID, bool isRTL, bool msgDestParent) ::SendMessage(msgDestParent ? _hParent : (::GetParent(_hParent)), NPPM_MODELESSDIALOG, MODELESSDIALOGADD, reinterpret_cast(_hSelf)); } -INT_PTR CALLBACK StaticDialog::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK StaticDialog::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { diff --git a/PowerEditor/src/WinControls/StaticDialog/StaticDialog.h b/PowerEditor/src/WinControls/StaticDialog/StaticDialog.h index e1ecab975..9d89b099e 100644 --- a/PowerEditor/src/WinControls/StaticDialog/StaticDialog.h +++ b/PowerEditor/src/WinControls/StaticDialog/StaticDialog.h @@ -69,8 +69,8 @@ public : protected: RECT _rc = { 0 }; - static INT_PTR CALLBACK dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) = 0; + static intptr_t CALLBACK dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) = 0; HGLOBAL makeRTLResource(int dialogID, DLGTEMPLATE **ppMyDlgTemplate); }; diff --git a/PowerEditor/src/WinControls/TaskList/TaskListDlg.cpp b/PowerEditor/src/WinControls/TaskList/TaskListDlg.cpp index a86bb4f2a..37b8e5e24 100644 --- a/PowerEditor/src/WinControls/TaskList/TaskListDlg.cpp +++ b/PowerEditor/src/WinControls/TaskList/TaskListDlg.cpp @@ -56,7 +56,7 @@ LRESULT CALLBACK hookProc(int nCode, WPARAM wParam, LPARAM lParam) return static_cast(::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_TASKLIST_DLG), _hParent, dlgProc, reinterpret_cast(this))); } -INT_PTR CALLBACK TaskListDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK TaskListDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { switch (Message) { diff --git a/PowerEditor/src/WinControls/TaskList/TaskListDlg.h b/PowerEditor/src/WinControls/TaskList/TaskListDlg.h index e023ccea5..8abba040a 100644 --- a/PowerEditor/src/WinControls/TaskList/TaskListDlg.h +++ b/PowerEditor/src/WinControls/TaskList/TaskListDlg.h @@ -61,7 +61,7 @@ public : virtual void destroy() {}; protected : - INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); private : TaskList _taskList; diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp index c86d96cc0..caa04c881 100644 --- a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp @@ -65,7 +65,7 @@ void VerticalFileSwitcher::startColumnSort() updateHeaderArrow(); } -INT_PTR CALLBACK VerticalFileSwitcher::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK VerticalFileSwitcher::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h index 4ff944fb1..fb9f06f35 100644 --- a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h @@ -103,7 +103,7 @@ public: protected: HMENU _hGlobalMenu = NULL; - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); void initPopupMenus(); void popupMenuCmd(int cmdID); private: diff --git a/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.cpp b/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.cpp index 5dcc5e56a..400f20a7a 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.cpp +++ b/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.cpp @@ -48,7 +48,7 @@ LRESULT SizeableDlg::onWinMgr(WPARAM, LPARAM) return 0; } -INT_PTR CALLBACK SizeableDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK SizeableDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { diff --git a/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.h b/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.h index a674a4fb5..a399285f1 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.h +++ b/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.h @@ -29,7 +29,7 @@ public: protected: CWinMgr _winMgr; // window manager - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); virtual BOOL onInitDialog(); virtual void onSize(UINT nType, int cx, int cy); virtual void onGetMinMaxInfo(MINMAXINFO* lpMMI); diff --git a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp index 245ba5c05..d6d179c55 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp +++ b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp @@ -262,7 +262,7 @@ void WindowsDlg::init(HINSTANCE hInst, HWND parent) _pTab = NULL; } -INT_PTR CALLBACK WindowsDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK WindowsDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { diff --git a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h index 8d875a10e..2cdb18cd8 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h +++ b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h @@ -59,7 +59,7 @@ public : void doRefresh(bool invalidate = false); protected : - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); virtual BOOL onInitDialog(); virtual void onSize(UINT nType, int cx, int cy); virtual void onGetMinMaxInfo(MINMAXINFO* lpMMI); diff --git a/PowerEditor/src/WinControls/shortcut/RunMacroDlg.cpp b/PowerEditor/src/WinControls/shortcut/RunMacroDlg.cpp index c0fd56075..569f5ad04 100644 --- a/PowerEditor/src/WinControls/shortcut/RunMacroDlg.cpp +++ b/PowerEditor/src/WinControls/shortcut/RunMacroDlg.cpp @@ -40,7 +40,7 @@ void RunMacroDlg::initMacroList() _macroIndex = 0; } -INT_PTR CALLBACK RunMacroDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +intptr_t CALLBACK RunMacroDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { switch (message) { diff --git a/PowerEditor/src/WinControls/shortcut/RunMacroDlg.h b/PowerEditor/src/WinControls/shortcut/RunMacroDlg.h index 147905473..54709a1c4 100644 --- a/PowerEditor/src/WinControls/shortcut/RunMacroDlg.h +++ b/PowerEditor/src/WinControls/shortcut/RunMacroDlg.h @@ -54,7 +54,7 @@ public : int getMacro2Exec() const; private : - virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); void check(int); int _mode = RM_RUN_MULTI; diff --git a/PowerEditor/src/WinControls/shortcut/shortcut.cpp b/PowerEditor/src/WinControls/shortcut/shortcut.cpp index 04ab6b798..f3a62188f 100644 --- a/PowerEditor/src/WinControls/shortcut/shortcut.cpp +++ b/PowerEditor/src/WinControls/shortcut/shortcut.cpp @@ -369,7 +369,7 @@ void Shortcut::updateConflictState(const bool endSession) const ::ShowWindow(::GetDlgItem(_hSelf, IDC_CONFLICT_STATIC), isConflict ? SW_SHOW : SW_HIDE); } -INT_PTR CALLBACK Shortcut::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK Shortcut::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { switch (Message) { @@ -1042,7 +1042,7 @@ void ScintillaKeyMap::updateListItem(int index) ::SendDlgItemMessage(_hSelf, IDC_LIST_KEYS, LB_DELETESTRING, index+1, 0); } -INT_PTR CALLBACK ScintillaKeyMap::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +intptr_t CALLBACK ScintillaKeyMap::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { switch (Message) diff --git a/PowerEditor/src/WinControls/shortcut/shortcut.h b/PowerEditor/src/WinControls/shortcut/shortcut.h index 8e0194354..0fd0ae433 100644 --- a/PowerEditor/src/WinControls/shortcut/shortcut.h +++ b/PowerEditor/src/WinControls/shortcut/shortcut.h @@ -120,7 +120,7 @@ public: return !(a == b); }; - virtual INT_PTR doDialog() + virtual intptr_t doDialog() { return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_SHORTCUT_DLG), _hParent, dlgProc, reinterpret_cast(this)); }; @@ -174,7 +174,7 @@ public: protected : KeyCombo _keyCombo; - virtual INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + virtual intptr_t CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); bool _canModifyName = false; TCHAR _name[nameLenMax] = {'\0'}; //normal name is plain text (for display purposes) TCHAR _menuName[nameLenMax] = { '\0' }; //menu name has ampersands for quick keys @@ -227,7 +227,7 @@ public: generic_string toString() const; generic_string toString(size_t index) const; - INT_PTR doDialog() + intptr_t doDialog() { return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_SHORTCUTSCINT_DLG), _hParent, dlgProc, reinterpret_cast(this)); }; @@ -264,7 +264,7 @@ private: void showCurrentSettings(); void updateListItem(int index); protected : - INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + intptr_t CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); }; diff --git a/PowerEditor/src/lesDlgs.cpp b/PowerEditor/src/lesDlgs.cpp index c78381623..656a2538f 100644 --- a/PowerEditor/src/lesDlgs.cpp +++ b/PowerEditor/src/lesDlgs.cpp @@ -73,7 +73,7 @@ int ValueDlg::reSizeValueBox() return newWidth - w; } -INT_PTR CALLBACK ValueDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +intptr_t CALLBACK ValueDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { switch (Message) { @@ -164,7 +164,7 @@ INT_PTR CALLBACK ValueDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) } -INT_PTR CALLBACK ButtonDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +intptr_t CALLBACK ButtonDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { switch (Message) { diff --git a/PowerEditor/src/lesDlgs.h b/PowerEditor/src/lesDlgs.h index 5260a2e0d..db7cbc5d3 100644 --- a/PowerEditor/src/lesDlgs.h +++ b/PowerEditor/src/lesDlgs.h @@ -35,7 +35,7 @@ public : void destroy() {}; protected : - INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM); + intptr_t CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM); private : int _nbNumber = DEFAULT_NB_NUMBER; @@ -80,7 +80,7 @@ public : }; protected : - INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM); + intptr_t CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM); int _buttonStatus = buttonStatus_nada; }; diff --git a/PowerEditor/src/tools/NppShell/src/NppShell.cpp b/PowerEditor/src/tools/NppShell/src/NppShell.cpp index 5ae94796f..4a4ff9e66 100755 --- a/PowerEditor/src/tools/NppShell/src/NppShell.cpp +++ b/PowerEditor/src/tools/NppShell/src/NppShell.cpp @@ -49,7 +49,7 @@ BOOL UnregisterServer(); void MsgBox(LPCTSTR lpszMsg); void MsgBoxError(LPCTSTR lpszMsg); BOOL CheckNpp(LPCTSTR path); -INT_PTR CALLBACK DlgProcSettings(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); +intptr_t CALLBACK DlgProcSettings(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); void InvalidateIcon(HICON * iconSmall, HICON * iconLarge); #ifdef UNICODE @@ -257,7 +257,7 @@ BOOL CheckNpp(LPCTSTR path) { return TRUE; } -INT_PTR CALLBACK DlgProcSettings(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { +intptr_t CALLBACK DlgProcSettings(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { static TCHAR customCommand[MAX_PATH] = {0}; static TCHAR customText[TITLE_SIZE] = {0}; static TCHAR szKeyTemp[MAX_PATH + GUID_STRING_SIZE]; diff --git a/scintilla/include/Sci_Position.h b/scintilla/include/Sci_Position.h index c7dbeee63..bad91b449 100644 --- a/scintilla/include/Sci_Position.h +++ b/scintilla/include/Sci_Position.h @@ -20,11 +20,7 @@ typedef size_t Sci_PositionU; // For Sci_CharacterRange which is defined as long to be compatible with Win32 CHARRANGE -#ifdef _WIN64 -typedef long long Sci_PositionCR; -#else -typedef long Sci_PositionCR; -#endif +typedef intptr_t Sci_PositionCR; #ifdef _WIN32 #define SCI_METHOD __stdcall