diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-30 18:51:36 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-30 18:51:36 +0000 |
commit | 688f55ba998c19304a29727c910504903f4cc49a (patch) | |
tree | 69121ebb6d02bcf9e670428b11813087fc7f1640 /plugins/TabSRMM/src/msgs.cpp | |
parent | 4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (diff) |
lstr* replacements
git-svn-id: http://svn.miranda-ng.org/main/trunk@11176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/msgs.cpp')
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 8356b7f1fd..93caf5f1bf 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -68,14 +68,14 @@ static INT_PTR GetWindowClass(WPARAM wParam, LPARAM lParam) return 0; } -//wparam = (MessageWindowInputData*)
-//lparam = (MessageWindowData*)
+//wparam = (MessageWindowInputData*) +//lparam = (MessageWindowData*) //returns 0 on success and returns non-zero (1) on error or if no window data exists for that hcontact static INT_PTR GetWindowData(WPARAM wParam, LPARAM lParam) { MessageWindowInputData *mwid = (MessageWindowInputData*)wParam; - if (mwid == NULL || (mwid->cbSize != sizeof(MessageWindowInputData)) || (mwid->hContact == NULL) || (mwid->uFlags != MSG_WINDOW_UFLAG_MSG_BOTH))
+ if (mwid == NULL || (mwid->cbSize != sizeof(MessageWindowInputData)) || (mwid->hContact == NULL) || (mwid->uFlags != MSG_WINDOW_UFLAG_MSG_BOTH)) return 1; MessageWindowData *mwd = (MessageWindowData*)lParam; @@ -562,16 +562,16 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, // cut nickname if larger than x chars... TCHAR newcontactname[128], tabtitle[128]; - if (contactName && lstrlen(contactName) > 0) { + if (contactName && mir_tstrlen(contactName) > 0) { if (M.GetByte("cuttitle", 0)) CutContactName(contactName, newcontactname, SIZEOF(newcontactname)); else { - lstrcpyn(newcontactname, contactName, SIZEOF(newcontactname)); + mir_tstrncpy(newcontactname, contactName, SIZEOF(newcontactname)); newcontactname[127] = 0; } Utils::DoubleAmpersands(newcontactname); } - else lstrcpyn(newcontactname, _T("_U_"), SIZEOF(newcontactname)); + else mir_tstrncpy(newcontactname, _T("_U_"), SIZEOF(newcontactname)); WORD wStatus = (szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(newData.hContact, szProto, "Status", ID_STATUS_OFFLINE)); TCHAR *szStatus = pcli->pfnGetStatusModeDescription(szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(newData.hContact, szProto, "Status", ID_STATUS_OFFLINE), 0); |