diff options
Diffstat (limited to 'plugins/Scriver/src/msgwindow.cpp')
-rw-r--r-- | plugins/Scriver/src/msgwindow.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp index 4003851adf..93b08a0085 100644 --- a/plugins/Scriver/src/msgwindow.cpp +++ b/plugins/Scriver/src/msgwindow.cpp @@ -35,20 +35,18 @@ extern ITaskbarList3 * pTaskbarInterface; #define TIMERID_FLASHWND 1
#define TIMEOUT_FLASHWND 900
-static WNDPROC OldTabCtrlProc;
-static void DrawTab(ParentWindowData *dat, HWND hwnd, WPARAM wParam, LPARAM lParam);
-BOOL CALLBACK TabCtrlProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+static void DrawTab(ParentWindowData *dat, HWND hwnd, WPARAM wParam, LPARAM lParam);
+LRESULT CALLBACK TabCtrlProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
extern TCHAR *GetNickname(HANDLE hContact, const char* szProto);
void SubclassTabCtrl(HWND hwnd) {
- OldTabCtrlProc = (WNDPROC) SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) TabCtrlProc);
+ mir_subclassWindow(hwnd, TabCtrlProc);
SendMessage(hwnd, EM_SUBCLASSED, 0, 0);
}
void UnsubclassTabCtrl(HWND hwnd) {
SendMessage(hwnd, EM_UNSUBCLASSED, 0, 0);
- SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) OldTabCtrlProc);
}
static const TCHAR *titleTokenNames[] = {_T("%name%"), _T("%status%"), _T("%statusmsg%"), _T("%account%")};
@@ -1278,7 +1276,7 @@ static void DrawTab(ParentWindowData *dat, HWND hwnd, WPARAM wParam, LPARAM lPar }
}
-BOOL CALLBACK TabCtrlProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+LRESULT CALLBACK TabCtrlProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
TabCtrlData *dat;
dat = (TabCtrlData *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
@@ -1570,10 +1568,9 @@ BOOL CALLBACK TabCtrlProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) mir_free(dat);
return 0;
}
- return CallWindowProc(OldTabCtrlProc, hwnd, msg, wParam, lParam);
+ return mir_callNextSubclass(hwnd, TabCtrlProc, msg, wParam, lParam);
}
-
int ScriverRestoreWindowPosition(HWND hwnd,HANDLE hContact,const char *szModule,const char *szNamePrefix, int flags, int showCmd)
{
RECT rcDesktop;
|