From dbb43a729f2577426b1ef6004aed219b864fd93f Mon Sep 17 00:00:00 2001 From: NN Date: Mon, 1 Jun 2015 21:30:41 +0300 Subject: [PATCH] DlgProc returns INT_PTR and not BOOL. Use correct prototype and remove casts. See https://msdn.microsoft.com/en-us/library/windows/desktop/ms645469(v=vs.85).aspx --- PowerEditor/src/MISC/RegExt/regExtDlg.cpp | 6 ++-- PowerEditor/src/MISC/RegExt/regExtDlg.h | 2 +- .../src/ScitillaComponent/FindReplaceDlg.cpp | 6 ++-- .../src/ScitillaComponent/FindReplaceDlg.h | 6 ++-- .../src/ScitillaComponent/GoToLineDlg.cpp | 2 +- .../src/ScitillaComponent/GoToLineDlg.h | 2 +- .../ScitillaComponent/UserDefineDialog.cpp | 16 +++++----- .../src/ScitillaComponent/UserDefineDialog.h | 20 ++++++------- .../src/ScitillaComponent/columnEditor.cpp | 2 +- .../src/ScitillaComponent/columnEditor.h | 2 +- .../src/WinControls/AboutDlg/AboutDlg.h | 2 +- .../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 | 4 +-- .../WinControls/ColourPicker/WordStyleDlg.h | 6 ++-- .../WinControls/DockingWnd/DockingCont.cpp | 2 +- .../src/WinControls/DockingWnd/DockingCont.h | 2 +- .../DockingWnd/DockingDlgInterface.h | 2 +- .../WinControls/DocumentMap/documentMap.cpp | 8 ++--- .../src/WinControls/DocumentMap/documentMap.h | 8 ++--- .../FindCharsInRange/FindCharsInRange.cpp | 2 +- .../FindCharsInRange/FindCharsInRange.h | 2 +- .../FunctionList/functionListPanel.cpp | 4 +-- .../FunctionList/functionListPanel.h | 2 +- .../src/WinControls/Grid/ShortcutMapper.cpp | 2 +- .../src/WinControls/Grid/ShortcutMapper.h | 6 ++-- .../OpenSaveFileDialog/FileDialog.cpp | 2 +- .../WinControls/Preference/preferenceDlg.cpp | 30 +++++++++---------- .../WinControls/Preference/preferenceDlg.h | 30 +++++++++---------- .../WinControls/ProjectPanel/ProjectPanel.cpp | 8 ++--- .../WinControls/ProjectPanel/ProjectPanel.h | 4 +-- .../StaticDialog/RunDlg/RunDlg.cpp | 2 +- .../WinControls/StaticDialog/RunDlg/RunDlg.h | 2 +- .../WinControls/StaticDialog/StaticDialog.cpp | 6 ++-- .../WinControls/StaticDialog/StaticDialog.h | 4 +-- .../src/WinControls/TaskList/TaskListDlg.cpp | 6 ++-- .../src/WinControls/TaskList/TaskListDlg.h | 2 +- .../src/WinControls/ToolTip/ToolTip.cpp | 2 +- .../VerticalFileSwitcher.cpp | 2 +- .../VerticalFileSwitcher.h | 2 +- .../WinControls/WindowsDlg/SizeableDlg.cpp | 2 +- .../src/WinControls/WindowsDlg/SizeableDlg.h | 2 +- .../src/WinControls/WindowsDlg/WindowsDlg.cpp | 4 +-- .../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 | 8 ++--- PowerEditor/src/lesDlgs.h | 4 +-- 54 files changed, 136 insertions(+), 136 deletions(-) diff --git a/PowerEditor/src/MISC/RegExt/regExtDlg.cpp b/PowerEditor/src/MISC/RegExt/regExtDlg.cpp index 41015a2a..aab8af92 100644 --- a/PowerEditor/src/MISC/RegExt/regExtDlg.cpp +++ b/PowerEditor/src/MISC/RegExt/regExtDlg.cpp @@ -56,14 +56,14 @@ void RegExtDlg::doDialog(bool isRTL) { DLGTEMPLATE *pMyDlgTemplate = NULL; HGLOBAL hMyDlgTemplate = makeRTLResource(IDD_REGEXT_BOX, &pMyDlgTemplate); - ::DialogBoxIndirectParam(_hInst, pMyDlgTemplate, _hParent, (DLGPROC)dlgProc, (LPARAM)this); + ::DialogBoxIndirectParam(_hInst, pMyDlgTemplate, _hParent, dlgProc, (LPARAM)this); ::GlobalFree(hMyDlgTemplate); } else - ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_REGEXT_BOX), _hParent, (DLGPROC)dlgProc, (LPARAM)this); + ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_REGEXT_BOX), _hParent, dlgProc, (LPARAM)this); }; -BOOL CALLBACK RegExtDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +INT_PTR 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 2ef81778..bf37948a 100644 --- a/PowerEditor/src/MISC/RegExt/regExtDlg.h +++ b/PowerEditor/src/MISC/RegExt/regExtDlg.h @@ -46,7 +46,7 @@ public : private : bool _isCustomize; - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); void getRegisteredExts(); void getDefSupportedExts(); diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index 39ba9980..8f9827d5 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -564,7 +564,7 @@ void Finder::gotoNextFoundResult(int direction) } } -BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -2595,7 +2595,7 @@ void Finder::setFinderStyle() _scintView.execute(SCI_COLOURISE, 0, -1); } -BOOL CALLBACK Finder::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK Finder::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -2726,7 +2726,7 @@ void FindIncrementDlg::display(bool toShow) const _pRebar->setIDVisible(_rbBand.wID, toShow); } -BOOL CALLBACK FindIncrementDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK FindIncrementDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h index 3d21ee18..2797e88f 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h @@ -151,7 +151,7 @@ public: void DeleteResult(); protected : - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); bool notify(SCNotification *notification); private: @@ -301,7 +301,7 @@ public : protected : - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); void addText2Combo(const TCHAR * txt2add, HWND comboID, bool isUTF8 = false); generic_string getTextFromCombo(HWND hCombo, bool isUnicode = false) const; static LONG originalFinderProc; @@ -399,7 +399,7 @@ private : ReBar * _pRebar; REBARBANDINFO _rbBand; - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); void markSelectedTextInc(bool enable, FindOption *opt = NULL); }; diff --git a/PowerEditor/src/ScitillaComponent/GoToLineDlg.cpp b/PowerEditor/src/ScitillaComponent/GoToLineDlg.cpp index 55375f06..79a88bf6 100644 --- a/PowerEditor/src/ScitillaComponent/GoToLineDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/GoToLineDlg.cpp @@ -30,7 +30,7 @@ #include "GoToLineDlg.h" -BOOL CALLBACK GoToLineDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK GoToLineDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { switch (message) { diff --git a/PowerEditor/src/ScitillaComponent/GoToLineDlg.h b/PowerEditor/src/ScitillaComponent/GoToLineDlg.h index 759b6c8b..12d21a1b 100644 --- a/PowerEditor/src/ScitillaComponent/GoToLineDlg.h +++ b/PowerEditor/src/ScitillaComponent/GoToLineDlg.h @@ -68,7 +68,7 @@ public : protected : enum mode {go2line, go2offsset}; mode _mode; - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private : diff --git a/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp b/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp index 1485d8b1..ce68cb1c 100644 --- a/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp +++ b/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp @@ -60,7 +60,7 @@ bool SharedParametersDialog::setPropertyByCheck(HWND hwnd, WPARAM id, bool & boo return TRUE; } -BOOL CALLBACK SharedParametersDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM /*lParam*/) +INT_PTR CALLBACK SharedParametersDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM /*lParam*/) { switch (Message) { @@ -87,7 +87,7 @@ BOOL CALLBACK SharedParametersDialog::run_dlgProc(UINT Message, WPARAM wParam, L return FALSE; } -BOOL CALLBACK FolderStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK FolderStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { switch (Message) { @@ -252,7 +252,7 @@ void FolderStyleDialog::retrieve(TCHAR *dest, const TCHAR *toRetrieve, TCHAR *pr dest[j++] = '\0'; } -BOOL CALLBACK KeyWordsStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK KeyWordsStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { switch (Message) { @@ -393,7 +393,7 @@ void KeyWordsStyleDialog::updateDlg() ::SendDlgItemMessage(_hSelf, IDC_KEYWORD8_PREFIX_CHECK, BM_SETCHECK, _pUserLang->_isPrefix[7], 0); } -BOOL CALLBACK CommentStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK CommentStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { switch (Message) { @@ -698,7 +698,7 @@ void SymbolsStyleDialog::updateDlg() ::SendDlgItemMessage(_hSelf, IDC_OPERATOR2_EDIT, WM_SETTEXT, 0, (LPARAM)(_pUserLang->_keywordLists[SCE_USER_KWLIST_OPERATORS2])); } -BOOL CALLBACK SymbolsStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK SymbolsStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { switch (Message) { @@ -1039,7 +1039,7 @@ void UserDefineDialog::updateDlg() _symbolsStyleDlg.updateDlg(); } -BOOL CALLBACK UserDefineDialog::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK UserDefineDialog::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { NppParameters *pNppParam = NppParameters::getInstance(); switch (message) @@ -1507,7 +1507,7 @@ BOOL CALLBACK UserDefineDialog::run_dlgProc(UINT message, WPARAM wParam, LPARAM return FALSE; } -BOOL CALLBACK StringDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK StringDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { switch (Message) { @@ -1549,7 +1549,7 @@ BOOL CALLBACK StringDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) } } -BOOL CALLBACK StylerDlg::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK StylerDlg::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { StylerDlg * dlg = (StylerDlg *)::GetProp(hwnd, TEXT("Styler dialog prop")); NppParameters *pNppParam = NppParameters::getInstance(); diff --git a/PowerEditor/src/ScitillaComponent/UserDefineDialog.h b/PowerEditor/src/ScitillaComponent/UserDefineDialog.h index c8146f59..26bd6302 100644 --- a/PowerEditor/src/ScitillaComponent/UserDefineDialog.h +++ b/PowerEditor/src/ScitillaComponent/UserDefineDialog.h @@ -275,7 +275,7 @@ protected : //Shared data static UserLangContainer *_pUserLang; static ScintillaEditView *_pScintilla; - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); bool setPropertyByCheck(HWND hwnd, WPARAM id, bool & bool2set); virtual void setKeywords2List(int ctrlID) = 0; }; @@ -286,7 +286,7 @@ public: FolderStyleDialog(): SharedParametersDialog() {}; void updateDlg(); protected : - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); void setKeywords2List(int ctrlID); private : void convertTo(TCHAR *dest, const TCHAR *toConvert, TCHAR *prefix) const; @@ -300,7 +300,7 @@ public: KeyWordsStyleDialog(): SharedParametersDialog() {}; void updateDlg(); protected : - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); void setKeywords2List(int id); }; @@ -310,7 +310,7 @@ public : CommentStyleDialog(): SharedParametersDialog() {}; void updateDlg(); protected : - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); void setKeywords2List(int id); private : void convertTo(TCHAR *dest, const TCHAR *toConvert, TCHAR *prefix) const; @@ -323,7 +323,7 @@ public : SymbolsStyleDialog(): SharedParametersDialog() {}; void updateDlg(); protected : - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); void setKeywords2List(int id); private : void convertTo(TCHAR *dest, const TCHAR *toConvert, TCHAR *prefix) const; @@ -390,7 +390,7 @@ public : _ctrlTab.renameTab(index, name2set); }; protected : - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private : ControlsTab _ctrlTab; WindowVector _wVector; @@ -429,11 +429,11 @@ public : _txtLen = txtLen; }; long doDialog() { - return long(::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_STRING_DLG), _hParent, (DLGPROC)dlgProc, (LPARAM)this)); + return long(::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_STRING_DLG), _hParent, dlgProc, (LPARAM)this)); }; virtual void destroy() {}; protected : - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM); private : generic_string _title; generic_string _textValue; @@ -459,10 +459,10 @@ public: }; long doDialog() { - return long (::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_STYLER_POPUP_DLG), _parent, (DLGPROC)dlgProc, (LPARAM)this)); + return long (::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_STYLER_POPUP_DLG), _parent, dlgProc, (LPARAM)this)); }; - static BOOL CALLBACK dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); + static INT_PTR CALLBACK dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); public: HINSTANCE _hInst; HWND _parent; diff --git a/PowerEditor/src/ScitillaComponent/columnEditor.cpp b/PowerEditor/src/ScitillaComponent/columnEditor.cpp index a4809bce..32236560 100644 --- a/PowerEditor/src/ScitillaComponent/columnEditor.cpp +++ b/PowerEditor/src/ScitillaComponent/columnEditor.cpp @@ -49,7 +49,7 @@ void ColumnEditorDlg::display(bool toShow) const ::SetFocus(::GetDlgItem(_hSelf, ID_GOLINE_EDIT)); } -BOOL CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { switch (message) { diff --git a/PowerEditor/src/ScitillaComponent/columnEditor.h b/PowerEditor/src/ScitillaComponent/columnEditor.h index c7632713..9ce5c37a 100644 --- a/PowerEditor/src/ScitillaComponent/columnEditor.h +++ b/PowerEditor/src/ScitillaComponent/columnEditor.h @@ -66,7 +66,7 @@ public : UCHAR getFormat(); protected : - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private : diff --git a/PowerEditor/src/WinControls/AboutDlg/AboutDlg.h b/PowerEditor/src/WinControls/AboutDlg/AboutDlg.h index 8f7760c5..44aff6fb 100644 --- a/PowerEditor/src/WinControls/AboutDlg/AboutDlg.h +++ b/PowerEditor/src/WinControls/AboutDlg/AboutDlg.h @@ -69,7 +69,7 @@ public : }; protected : - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private : URLCtrl _emailLink; diff --git a/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.cpp b/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.cpp index 7a1e8673..40c070b0 100644 --- a/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.cpp +++ b/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.cpp @@ -35,7 +35,7 @@ void AnsiCharPanel::switchEncoding() _listView.resetValues(codepage); } -BOOL CALLBACK AnsiCharPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR 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 c1eef333..f4735fb5 100644 --- a/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.h +++ b/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.h @@ -74,7 +74,7 @@ public: }; protected: - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private: ScintillaEditView **_ppEditView; diff --git a/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.cpp b/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.cpp index 15848ebc..86fb96f0 100644 --- a/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.cpp +++ b/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.cpp @@ -196,7 +196,7 @@ void ClipboardHistoryPanel::drawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) ::DrawText(lpDrawItemStruct->hDC, ptStr, lstrlen(ptStr), &(lpDrawItemStruct->rcItem), DT_SINGLELINE | DT_VCENTER | DT_LEFT); } -BOOL CALLBACK ClipboardHistoryPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR 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 b261f498..0f112dbf 100644 --- a/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.h +++ b/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.h @@ -99,7 +99,7 @@ public: void drawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); protected: - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private: ScintillaEditView **_ppEditView; diff --git a/PowerEditor/src/WinControls/ColourPicker/ColourPopup.cpp b/PowerEditor/src/WinControls/ColourPicker/ColourPopup.cpp index 12bc83a5..34224580 100644 --- a/PowerEditor/src/WinControls/ColourPicker/ColourPopup.cpp +++ b/PowerEditor/src/WinControls/ColourPicker/ColourPopup.cpp @@ -42,7 +42,7 @@ DWORD colourItems[] = { void ColourPopup::create(int dialogID) { - _hSelf = ::CreateDialogParam(_hInst, MAKEINTRESOURCE(dialogID), _hParent, (DLGPROC)dlgProc, (LPARAM)this); + _hSelf = ::CreateDialogParam(_hInst, MAKEINTRESOURCE(dialogID), _hParent, dlgProc, (LPARAM)this); if (!_hSelf) { @@ -52,7 +52,7 @@ void ColourPopup::create(int dialogID) display(); } -BOOL CALLBACK ColourPopup::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK ColourPopup::dlgProc(HWND hwnd, 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 08ea6921..6fda0992 100644 --- a/PowerEditor/src/WinControls/ColourPicker/ColourPopup.h +++ b/PowerEditor/src/WinControls/ColourPicker/ColourPopup.h @@ -76,8 +76,8 @@ private : COLORREF _colour; //bool isColourChooserLaunched; - static BOOL CALLBACK dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); - BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + static INT_PTR CALLBACK dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); }; #endif //COLOUR_POPUP_H diff --git a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp index f9fdbf2a..03608470 100644 --- a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp +++ b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp @@ -34,7 +34,7 @@ using namespace std; -BOOL CALLBACK ColourStaticTextHooker::colourStaticProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) +LRESULT CALLBACK ColourStaticTextHooker::colourStaticProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) { switch(Message) { @@ -79,7 +79,7 @@ void WordStyleDlg::updateGlobalOverrideCtrls() ::SendDlgItemMessage(_hSelf, IDC_GLOBAL_UNDERLINE_CHECK, BM_SETCHECK, nppGUI._globalOverride.enableUnderLine, 0); } -BOOL CALLBACK WordStyleDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +INT_PTR 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 8df97f7b..66bcb0ed 100644 --- a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.h +++ b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.h @@ -66,11 +66,11 @@ private : COLORREF _colour; WNDPROC _oldProc; - static BOOL CALLBACK staticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){ + static LRESULT CALLBACK staticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){ ColourStaticTextHooker *pColourStaticTextHooker = reinterpret_cast(::GetWindowLongPtr(hwnd, GWL_USERDATA)); return pColourStaticTextHooker->colourStaticProc(hwnd, message, wParam, lParam); }; - BOOL CALLBACK colourStaticProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam); + LRESULT CALLBACK colourStaticProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam); }; class WordStyleDlg : public StaticDialog @@ -164,7 +164,7 @@ private : //bool _isSync; bool _isShownGOCtrls; - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR 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 619176b4..1e120db9 100644 --- a/PowerEditor/src/WinControls/DockingWnd/DockingCont.cpp +++ b/PowerEditor/src/WinControls/DockingWnd/DockingCont.cpp @@ -900,7 +900,7 @@ void DockingCont::drawTabItem(DRAWITEMSTRUCT *pDrawItemStruct) //---------------------------------------------- // Process function of dialog // -BOOL CALLBACK DockingCont::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +INT_PTR 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 e3a05c99..a0f28125 100644 --- a/PowerEditor/src/WinControls/DockingWnd/DockingCont.h +++ b/PowerEditor/src/WinControls/DockingWnd/DockingCont.h @@ -163,7 +163,7 @@ protected : return (((DockingCont *)(::GetWindowLongPtr(hwnd, GWL_USERDATA)))->runProcTab(hwnd, Message, wParam, lParam)); }; - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR 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 cefacb48..8c1208d2 100644 --- a/PowerEditor/src/WinControls/DockingWnd/DockingDlgInterface.h +++ b/PowerEditor/src/WinControls/DockingWnd/DockingDlgInterface.h @@ -103,7 +103,7 @@ public: }; protected : - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM, LPARAM lParam) + virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM, LPARAM lParam) { switch (message) { diff --git a/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp b/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp index 11f50af0..af8b61d0 100644 --- a/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp +++ b/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp @@ -266,7 +266,7 @@ void DocumentMap::redraw(bool) const _pScintillaEditView->execute(SCI_COLOURISE, 0, -1); } -BOOL CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -433,7 +433,7 @@ void ViewZoneDlg::doDialog() display(); }; -BOOL CALLBACK ViewZoneDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK ViewZoneDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -494,7 +494,7 @@ BOOL CALLBACK ViewZoneDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara return FALSE; } -BOOL CALLBACK ViewZoneDlg::canvasStaticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +LRESULT CALLBACK ViewZoneDlg::canvasStaticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { ViewZoneDlg *pViewZoneDlg = reinterpret_cast(::GetWindowLongPtr(hwnd, GWL_USERDATA)); if (!pViewZoneDlg) @@ -502,7 +502,7 @@ BOOL CALLBACK ViewZoneDlg::canvasStaticProc(HWND hwnd, UINT message, WPARAM wPar return pViewZoneDlg->canvas_runProc(hwnd, message, wParam, lParam); } -BOOL CALLBACK ViewZoneDlg::canvas_runProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +LRESULT CALLBACK ViewZoneDlg::canvas_runProc(HWND hwnd, 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 27b86e29..32e9132c 100644 --- a/PowerEditor/src/WinControls/DocumentMap/documentMap.h +++ b/PowerEditor/src/WinControls/DocumentMap/documentMap.h @@ -76,10 +76,10 @@ public : }; protected : - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); - static BOOL CALLBACK canvasStaticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); - BOOL CALLBACK canvas_runProc(HWND hwnd, 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); void drawPreviewZone(DRAWITEMSTRUCT *pdis); @@ -135,7 +135,7 @@ public: void changeTextDirection(bool isRTL); protected: - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); bool needToRecomputeWith(); int getEditorTextZoneWidth(); diff --git a/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.cpp b/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.cpp index 79716580..3cf856cb 100644 --- a/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.cpp +++ b/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.cpp @@ -30,7 +30,7 @@ #include "FindCharsInRange.h" #include "FindCharsInRange_rc.h" -BOOL CALLBACK FindCharsInRangeDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK FindCharsInRangeDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { switch (message) { diff --git a/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.h b/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.h index ba83a212..4c27c7ec 100644 --- a/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.h +++ b/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.h @@ -64,7 +64,7 @@ public : }; protected : - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private : ScintillaEditView **_ppEditView; diff --git a/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp b/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp index 2e2fd339..13ffea69 100644 --- a/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp +++ b/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp @@ -502,7 +502,7 @@ void FunctionListPanel::searchFuncAndSwitchView() } static WNDPROC oldFunclstToolbarProc = NULL; -static BOOL CALLBACK funclstToolbarProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +static LRESULT CALLBACK funclstToolbarProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -534,7 +534,7 @@ void FunctionListPanel::setSort(bool isEnabled) ::SendMessage(_hToolbarMenu, TB_SETBUTTONINFO, IDC_SORTBUTTON_FUNCLIST, (LPARAM)&tbbuttonInfo); } -BOOL CALLBACK FunctionListPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK FunctionListPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { diff --git a/PowerEditor/src/WinControls/FunctionList/functionListPanel.h b/PowerEditor/src/WinControls/FunctionList/functionListPanel.h index 9756c264..0d696d33 100644 --- a/PowerEditor/src/WinControls/FunctionList/functionListPanel.h +++ b/PowerEditor/src/WinControls/FunctionList/functionListPanel.h @@ -123,7 +123,7 @@ public: void searchFuncAndSwitchView(); protected: - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private: HWND _hToolbarMenu; diff --git a/PowerEditor/src/WinControls/Grid/ShortcutMapper.cpp b/PowerEditor/src/WinControls/Grid/ShortcutMapper.cpp index b384613b..e446fee9 100644 --- a/PowerEditor/src/WinControls/Grid/ShortcutMapper.cpp +++ b/PowerEditor/src/WinControls/Grid/ShortcutMapper.cpp @@ -169,7 +169,7 @@ void ShortcutMapper::fillOutBabyGrid() } } -BOOL CALLBACK ShortcutMapper::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR 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 5a41b30f..76cc4c14 100644 --- a/PowerEditor/src/WinControls/Grid/ShortcutMapper.h +++ b/PowerEditor/src/WinControls/Grid/ShortcutMapper.h @@ -69,17 +69,17 @@ public: { DLGTEMPLATE *pMyDlgTemplate = NULL; HGLOBAL hMyDlgTemplate = makeRTLResource(IDD_SHORTCUTMAPPER_DLG, &pMyDlgTemplate); - ::DialogBoxIndirectParam(_hInst, pMyDlgTemplate, _hParent, (DLGPROC)dlgProc, (LPARAM)this); + ::DialogBoxIndirectParam(_hInst, pMyDlgTemplate, _hParent, dlgProc, (LPARAM)this); ::GlobalFree(hMyDlgTemplate); } else - ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_SHORTCUTMAPPER_DLG), _hParent, (DLGPROC)dlgProc, (LPARAM)this); + ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_SHORTCUTMAPPER_DLG), _hParent, dlgProc, (LPARAM)this); }; void getClientRect(RECT & rc) const; void translateTab(int index, const TCHAR * newname); protected : - BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private: static const int maxTabName = 64; diff --git a/PowerEditor/src/WinControls/OpenSaveFileDialog/FileDialog.cpp b/PowerEditor/src/WinControls/OpenSaveFileDialog/FileDialog.cpp index ff5f093f..5d7089d1 100644 --- a/PowerEditor/src/WinControls/OpenSaveFileDialog/FileDialog.cpp +++ b/PowerEditor/src/WinControls/OpenSaveFileDialog/FileDialog.cpp @@ -276,7 +276,7 @@ static WNDPROC oldProc = NULL; static generic_string currentExt = TEXT(""); -static BOOL CALLBACK fileDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +static LRESULT CALLBACK fileDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp index d8f4d2ba..5171b5c0 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp @@ -92,7 +92,7 @@ int encodings[] = { 20866 }; -BOOL CALLBACK PreferenceDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK PreferenceDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { switch (Message) { @@ -304,7 +304,7 @@ void PreferenceDlg::destroy() _delimiterSettingsDlg.destroy(); } -BOOL CALLBACK BarsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK BarsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { NppParameters *pNppParam = NppParameters::getInstance(); @@ -584,7 +584,7 @@ void MarginsDlg::initScintParam() } -BOOL CALLBACK MarginsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK MarginsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { NppParameters *pNppParam = NppParameters::getInstance(); NppGUI & nppGUI = (NppGUI &)pNppParam->getNppGUI(); @@ -801,7 +801,7 @@ BOOL CALLBACK MarginsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam return FALSE; } -BOOL CALLBACK SettingsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK SettingsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { NppParameters *pNppParam = NppParameters::getInstance(); NppGUI & nppGUI = (NppGUI &)pNppParam->getNppGUI(); @@ -1089,7 +1089,7 @@ void RecentFilesHistoryDlg::setCustomLen(int val) ::ShowWindow(::GetDlgItem(_hSelf, IDC_CUSTOMIZELENGTHVAL_STATIC), val > 0?SW_SHOW:SW_HIDE); } -BOOL CALLBACK DefaultNewDocDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK DefaultNewDocDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { NppParameters *pNppParam = NppParameters::getInstance(); NppGUI & nppGUI = (NppGUI & )pNppParam->getNppGUI(); @@ -1278,7 +1278,7 @@ BOOL CALLBACK DefaultNewDocDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) return FALSE; } -BOOL CALLBACK DefaultDirectoryDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK DefaultDirectoryDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { NppParameters *pNppParam = NppParameters::getInstance(); NppGUI & nppGUI = (NppGUI & )pNppParam->getNppGUI(); @@ -1365,7 +1365,7 @@ BOOL CALLBACK DefaultDirectoryDlg::run_dlgProc(UINT Message, WPARAM wParam, LPAR return FALSE; } -BOOL CALLBACK RecentFilesHistoryDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK RecentFilesHistoryDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { NppParameters *pNppParam = NppParameters::getInstance(); NppGUI & nppGUI = (NppGUI & )pNppParam->getNppGUI(); @@ -1500,7 +1500,7 @@ BOOL CALLBACK RecentFilesHistoryDlg::run_dlgProc(UINT Message, WPARAM wParam, LP return FALSE; } -BOOL CALLBACK LangMenuDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK LangMenuDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { NppParameters *pNppParam = NppParameters::getInstance(); NppGUI & nppGUI = (NppGUI & )pNppParam->getNppGUI(); @@ -1688,7 +1688,7 @@ BOOL CALLBACK LangMenuDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPara return FALSE; } -BOOL CALLBACK TabSettings::run_dlgProc(UINT Message, WPARAM wParam, LPARAM/* lParam*/) +INT_PTR CALLBACK TabSettings::run_dlgProc(UINT Message, WPARAM wParam, LPARAM/* lParam*/) { NppParameters *pNppParam = NppParameters::getInstance(); NppGUI & nppGUI = (NppGUI & )pNppParam->getNppGUI(); @@ -1882,7 +1882,7 @@ void trim(generic_string & str) else str.erase(str.begin(), str.end()); }; -BOOL CALLBACK PrintSettingsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK PrintSettingsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { NppParameters *pNppParam = NppParameters::getInstance(); NppGUI & nppGUI = (NppGUI & )pNppParam->getNppGUI(); @@ -2185,7 +2185,7 @@ BOOL CALLBACK PrintSettingsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) } -BOOL CALLBACK BackupDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK BackupDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { NppParameters *pNppParam = NppParameters::getInstance(); NppGUI & nppGUI = (NppGUI &)pNppParam->getNppGUI(); @@ -2379,7 +2379,7 @@ void BackupDlg::updateBackupGUI() } -BOOL CALLBACK AutoCompletionDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK AutoCompletionDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { NppParameters *pNppParam = NppParameters::getInstance(); NppGUI & nppGUI = (NppGUI &)pNppParam->getNppGUI(); @@ -2647,7 +2647,7 @@ BOOL CALLBACK AutoCompletionDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM } -BOOL CALLBACK MultiInstDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK MultiInstDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { NppGUI & nppGUI = (NppGUI &)((NppParameters::getInstance())->getNppGUI()); switch (Message) @@ -2693,7 +2693,7 @@ BOOL CALLBACK MultiInstDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) return FALSE; } -BOOL CALLBACK DelimiterSettingsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK DelimiterSettingsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) { NppGUI & nppGUI = (NppGUI &)((NppParameters::getInstance())->getNppGUI()); switch (Message) @@ -2806,7 +2806,7 @@ BOOL CALLBACK DelimiterSettingsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPA return FALSE; } -BOOL CALLBACK SettingsOnCloudDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK SettingsOnCloudDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { NppGUI & nppGUI = (NppGUI &)((NppParameters::getInstance())->getNppGUI()); switch (Message) diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.h b/PowerEditor/src/WinControls/Preference/preferenceDlg.h index 045e8c22..e3ceb203 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.h +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.h @@ -59,7 +59,7 @@ public : SettingsDlg() {}; private : - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); }; class BarsDlg : public StaticDialog @@ -67,7 +67,7 @@ class BarsDlg : public StaticDialog public : BarsDlg() {}; private : - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); }; class MarginsDlg : public StaticDialog @@ -80,7 +80,7 @@ public : private : URLCtrl _verticalEdgeLineNbColVal; - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); void initScintParam(); }; @@ -103,7 +103,7 @@ private : ::SendDlgItemMessage(_hSelf, IDC_CHECK_OPENANSIASUTF8, BM_SETCHECK, BST_UNCHECKED, 0); ::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_OPENANSIASUTF8), doIt); }; - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); }; class DefaultDirectoryDlg : public StaticDialog @@ -112,7 +112,7 @@ public : DefaultDirectoryDlg() {}; private : - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); }; class RecentFilesHistoryDlg : public StaticDialog @@ -128,7 +128,7 @@ private : URLCtrl _customLenVal; std::vector _langList; void setCustomLen(int val); - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); }; class LangMenuDlg : public StaticDialog @@ -138,7 +138,7 @@ public : private : LexerStylerArray _lsArray; - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); std::vector _langList; }; @@ -152,7 +152,7 @@ public : private : URLCtrl _tabSizeVal; - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); }; @@ -167,7 +167,7 @@ class PrintSettingsDlg : public StaticDialog public : PrintSettingsDlg():_focusedEditCtrl(0), _selStart(0), _selEnd(0){}; private : - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); std::vector varList; int _focusedEditCtrl; DWORD _selStart; @@ -180,7 +180,7 @@ public : BackupDlg() {}; private : void updateBackupGUI(); - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); }; @@ -190,7 +190,7 @@ public : AutoCompletionDlg() {}; private : URLCtrl _nbCharVal; - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); }; class MultiInstDlg : public StaticDialog @@ -199,7 +199,7 @@ public : MultiInstDlg() {}; private : - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); }; class DelimiterSettingsDlg : public StaticDialog @@ -208,7 +208,7 @@ public : DelimiterSettingsDlg() {}; private : - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); POINT _singleLineModePoint, _multiLineModePoint; RECT _closerRect, _closerLabelRect; }; @@ -221,7 +221,7 @@ public : private : CloudChoice _initialCloudChoice; - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); void setCloudChoice(const char *choice); void removeCloudChoice(); }; @@ -255,7 +255,7 @@ public : virtual void destroy(); private : - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); void makeCategoryList(); void showDialogByIndex(int index); //ControlsTab _ctrlTab; diff --git a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp index f0372919..6ad8f856 100644 --- a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp +++ b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp @@ -48,7 +48,7 @@ #define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp)) #define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp)) -BOOL CALLBACK ProjectPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK ProjectPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -1165,7 +1165,7 @@ void ProjectPanel::addFilesFromDirectory(HTREEITEM hTreeItem) } } -BOOL CALLBACK FileRelocalizerDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK FileRelocalizerDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { switch (Message) { @@ -1209,10 +1209,10 @@ int FileRelocalizerDlg::doDialog(const TCHAR *fn, bool isRTL) { DLGTEMPLATE *pMyDlgTemplate = NULL; HGLOBAL hMyDlgTemplate = makeRTLResource(IDD_FILERELOCALIZER_DIALOG, &pMyDlgTemplate); - int result = ::DialogBoxIndirectParam(_hInst, pMyDlgTemplate, _hParent, (DLGPROC)dlgProc, (LPARAM)this); + int result = ::DialogBoxIndirectParam(_hInst, pMyDlgTemplate, _hParent, dlgProc, (LPARAM)this); ::GlobalFree(hMyDlgTemplate); return result; } - return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_FILERELOCALIZER_DIALOG), _hParent, (DLGPROC)dlgProc, (LPARAM)this); + return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_FILERELOCALIZER_DIALOG), _hParent, dlgProc, (LPARAM)this); } diff --git a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.h b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.h index 495dc7fb..60a0b6bd 100644 --- a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.h +++ b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.h @@ -134,7 +134,7 @@ protected: void setWorkSpaceDirty(bool isDirty); void popupMenuCmd(int cmdID); POINT getMenuDisplyPoint(int iButton); - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR 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); @@ -160,7 +160,7 @@ public : }; protected : - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR 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 f4b6526a..bb0070f3 100644 --- a/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp +++ b/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp @@ -196,7 +196,7 @@ HINSTANCE Command::run(HWND hWnd) return res; } -BOOL CALLBACK RunDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK RunDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) { switch (message) { diff --git a/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.h b/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.h index 18e6898a..40d92d9e 100644 --- a/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.h +++ b/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.h @@ -62,7 +62,7 @@ public : }; protected : - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR 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 b6035d2e..6290bccc 100644 --- a/PowerEditor/src/WinControls/StaticDialog/StaticDialog.cpp +++ b/PowerEditor/src/WinControls/StaticDialog/StaticDialog.cpp @@ -112,11 +112,11 @@ void StaticDialog::create(int dialogID, bool isRTL, bool msgDestParent) { DLGTEMPLATE *pMyDlgTemplate = NULL; HGLOBAL hMyDlgTemplate = makeRTLResource(dialogID, &pMyDlgTemplate); - _hSelf = ::CreateDialogIndirectParam(_hInst, pMyDlgTemplate, _hParent, (DLGPROC)dlgProc, (LPARAM)this); + _hSelf = ::CreateDialogIndirectParam(_hInst, pMyDlgTemplate, _hParent, dlgProc, (LPARAM)this); ::GlobalFree(hMyDlgTemplate); } else - _hSelf = ::CreateDialogParam(_hInst, MAKEINTRESOURCE(dialogID), _hParent, (DLGPROC)dlgProc, (LPARAM)this); + _hSelf = ::CreateDialogParam(_hInst, MAKEINTRESOURCE(dialogID), _hParent, dlgProc, (LPARAM)this); if (!_hSelf) { @@ -131,7 +131,7 @@ void StaticDialog::create(int dialogID, bool isRTL, bool msgDestParent) ::SendMessage(msgDestParent?_hParent:(::GetParent(_hParent)), NPPM_MODELESSDIALOG, MODELESSDIALOGADD, (WPARAM)_hSelf); } -BOOL CALLBACK StaticDialog::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR 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 f4e37456..3a2a02b6 100644 --- a/PowerEditor/src/WinControls/StaticDialog/StaticDialog.h +++ b/PowerEditor/src/WinControls/StaticDialog/StaticDialog.h @@ -97,8 +97,8 @@ public : protected : RECT _rc; - static BOOL CALLBACK dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) = 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; void alignWith(HWND handle, HWND handle2Align, PosAlign pos, POINT & point); HGLOBAL makeRTLResource(int dialogID, DLGTEMPLATE **ppMyDlgTemplate); diff --git a/PowerEditor/src/WinControls/TaskList/TaskListDlg.cpp b/PowerEditor/src/WinControls/TaskList/TaskListDlg.cpp index 67dda3cc..9ca4dc97 100644 --- a/PowerEditor/src/WinControls/TaskList/TaskListDlg.cpp +++ b/PowerEditor/src/WinControls/TaskList/TaskListDlg.cpp @@ -47,14 +47,14 @@ LRESULT CALLBACK hookProc(UINT nCode, WPARAM wParam, LPARAM lParam) { DLGTEMPLATE *pMyDlgTemplate = NULL; HGLOBAL hMyDlgTemplate = makeRTLResource(IDD_VALUE_DLG, &pMyDlgTemplate); - int result = ::DialogBoxIndirectParam(_hInst, pMyDlgTemplate, _hParent, (DLGPROC)dlgProc, (LPARAM)this); + int result = ::DialogBoxIndirectParam(_hInst, pMyDlgTemplate, _hParent, dlgProc, (LPARAM)this); ::GlobalFree(hMyDlgTemplate); return result; } - return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_TASKLIST_DLG), _hParent, (DLGPROC)dlgProc, (LPARAM)this); + return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_TASKLIST_DLG), _hParent, dlgProc, (LPARAM)this); } -BOOL CALLBACK TaskListDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) +INT_PTR 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 9362e736..e363c6b7 100644 --- a/PowerEditor/src/WinControls/TaskList/TaskListDlg.h +++ b/PowerEditor/src/WinControls/TaskList/TaskListDlg.h @@ -82,7 +82,7 @@ public : virtual void destroy() {}; protected : - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); private : TaskList _taskList; diff --git a/PowerEditor/src/WinControls/ToolTip/ToolTip.cpp b/PowerEditor/src/WinControls/ToolTip/ToolTip.cpp index 1d7024cb..0f130c9c 100644 --- a/PowerEditor/src/WinControls/ToolTip/ToolTip.cpp +++ b/PowerEditor/src/WinControls/ToolTip/ToolTip.cpp @@ -31,7 +31,7 @@ -LRESULT CALLBACK dlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK dlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); void ToolTip::init(HINSTANCE hInst, HWND hParent) diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp index a5532f58..7e5b51e1 100644 --- a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp @@ -54,7 +54,7 @@ int CALLBACK ListViewCompareProc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSo return (0 - result); }; -BOOL CALLBACK VerticalFileSwitcher::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR 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 5fb08eb4..d4e26728 100644 --- a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h @@ -104,7 +104,7 @@ public: }; protected: - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); private: VerticalFileSwitcherListView _fileListView; diff --git a/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.cpp b/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.cpp index 14adbcc7..a3a60387 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.cpp +++ b/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.cpp @@ -61,7 +61,7 @@ LRESULT SizeableDlg::onWinMgr(WPARAM, LPARAM) return 0; } -BOOL CALLBACK SizeableDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR 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 58e67031..170f1204 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.h +++ b/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.h @@ -47,7 +47,7 @@ public: protected: CWinMgr _winMgr; // window manager - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR 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 647f95c9..96ea4a79 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp +++ b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp @@ -218,7 +218,7 @@ void WindowsDlg::init(HINSTANCE hInst, HWND parent) _pTab = NULL; } -BOOL CALLBACK WindowsDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK WindowsDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -418,7 +418,7 @@ void WindowsDlg::updateButtonState() int WindowsDlg::doDialog(TiXmlNodeA *dlgNode) { _dlgNode = dlgNode; - return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_WINDOWS), _hParent, (DLGPROC)dlgProc, (LPARAM)this); + return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_WINDOWS), _hParent, dlgProc, (LPARAM)this); }; bool WindowsDlg::changeDlgLang() diff --git a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h index 48eac8b0..49c8632f 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h +++ b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h @@ -80,7 +80,7 @@ public : bool changeDlgLang(); protected : - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR 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 46b5957f..83789742 100644 --- a/PowerEditor/src/WinControls/shortcut/RunMacroDlg.cpp +++ b/PowerEditor/src/WinControls/shortcut/RunMacroDlg.cpp @@ -51,7 +51,7 @@ void RunMacroDlg::initMacroList() m_macroIndex = 0; } -BOOL CALLBACK RunMacroDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +INT_PTR 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 7c218012..9c2c59b7 100644 --- a/PowerEditor/src/WinControls/shortcut/RunMacroDlg.h +++ b/PowerEditor/src/WinControls/shortcut/RunMacroDlg.h @@ -65,7 +65,7 @@ public : int getMacro2Exec() const; private : - virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); void check(int); int m_Mode; diff --git a/PowerEditor/src/WinControls/shortcut/shortcut.cpp b/PowerEditor/src/WinControls/shortcut/shortcut.cpp index bd7b31d4..8fdb284b 100644 --- a/PowerEditor/src/WinControls/shortcut/shortcut.cpp +++ b/PowerEditor/src/WinControls/shortcut/shortcut.cpp @@ -354,7 +354,7 @@ void getNameStrFromCmd(DWORD cmd, generic_string & str) return; } -BOOL CALLBACK Shortcut::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK Shortcut::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { switch (Message) { @@ -769,7 +769,7 @@ void ScintillaKeyMap::updateListItem(int index) { ::SendDlgItemMessage(_hSelf, IDC_LIST_KEYS, LB_DELETESTRING, index+1, 0); } -BOOL CALLBACK ScintillaKeyMap::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK ScintillaKeyMap::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { switch (Message) diff --git a/PowerEditor/src/WinControls/shortcut/shortcut.h b/PowerEditor/src/WinControls/shortcut/shortcut.h index cb39f2cd..87c3e8b2 100644 --- a/PowerEditor/src/WinControls/shortcut/shortcut.h +++ b/PowerEditor/src/WinControls/shortcut/shortcut.h @@ -138,7 +138,7 @@ public: }; virtual int doDialog() { - return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_SHORTCUT_DLG), _hParent, (DLGPROC)dlgProc, (LPARAM)this); + return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_SHORTCUT_DLG), _hParent, dlgProc, (LPARAM)this); }; virtual bool isValid() const { //valid should only be used in cases where the shortcut isEnabled(). @@ -182,7 +182,7 @@ public: protected : KeyCombo _keyCombo; - virtual BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + virtual INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); bool _canModifyName; TCHAR _name[nameLenMax]; //normal name is plain text (for display purposes) TCHAR _menuName[nameLenMax]; //menu name has ampersands for quick keys @@ -231,7 +231,7 @@ public: generic_string toString(int index) const; int doDialog() { - return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_SHORTCUTSCINT_DLG), _hParent, (DLGPROC)dlgProc, (LPARAM)this); + return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_SHORTCUTSCINT_DLG), _hParent, dlgProc, (LPARAM)this); }; //only compares the internal KeyCombos, nothing else @@ -265,7 +265,7 @@ private: void showCurrentSettings(); void updateListItem(int index); protected : - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam); }; diff --git a/PowerEditor/src/lesDlgs.cpp b/PowerEditor/src/lesDlgs.cpp index 57947d89..ec5a281a 100644 --- a/PowerEditor/src/lesDlgs.cpp +++ b/PowerEditor/src/lesDlgs.cpp @@ -45,11 +45,11 @@ int ValueDlg::doDialog(POINT p, bool isRTL) { DLGTEMPLATE *pMyDlgTemplate = NULL; HGLOBAL hMyDlgTemplate = makeRTLResource(IDD_VALUE_DLG, &pMyDlgTemplate); - int result = ::DialogBoxIndirectParam(_hInst, pMyDlgTemplate, _hParent, (DLGPROC)dlgProc, (LPARAM)this); + int result = ::DialogBoxIndirectParam(_hInst, pMyDlgTemplate, _hParent, dlgProc, (LPARAM)this); ::GlobalFree(hMyDlgTemplate); return result; } - return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_VALUE_DLG), _hParent, (DLGPROC)dlgProc, (LPARAM)this); + return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_VALUE_DLG), _hParent, dlgProc, (LPARAM)this); } @@ -79,7 +79,7 @@ int ValueDlg::reSizeValueBox() return extraSize; } -BOOL CALLBACK ValueDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK ValueDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { switch (Message) { @@ -122,7 +122,7 @@ BOOL CALLBACK ValueDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) -BOOL CALLBACK ButtonDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) +INT_PTR CALLBACK ButtonDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM) { switch (Message) { diff --git a/PowerEditor/src/lesDlgs.h b/PowerEditor/src/lesDlgs.h index a3e52e7e..9cc89f21 100644 --- a/PowerEditor/src/lesDlgs.h +++ b/PowerEditor/src/lesDlgs.h @@ -44,7 +44,7 @@ public : void destroy() {}; protected : - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM); private : int _nbNumber; @@ -87,7 +87,7 @@ public : }; protected : - BOOL CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM); + INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM); int _buttonStatus; };