Add patch from http://sourceforge.net/p/notepad-plus/patches/648/ by Xileer Torias with comment:
Updated the GetWindowLongPtr and SetWindowLongPtrW nIndex reference as per https://msdn.microsoft.com/en-us/library/windows/desktop/ms633585%28v=vs.85%29.aspx and https://msdn.microsoft.com/en-us/library/windows/desktop/ms644898(v=vs.85).aspx This alters the function to be compatible with both x86, and x64 as to simplify future x64 builds.
This commit is contained in:
parent
084d3c60a8
commit
4d694ea704
|
@ -65,7 +65,7 @@ LRESULT CALLBACK Notepad_plus_Window::Notepad_plus_Proc(HWND hwnd, UINT Message,
|
||||||
switch(Message)
|
switch(Message)
|
||||||
{
|
{
|
||||||
case WM_NCCREATE : // First message we get the ptr of instantiated object
|
case WM_NCCREATE : // First message we get the ptr of instantiated object
|
||||||
// then stock it into GWL_USERDATA index in order to retrieve afterward
|
// then stock it into GWLP_USERDATA index in order to retrieve afterward
|
||||||
{
|
{
|
||||||
Notepad_plus_Window *pM30ide = (Notepad_plus_Window *)(((LPCREATESTRUCT)lParam)->lpCreateParams);
|
Notepad_plus_Window *pM30ide = (Notepad_plus_Window *)(((LPCREATESTRUCT)lParam)->lpCreateParams);
|
||||||
pM30ide->_hSelf = hwnd;
|
pM30ide->_hSelf = hwnd;
|
||||||
|
@ -76,7 +76,7 @@ LRESULT CALLBACK Notepad_plus_Window::Notepad_plus_Proc(HWND hwnd, UINT Message,
|
||||||
|
|
||||||
default :
|
default :
|
||||||
{
|
{
|
||||||
return ((Notepad_plus_Window *)::GetWindowLongPtr(hwnd, GWL_USERDATA))->runProc(hwnd, Message, wParam, lParam);
|
return ((Notepad_plus_Window *)::GetWindowLongPtr(hwnd, GWLP_USERDATA))->runProc(hwnd, Message, wParam, lParam);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2238,8 +2238,8 @@ LRESULT FAR PASCAL FindReplaceDlg::finderProc(HWND hwnd, UINT message, WPARAM wP
|
||||||
{
|
{
|
||||||
if (message == WM_KEYDOWN && (wParam == VK_DELETE || wParam == VK_RETURN))
|
if (message == WM_KEYDOWN && (wParam == VK_DELETE || wParam == VK_RETURN))
|
||||||
{
|
{
|
||||||
ScintillaEditView *pScint = (ScintillaEditView *)(::GetWindowLongPtr(hwnd, GWL_USERDATA));
|
ScintillaEditView *pScint = (ScintillaEditView *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
|
||||||
Finder *pFinder = (Finder *)(::GetWindowLongPtr(pScint->getHParent(), GWL_USERDATA));
|
Finder *pFinder = (Finder *)(::GetWindowLongPtr(pScint->getHParent(), GWLP_USERDATA));
|
||||||
if (wParam == VK_RETURN)
|
if (wParam == VK_RETURN)
|
||||||
pFinder->GotoFoundLine();
|
pFinder->GotoFoundLine();
|
||||||
else // VK_DELETE
|
else // VK_DELETE
|
||||||
|
|
|
@ -258,15 +258,15 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
|
||||||
//Use either Unicode or ANSI setwindowlong, depending on environment
|
//Use either Unicode or ANSI setwindowlong, depending on environment
|
||||||
if (::IsWindowUnicode(_hSelf))
|
if (::IsWindowUnicode(_hSelf))
|
||||||
{
|
{
|
||||||
::SetWindowLongPtrW(_hSelf, GWL_USERDATA, reinterpret_cast<LONG>(this));
|
::SetWindowLongPtrW(_hSelf, GWLP_USERDATA, reinterpret_cast<LONG>(this));
|
||||||
_callWindowProc = CallWindowProcW;
|
_callWindowProc = CallWindowProcW;
|
||||||
_scintillaDefaultProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtrW(_hSelf, GWL_WNDPROC, reinterpret_cast<LONG>(scintillaStatic_Proc)));
|
_scintillaDefaultProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtrW(_hSelf, GWLP_WNDPROC, reinterpret_cast<LONG>(scintillaStatic_Proc)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
::SetWindowLongPtrA(_hSelf, GWL_USERDATA, reinterpret_cast<LONG>(this));
|
::SetWindowLongPtrA(_hSelf, GWLP_USERDATA, reinterpret_cast<LONG>(this));
|
||||||
_callWindowProc = CallWindowProcA;
|
_callWindowProc = CallWindowProcA;
|
||||||
_scintillaDefaultProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtrA(_hSelf, GWL_WNDPROC, reinterpret_cast<LONG>(scintillaStatic_Proc)));
|
_scintillaDefaultProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtrA(_hSelf, GWLP_WNDPROC, reinterpret_cast<LONG>(scintillaStatic_Proc)));
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get the startup document and make a buffer for it so it can be accessed like a file
|
//Get the startup document and make a buffer for it so it can be accessed like a file
|
||||||
|
@ -275,7 +275,7 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
|
||||||
|
|
||||||
LRESULT CALLBACK ScintillaEditView::scintillaStatic_Proc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
|
LRESULT CALLBACK ScintillaEditView::scintillaStatic_Proc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
ScintillaEditView *pScint = (ScintillaEditView *)(::GetWindowLongPtr(hwnd, GWL_USERDATA));
|
ScintillaEditView *pScint = (ScintillaEditView *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
|
||||||
|
|
||||||
if (Message == WM_MOUSEWHEEL || Message == WM_MOUSEHWHEEL)
|
if (Message == WM_MOUSEWHEEL || Message == WM_MOUSEHWHEEL)
|
||||||
{
|
{
|
||||||
|
@ -293,7 +293,7 @@ LRESULT CALLBACK ScintillaEditView::scintillaStatic_Proc(HWND hwnd, UINT Message
|
||||||
if (isSynpnatic || makeTouchPadCompetible)
|
if (isSynpnatic || makeTouchPadCompetible)
|
||||||
return (pScint->scintillaNew_Proc(hwnd, Message, wParam, lParam));
|
return (pScint->scintillaNew_Proc(hwnd, Message, wParam, lParam));
|
||||||
|
|
||||||
ScintillaEditView *pScintillaOnMouse = (ScintillaEditView *)(::GetWindowLongPtr(hwndOnMouse, GWL_USERDATA));
|
ScintillaEditView *pScintillaOnMouse = (ScintillaEditView *)(::GetWindowLongPtr(hwndOnMouse, GWLP_USERDATA));
|
||||||
if (pScintillaOnMouse != pScint)
|
if (pScintillaOnMouse != pScint)
|
||||||
return ::SendMessage(hwndOnMouse, Message, wParam, lParam);
|
return ::SendMessage(hwndOnMouse, Message, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ protected :
|
||||||
bool _clicking;
|
bool _clicking;
|
||||||
|
|
||||||
static LRESULT CALLBACK URLCtrlProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam){
|
static LRESULT CALLBACK URLCtrlProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam){
|
||||||
return ((URLCtrl *)(::GetWindowLongPtr(hwnd, GWL_USERDATA)))->runProc(hwnd, Message, wParam, lParam);
|
return ((URLCtrl *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA)))->runProc(hwnd, Message, wParam, lParam);
|
||||||
};
|
};
|
||||||
LRESULT runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
LRESULT runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
||||||
};
|
};
|
||||||
|
|
|
@ -51,7 +51,7 @@ protected:
|
||||||
LRESULT runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
LRESULT runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
static LRESULT CALLBACK staticProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
static LRESULT CALLBACK staticProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
||||||
return (((ListView *)(::GetWindowLongPtr(hwnd, GWL_USERDATA)))->runProc(hwnd, Message, wParam, lParam));
|
return (((ListView *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA)))->runProc(hwnd, Message, wParam, lParam));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ private :
|
||||||
bool _isEnabled;
|
bool _isEnabled;
|
||||||
|
|
||||||
static LRESULT CALLBACK staticWinProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
static LRESULT CALLBACK staticWinProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
||||||
return (((ColourPicker *)(::GetWindowLongPtr(hwnd, GWL_USERDATA)))->runProc(Message, wParam, lParam));
|
return (((ColourPicker *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA)))->runProc(Message, wParam, lParam));
|
||||||
};
|
};
|
||||||
LRESULT runProc(UINT Message, WPARAM wParam, LPARAM lParam);
|
LRESULT runProc(UINT Message, WPARAM wParam, LPARAM lParam);
|
||||||
void drawForeground(HDC hDC);
|
void drawForeground(HDC hDC);
|
||||||
|
|
|
@ -77,7 +77,7 @@ BOOL CALLBACK ColourPopup::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARA
|
||||||
|
|
||||||
default :
|
default :
|
||||||
{
|
{
|
||||||
ColourPopup *pColourPopup = reinterpret_cast<ColourPopup *>(::GetWindowLongPtr(hwnd, GWL_USERDATA));
|
ColourPopup *pColourPopup = reinterpret_cast<ColourPopup *>(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
|
||||||
if (!pColourPopup)
|
if (!pColourPopup)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return pColourPopup->run_dlgProc(message, wParam, lParam);
|
return pColourPopup->run_dlgProc(message, wParam, lParam);
|
||||||
|
|
|
@ -67,7 +67,7 @@ private :
|
||||||
WNDPROC _oldProc;
|
WNDPROC _oldProc;
|
||||||
|
|
||||||
static BOOL CALLBACK staticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){
|
static BOOL CALLBACK staticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){
|
||||||
ColourStaticTextHooker *pColourStaticTextHooker = reinterpret_cast<ColourStaticTextHooker *>(::GetWindowLongPtr(hwnd, GWL_USERDATA));
|
ColourStaticTextHooker *pColourStaticTextHooker = reinterpret_cast<ColourStaticTextHooker *>(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
|
||||||
return pColourStaticTextHooker->colourStaticProc(hwnd, message, wParam, lParam);
|
return pColourStaticTextHooker->colourStaticProc(hwnd, message, wParam, lParam);
|
||||||
};
|
};
|
||||||
BOOL CALLBACK colourStaticProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
BOOL CALLBACK colourStaticProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
|
@ -155,13 +155,13 @@ protected :
|
||||||
// Subclassing caption
|
// Subclassing caption
|
||||||
LRESULT runProcCaption(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
LRESULT runProcCaption(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
||||||
static LRESULT CALLBACK wndCaptionProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
static LRESULT CALLBACK wndCaptionProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
||||||
return (((DockingCont *)(::GetWindowLongPtr(hwnd, GWL_USERDATA)))->runProcCaption(hwnd, Message, wParam, lParam));
|
return (((DockingCont *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA)))->runProcCaption(hwnd, Message, wParam, lParam));
|
||||||
};
|
};
|
||||||
|
|
||||||
// Subclassing tab
|
// Subclassing tab
|
||||||
LRESULT runProcTab(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
LRESULT runProcTab(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
||||||
static LRESULT CALLBACK wndTabProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
static LRESULT CALLBACK wndTabProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
||||||
return (((DockingCont *)(::GetWindowLongPtr(hwnd, GWL_USERDATA)))->runProcTab(hwnd, Message, wParam, lParam));
|
return (((DockingCont *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA)))->runProcTab(hwnd, Message, wParam, lParam));
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
|
@ -45,7 +45,7 @@ LRESULT CALLBACK FocusWndProc(int nCode, WPARAM wParam, LPARAM lParam);
|
||||||
// Callback function that handles messages (to test focus)
|
// Callback function that handles messages (to test focus)
|
||||||
LRESULT CALLBACK FocusWndProc(int nCode, WPARAM wParam, LPARAM lParam) {
|
LRESULT CALLBACK FocusWndProc(int nCode, WPARAM wParam, LPARAM lParam) {
|
||||||
if (nCode == HC_ACTION && hWndServer) {
|
if (nCode == HC_ACTION && hWndServer) {
|
||||||
DockingManager *pDockingManager = (DockingManager *)::GetWindowLongPtr(hWndServer, GWL_USERDATA);
|
DockingManager *pDockingManager = (DockingManager *)::GetWindowLongPtr(hWndServer, GWLP_USERDATA);
|
||||||
if (pDockingManager) {
|
if (pDockingManager) {
|
||||||
vector<DockingCont*> & vcontainer = pDockingManager->getContainerInfo();
|
vector<DockingCont*> & vcontainer = pDockingManager->getContainerInfo();
|
||||||
CWPSTRUCT * pCwp = (CWPSTRUCT*)lParam;
|
CWPSTRUCT * pCwp = (CWPSTRUCT*)lParam;
|
||||||
|
@ -187,7 +187,7 @@ LRESULT CALLBACK DockingManager::staticWinProc(HWND hwnd, UINT message, WPARAM w
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
default :
|
default :
|
||||||
pDockingManager = (DockingManager *)::GetWindowLongPtr(hwnd, GWL_USERDATA);
|
pDockingManager = (DockingManager *)::GetWindowLongPtr(hwnd, GWLP_USERDATA);
|
||||||
if (!pDockingManager)
|
if (!pDockingManager)
|
||||||
return ::DefWindowProc(hwnd, message, wParam, lParam);
|
return ::DefWindowProc(hwnd, message, wParam, lParam);
|
||||||
return pDockingManager->runProc(hwnd, message, wParam, lParam);
|
return pDockingManager->runProc(hwnd, message, wParam, lParam);
|
||||||
|
@ -711,7 +711,7 @@ LRESULT DockingManager::SendNotify(HWND hWnd, UINT message)
|
||||||
nmhdr.hwndFrom = _hParent;
|
nmhdr.hwndFrom = _hParent;
|
||||||
nmhdr.idFrom = ::GetDlgCtrlID(_hParent);
|
nmhdr.idFrom = ::GetDlgCtrlID(_hParent);
|
||||||
::SendMessage(hWnd, WM_NOTIFY, nmhdr.idFrom, (LPARAM)&nmhdr);
|
::SendMessage(hWnd, WM_NOTIFY, nmhdr.idFrom, (LPARAM)&nmhdr);
|
||||||
return ::GetWindowLongPtr(hWnd, DWL_MSGRESULT);
|
return ::GetWindowLongPtr(hWnd, DWLP_MSGRESULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DockingManager::setDockedContSize(int iCont, int iSize)
|
void DockingManager::setDockedContSize(int iCont, int iSize)
|
||||||
|
|
|
@ -135,7 +135,7 @@ LRESULT CALLBACK DockingSplitter::staticWinProc(HWND hwnd, UINT message, WPARAM
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
default :
|
default :
|
||||||
pDockingSplitter = (DockingSplitter *)::GetWindowLongPtr(hwnd, GWL_USERDATA);
|
pDockingSplitter = (DockingSplitter *)::GetWindowLongPtr(hwnd, GWLP_USERDATA);
|
||||||
if (!pDockingSplitter)
|
if (!pDockingSplitter)
|
||||||
return ::DefWindowProc(hwnd, message, wParam, lParam);
|
return ::DefWindowProc(hwnd, message, wParam, lParam);
|
||||||
return pDockingSplitter->runProc(hwnd, message, wParam, lParam);
|
return pDockingSplitter->runProc(hwnd, message, wParam, lParam);
|
||||||
|
|
|
@ -178,7 +178,7 @@ LRESULT CALLBACK Gripper::staticWinProc(HWND hwnd, UINT message, WPARAM wParam,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
default :
|
default :
|
||||||
pDlgMoving = (Gripper *)::GetWindowLongPtr(hwnd, GWL_USERDATA);
|
pDlgMoving = (Gripper *)::GetWindowLongPtr(hwnd, GWLP_USERDATA);
|
||||||
if (!pDlgMoving)
|
if (!pDlgMoving)
|
||||||
return ::DefWindowProc(hwnd, message, wParam, lParam);
|
return ::DefWindowProc(hwnd, message, wParam, lParam);
|
||||||
return pDlgMoving->runProc(message, wParam, lParam);
|
return pDlgMoving->runProc(message, wParam, lParam);
|
||||||
|
|
|
@ -440,8 +440,8 @@ BOOL CALLBACK ViewZoneDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara
|
||||||
case WM_INITDIALOG :
|
case WM_INITDIALOG :
|
||||||
{
|
{
|
||||||
_viewZoneCanvas = ::GetDlgItem(_hSelf, IDC_VIEWZONECANVAS);
|
_viewZoneCanvas = ::GetDlgItem(_hSelf, IDC_VIEWZONECANVAS);
|
||||||
::SetWindowLongPtrW(_viewZoneCanvas, GWL_USERDATA, reinterpret_cast<LONG>(this));
|
::SetWindowLongPtrW(_viewZoneCanvas, GWLP_USERDATA, reinterpret_cast<LONG>(this));
|
||||||
_canvasDefaultProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtr(_viewZoneCanvas, GWL_WNDPROC, reinterpret_cast<LONG>(canvasStaticProc)));
|
_canvasDefaultProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtr(_viewZoneCanvas, GWLP_WNDPROC, reinterpret_cast<LONG>(canvasStaticProc)));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -492,7 +492,7 @@ BOOL CALLBACK ViewZoneDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara
|
||||||
|
|
||||||
BOOL CALLBACK ViewZoneDlg::canvasStaticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
BOOL CALLBACK ViewZoneDlg::canvasStaticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
ViewZoneDlg *pViewZoneDlg = reinterpret_cast<ViewZoneDlg *>(::GetWindowLongPtr(hwnd, GWL_USERDATA));
|
ViewZoneDlg *pViewZoneDlg = reinterpret_cast<ViewZoneDlg *>(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
|
||||||
if (!pViewZoneDlg)
|
if (!pViewZoneDlg)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return pViewZoneDlg->canvas_runProc(hwnd, message, wParam, lParam);
|
return pViewZoneDlg->canvas_runProc(hwnd, message, wParam, lParam);
|
||||||
|
|
|
@ -572,7 +572,7 @@ BOOL CALLBACK FunctionListPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM
|
||||||
_hToolbarMenu = CreateWindowEx(0,TOOLBARCLASSNAME,NULL, style,
|
_hToolbarMenu = CreateWindowEx(0,TOOLBARCLASSNAME,NULL, style,
|
||||||
0,0,0,0,_hSelf,(HMENU)0, _hInst, NULL);
|
0,0,0,0,_hSelf,(HMENU)0, _hInst, NULL);
|
||||||
|
|
||||||
//::GetWindowLongPtr(_hToolbarMenu, GWL_WNDPROC);
|
//::GetWindowLongPtr(_hToolbarMenu, GWLP_WNDPROC);
|
||||||
oldFunclstToolbarProc = (WNDPROC)::SetWindowLongPtr(_hToolbarMenu, GWLP_WNDPROC, (LONG_PTR)funclstToolbarProc);
|
oldFunclstToolbarProc = (WNDPROC)::SetWindowLongPtr(_hToolbarMenu, GWLP_WNDPROC, (LONG_PTR)funclstToolbarProc);
|
||||||
TBBUTTON tbButtons[3];
|
TBBUTTON tbButtons[3];
|
||||||
|
|
||||||
|
|
|
@ -367,7 +367,7 @@ UINT_PTR CALLBACK FileDialog::OFNHookProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't touch the following 3 lines, they are cursed !!!
|
// Don't touch the following 3 lines, they are cursed !!!
|
||||||
oldProc = (WNDPROC)::GetWindowLongPtr(hFileDlg, GWL_WNDPROC);
|
oldProc = (WNDPROC)::GetWindowLongPtr(hFileDlg, GWLP_WNDPROC);
|
||||||
if ((long)oldProc > 0)
|
if ((long)oldProc > 0)
|
||||||
::SetWindowLongPtr(hFileDlg, GWLP_WNDPROC, (LONG_PTR)fileDlgProc);
|
::SetWindowLongPtr(hFileDlg, GWLP_WNDPROC, (LONG_PTR)fileDlgProc);
|
||||||
|
|
||||||
|
@ -376,7 +376,7 @@ UINT_PTR CALLBACK FileDialog::OFNHookProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
|
||||||
|
|
||||||
default :
|
default :
|
||||||
{
|
{
|
||||||
FileDialog *pFileDialog = reinterpret_cast<FileDialog *>(::GetWindowLongPtr(hWnd, GWL_USERDATA));
|
FileDialog *pFileDialog = reinterpret_cast<FileDialog *>(::GetWindowLongPtr(hWnd, GWLP_USERDATA));
|
||||||
if (!pFileDialog)
|
if (!pFileDialog)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -115,7 +115,7 @@ protected:
|
||||||
LRESULT runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
LRESULT runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
static LRESULT CALLBACK staticProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
static LRESULT CALLBACK staticProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
||||||
return (((TreeView *)(::GetWindowLongPtr(hwnd, GWL_USERDATA)))->runProc(hwnd, Message, wParam, lParam));
|
return (((TreeView *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA)))->runProc(hwnd, Message, wParam, lParam));
|
||||||
};
|
};
|
||||||
void cleanSubEntries(HTREEITEM hTreeItem);
|
void cleanSubEntries(HTREEITEM hTreeItem);
|
||||||
void dupTree(HTREEITEM hTree2Dup, HTREEITEM hParentItem);
|
void dupTree(HTREEITEM hTree2Dup, HTREEITEM hParentItem);
|
||||||
|
|
|
@ -250,7 +250,7 @@ LRESULT CALLBACK Splitter::staticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LP
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
Splitter * pSplitter = (Splitter *)::GetWindowLongPtr(hWnd, GWL_USERDATA);
|
Splitter * pSplitter = (Splitter *)::GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||||
if (!pSplitter)
|
if (!pSplitter)
|
||||||
return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
|
return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,7 @@ LRESULT CALLBACK SplitterContainer::staticWinProc(HWND hwnd, UINT message, WPARA
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
default :
|
default :
|
||||||
pSplitterContainer = (SplitterContainer *)::GetWindowLongPtr(hwnd, GWL_USERDATA);
|
pSplitterContainer = (SplitterContainer *)::GetWindowLongPtr(hwnd, GWLP_USERDATA);
|
||||||
if (!pSplitterContainer)
|
if (!pSplitterContainer)
|
||||||
return ::DefWindowProc(hwnd, message, wParam, lParam);
|
return ::DefWindowProc(hwnd, message, wParam, lParam);
|
||||||
return pSplitterContainer->runProc(message, wParam, lParam);
|
return pSplitterContainer->runProc(message, wParam, lParam);
|
||||||
|
|
|
@ -138,7 +138,7 @@ BOOL CALLBACK StaticDialog::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPAR
|
||||||
|
|
||||||
default :
|
default :
|
||||||
{
|
{
|
||||||
StaticDialog *pStaticDlg = reinterpret_cast<StaticDialog *>(::GetWindowLongPtr(hwnd, GWL_USERDATA));
|
StaticDialog *pStaticDlg = reinterpret_cast<StaticDialog *>(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
|
||||||
if (!pStaticDlg)
|
if (!pStaticDlg)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return pStaticDlg->run_dlgProc(message, wParam, lParam);
|
return pStaticDlg->run_dlgProc(message, wParam, lParam);
|
||||||
|
|
|
@ -241,7 +241,7 @@ protected:
|
||||||
LRESULT runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
LRESULT runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
static LRESULT CALLBACK TabBarPlus_Proc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
static LRESULT CALLBACK TabBarPlus_Proc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
||||||
return (((TabBarPlus *)(::GetWindowLongPtr(hwnd, GWL_USERDATA)))->runProc(hwnd, Message, wParam, lParam));
|
return (((TabBarPlus *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA)))->runProc(hwnd, Message, wParam, lParam));
|
||||||
};
|
};
|
||||||
void exchangeItemData(POINT point);
|
void exchangeItemData(POINT point);
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ protected:
|
||||||
LRESULT runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
LRESULT runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
static LRESULT CALLBACK staticProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
static LRESULT CALLBACK staticProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
||||||
return (((TaskList *)(::GetWindowLongPtr(hwnd, GWL_USERDATA)))->runProc(hwnd, Message, wParam, lParam));
|
return (((TaskList *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA)))->runProc(hwnd, Message, wParam, lParam));
|
||||||
};
|
};
|
||||||
|
|
||||||
HFONT _hFont;
|
HFONT _hFont;
|
||||||
|
|
|
@ -55,7 +55,7 @@ protected:
|
||||||
TOOLINFO _ti;
|
TOOLINFO _ti;
|
||||||
|
|
||||||
static LRESULT CALLBACK staticWinProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
static LRESULT CALLBACK staticWinProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
||||||
return (((ToolTip *)(::GetWindowLongPtr(hwnd, GWL_USERDATA)))->runProc(Message, wParam, lParam));
|
return (((ToolTip *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA)))->runProc(Message, wParam, lParam));
|
||||||
};
|
};
|
||||||
LRESULT runProc(UINT Message, WPARAM wParam, LPARAM lParam);
|
LRESULT runProc(UINT Message, WPARAM wParam, LPARAM lParam);
|
||||||
void SendHitMessage();
|
void SendHitMessage();
|
||||||
|
|
|
@ -89,7 +89,7 @@ protected:
|
||||||
LRESULT runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
LRESULT runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
static LRESULT CALLBACK staticProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
static LRESULT CALLBACK staticProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
||||||
return (((VerticalFileSwitcherListView *)(::GetWindowLongPtr(hwnd, GWL_USERDATA)))->runProc(hwnd, Message, wParam, lParam));
|
return (((VerticalFileSwitcherListView *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA)))->runProc(hwnd, Message, wParam, lParam));
|
||||||
};
|
};
|
||||||
|
|
||||||
int find(int bufferID, int iView) const;
|
int find(int bufferID, int iView) const;
|
||||||
|
|
Loading…
Reference in New Issue