diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
commit | 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch) | |
tree | 2e8bb660c908b54914abd562af8aafa4a486c846 /protocols/WhatsApp/src/utils.cpp | |
parent | a61c8728b379057fe7f0a0d86fe0b037598229dd (diff) |
less TCHARs:
- TCHAR is replaced with wchar_t everywhere;
- LPGENT replaced with either LPGENW or LPGEN;
- fixes for ANSI plugins that improperly used _t functions;
- TCHAR *t removed from MAllStrings;
- ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz*
git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/utils.cpp')
-rw-r--r-- | protocols/WhatsApp/src/utils.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/WhatsApp/src/utils.cpp b/protocols/WhatsApp/src/utils.cpp index 35f84bcc1e..71a33dc2fd 100644 --- a/protocols/WhatsApp/src/utils.cpp +++ b/protocols/WhatsApp/src/utils.cpp @@ -1,16 +1,16 @@ #include "stdafx.h"
-TCHAR* utils::removeA(TCHAR *str)
+wchar_t* utils::removeA(wchar_t *str)
{
if (str == NULL)
return NULL;
- TCHAR *p = _tcschr(str, '@');
+ wchar_t *p = wcschr(str, '@');
if (p) *p = 0;
return str;
}
-void utils::copyText(HWND hwnd, const TCHAR *text)
+void utils::copyText(HWND hwnd, const wchar_t *text)
{
if (!hwnd || !text) return;
@@ -18,8 +18,8 @@ void utils::copyText(HWND hwnd, const TCHAR *text) return;
EmptyClipboard();
- HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, sizeof(TCHAR)*(mir_tstrlen(text) + 1));
- mir_tstrcpy((TCHAR*)GlobalLock(hMem), text);
+ HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, sizeof(wchar_t)*(mir_tstrlen(text) + 1));
+ mir_tstrcpy((wchar_t*)GlobalLock(hMem), text);
GlobalUnlock(hMem);
SetClipboardData(CF_UNICODETEXT, hMem);
CloseClipboard();
@@ -45,13 +45,13 @@ std::string getLastErrorMsg() return ret;
}
-void utils::setStatusMessage(MCONTACT hContact, const TCHAR *ptszMessage)
+void utils::setStatusMessage(MCONTACT hContact, const wchar_t *ptszMessage)
{
if (ptszMessage != NULL) {
StatusTextData st = { 0 };
st.cbSize = sizeof(st);
st.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
- _tcsncpy_s(st.tszText, ptszMessage, _TRUNCATE);
+ wcsncpy_s(st.tszText, ptszMessage, _TRUNCATE);
CallService(MS_MSG_SETSTATUSTEXT, hContact, (LPARAM)&st);
}
else CallService(MS_MSG_SETSTATUSTEXT, hContact, NULL);
|