diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-04 07:23:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-04 07:23:42 +0000 |
commit | 66cb770a982a2502456d10d73838df2b7239fd89 (patch) | |
tree | fc419dde94a9be3ebe8f2266ff46feb90d2bcbec /protocols/IRCG | |
parent | bc256df33a57e585367edffe33d3e58d53f82ce8 (diff) |
new subclassing functions applied to all plugins
git-svn-id: http://svn.miranda-ng.org/main/trunk@3880 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IRCG')
-rw-r--r-- | protocols/IRCG/src/options.cpp | 16 | ||||
-rw-r--r-- | protocols/IRCG/src/windows.cpp | 6 |
2 files changed, 8 insertions, 14 deletions
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index db56f9aded..36f211655f 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -24,9 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "ui_utils.h"
-static WNDPROC OldProc;
-static WNDPROC OldListViewProc;
-
static const CIrcProto* pZero = NULL;
void CIrcProto::ReadSettings( TDbSetting* sets, int count )
@@ -1018,7 +1015,7 @@ static LRESULT CALLBACK EditSubclassProc(HWND hwndDlg, UINT msg, WPARAM wParam, break;
}
- return CallWindowProc(OldProc, hwndDlg, msg, wParam, lParam);
+ return mir_callNextSubclass(hwndDlg, EditSubclassProc, msg, wParam, lParam);
}
COtherPrefsDlg::COtherPrefsDlg( CIrcProto* _pro ) :
@@ -1047,9 +1044,9 @@ COtherPrefsDlg::COtherPrefsDlg( CIrcProto* _pro ) : void COtherPrefsDlg::OnInitDialog()
{
- OldProc = (WNDPROC)SetWindowLongPtr( m_alias.GetHwnd(), GWLP_WNDPROC,(LONG_PTR)EditSubclassProc);
- SetWindowLongPtr( m_quitMessage.GetHwnd(), GWLP_WNDPROC,(LONG_PTR)EditSubclassProc);
- SetWindowLongPtr( m_pertormEdit.GetHwnd(), GWLP_WNDPROC,(LONG_PTR)EditSubclassProc);
+ mir_subclassWindow( m_alias.GetHwnd(), EditSubclassProc);
+ mir_subclassWindow( m_quitMessage.GetHwnd(), EditSubclassProc);
+ mir_subclassWindow( m_pertormEdit.GetHwnd(), EditSubclassProc);
m_alias.SetText( m_proto->m_alias );
m_quitMessage.SetText( m_proto->m_quitMessage );
@@ -1354,7 +1351,7 @@ static LRESULT CALLBACK ListviewSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, break;
}
- return CallWindowProc(OldListViewProc, hwnd, msg, wParam, lParam);
+ return mir_callNextSubclass(hwnd, ListviewSubclassProc, msg, wParam, lParam);
}
// Callback for the 'Add ignore' dialog
@@ -1454,7 +1451,7 @@ CIgnorePrefsDlg::CIgnorePrefsDlg( CIrcProto* _pro ) : void CIgnorePrefsDlg::OnInitDialog()
{
m_proto->m_ignoreDlg = this;
- OldListViewProc = (WNDPROC)SetWindowLongPtr( m_list.GetHwnd(),GWLP_WNDPROC, (LONG_PTR)ListviewSubclassProc );
+ mir_subclassWindow(m_list.GetHwnd(), ListviewSubclassProc);
m_enable.SetState( m_proto->m_ignore );
m_ignoreFile.SetState( !m_proto->m_DCCFileEnabled );
@@ -1609,7 +1606,6 @@ void CIgnorePrefsDlg::OnDestroy() }
m_proto->RewriteIgnoreSettings();
- SetWindowLongPtr( m_list.GetHwnd(), GWLP_WNDPROC, (LONG_PTR)OldListViewProc );
}
void CIgnorePrefsDlg::FixButtons()
diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp index 313e99353c..ad8a16fec7 100644 --- a/protocols/IRCG/src/windows.cpp +++ b/protocols/IRCG/src/windows.cpp @@ -21,8 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "irc.h"
-static WNDPROC OldMgrEditProc;
-
/////////////////////////////////////////////////////////////////////////////////////////
// Message Box
@@ -866,7 +864,7 @@ LRESULT CALLBACK MgrEditSubclassProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARA break;
}
- return CallWindowProc(OldMgrEditProc, m_hwnd, msg, wParam, lParam);
+ return mir_callNextSubclass(m_hwnd, MgrEditSubclassProc, msg, wParam, lParam);
}
void CManagerDlg::OnInitDialog()
@@ -877,7 +875,7 @@ void CManagerDlg::OnInitDialog() pt.x = 3;
pt.y = 3;
HWND hwndEdit = ChildWindowFromPoint( m_topic.GetHwnd(), pt);
- OldMgrEditProc = (WNDPROC)SetWindowLongPtr(hwndEdit, GWLP_WNDPROC,(LONG_PTR)MgrEditSubclassProc);
+ mir_subclassWindow(hwndEdit, MgrEditSubclassProc);
WindowSetIcon( m_hwnd, IDI_MANAGER );
|