summaryrefslogtreecommitdiff
path: root/plugins/SMS
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SMS')
-rw-r--r--plugins/SMS/src/functions.cpp14
-rw-r--r--plugins/SMS/src/recvdlg.cpp6
2 files changed, 4 insertions, 16 deletions
diff --git a/plugins/SMS/src/functions.cpp b/plugins/SMS/src/functions.cpp
index 548d191827..5d3b9cf68e 100644
--- a/plugins/SMS/src/functions.cpp
+++ b/plugins/SMS/src/functions.cpp
@@ -611,30 +611,20 @@ void LoadMsgDlgFont(int i,LOGFONT *lf,COLORREF *colour)
}
}
-
LRESULT CALLBACK MessageSubclassProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
{
LRESULT lrRet=0;
- WNDPROC OldMessageEditProc=(WNDPROC)GetWindowLongPtr(hwnd, GWLP_USERDATA);
switch(message){
case WM_CHAR:
if (wParam=='\n' && GetKeyState(VK_CONTROL)&0x8000)
- {
PostMessage(GetParent(hwnd),WM_COMMAND,IDOK,0);
- return 0;
- }
- break;
+ return 0;
}
- if (OldMessageEditProc) lrRet=CallWindowProc(OldMessageEditProc,hwnd,message,wParam,lParam);
-
-return(lrRet);
+ return mir_callNextSubclass(hwnd, MessageSubclassProc, message, wParam, lParam);
}
-
-
-
//This function refresh account list.
//It called when SMS plugin loaded and upon change in the account list.
int RefreshAccountList(WPARAM eventCode,LPARAM lParam)
diff --git a/plugins/SMS/src/recvdlg.cpp b/plugins/SMS/src/recvdlg.cpp
index d765e231b4..adf33d554d 100644
--- a/plugins/SMS/src/recvdlg.cpp
+++ b/plugins/SMS/src/recvdlg.cpp
@@ -73,10 +73,8 @@ INT_PTR CALLBACK RecvSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l
prswdWindowData=(RECV_SMS_WINDOW_DATA*)lParam;
SetWindowLongPtr(hWndDlg,GWLP_USERDATA,(LONG_PTR)lParam);
- {
- WNDPROC OldEditWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hWndDlg,IDC_MESSAGE),GWLP_WNDPROC,(LONG_PTR)MessageSubclassProc);
- SetWindowLongPtr(GetDlgItem(hWndDlg,IDC_MESSAGE),GWLP_USERDATA,(LONG_PTR)OldEditWndProc);
- }
+
+ mir_subclassWindow(GetDlgItem(hWndDlg,IDC_MESSAGE), MessageSubclassProc);
{
HFONT hFont;
LOGFONT lf;