From 688f55ba998c19304a29727c910504903f4cc49a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Nov 2014 18:51:36 +0000 Subject: lstr* replacements git-svn-id: http://svn.miranda-ng.org/main/trunk@11176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Alarms/src/alarmlist.cpp | 6 +++--- plugins/Alarms/src/alarms.cpp | 4 ++-- plugins/Alarms/src/frame.cpp | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'plugins/Alarms') diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp index eea69fee51..563ad000f0 100644 --- a/plugins/Alarms/src/alarmlist.cpp +++ b/plugins/Alarms/src/alarmlist.cpp @@ -331,7 +331,7 @@ void SaveAlarms() { if (_tcslen(i->szCommand)) { mir_snprintf(buff, SIZEOF(buff), "ActionCommand%d", index); db_set_ts(0, MODULE, buff, i->szCommand); - if (lstrlen(i->szCommandParams)) { + if (mir_tstrlen(i->szCommandParams)) { mir_snprintf(buff, SIZEOF(buff), "ActionParams%d", index); db_set_ts(0, MODULE, buff, i->szCommandParams); } @@ -508,8 +508,8 @@ void ShowPopup(ALARM *alarm) POPUPDATAT ppd = { 0 }; ppd.lchIcon = hIconMenuSet; - lstrcpyn(ppd.lptzContactName, data->szTitle, MAX_CONTACTNAME); - lstrcpyn(ppd.lptzText, data->szDesc, MAX_SECONDLINE); + mir_tstrncpy(ppd.lptzContactName, data->szTitle, MAX_CONTACTNAME); + mir_tstrncpy(ppd.lptzText, data->szDesc, MAX_SECONDLINE); ppd.PluginWindowProc = PopupAlarmDlgProc; ppd.PluginData = data; ppd.iSeconds = -1; diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp index 5c38706ce8..c3d3a8e1f7 100644 --- a/plugins/Alarms/src/alarms.cpp +++ b/plugins/Alarms/src/alarms.cpp @@ -72,8 +72,8 @@ void ShowPopup(MCONTACT hContact, const TCHAR *msg) POPUPDATAT ppd = { 0 }; ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked. ppd.lchIcon = hIconList1; - lstrcpyn(ppd.lptzContactName, lpzContactName,MAX_CONTACTNAME); - lstrcpyn(ppd.lptzText, msg, MAX_SECONDLINE); + mir_tstrncpy(ppd.lptzContactName, lpzContactName,MAX_CONTACTNAME); + mir_tstrncpy(ppd.lptzText, msg, MAX_SECONDLINE); ppd.colorBack = GetSysColor(COLOR_BTNFACE); ppd.colorText = RGB(0,0,0); ppd.PluginWindowProc = PopupDlgProc; diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp index 2c40ab5270..9a8d48b224 100644 --- a/plugins/Alarms/src/frame.cpp +++ b/plugins/Alarms/src/frame.cpp @@ -137,7 +137,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar HICON hIcon = (min <= 5 ? hIconList2 : hIconList1); DrawIconEx(dis->hDC,dis->rcItem.left,(dis->rcItem.top + dis->rcItem.bottom - 16)>>1,hIcon,0, 0, 0, NULL, DI_NORMAL); - GetTextExtentPoint32(dis->hDC,alarm.szTitle,lstrlen(alarm.szTitle),&textSize); + GetTextExtentPoint32(dis->hDC,alarm.szTitle,mir_tstrlen(alarm.szTitle),&textSize); TCHAR buff[100]; if (min >= 60) @@ -145,26 +145,26 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar else mir_sntprintf(buff, 100, TranslateT("%dm"), min); - GetTextExtentPoint32(dis->hDC,buff,lstrlen(buff),&timeSize); + GetTextExtentPoint32(dis->hDC,buff,mir_tstrlen(buff),&timeSize); if (textSize.cx > (dis->rcItem.right - dis->rcItem.left) - (GetSystemMetrics(SM_CXSMICON) + 4) - timeSize.cx - 2 - 4) { // need elipsis TCHAR titlebuff[512]; - int len = lstrlen(alarm.szTitle); + int len = mir_tstrlen(alarm.szTitle); if (len > 511) len = 511; while(len > 0 && textSize.cx > (dis->rcItem.right - dis->rcItem.left) - (GetSystemMetrics(SM_CXSMICON) + 4) - timeSize.cx - 2 - 4) { len--; _tcsncpy(titlebuff, alarm.szTitle, len); titlebuff[len] = 0; _tcscat(titlebuff, _T("...")); - GetTextExtentPoint32(dis->hDC,titlebuff,lstrlen(titlebuff),&textSize); + GetTextExtentPoint32(dis->hDC,titlebuff,mir_tstrlen(titlebuff),&textSize); } - TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,titlebuff,lstrlen(titlebuff)); - TextOut(dis->hDC,dis->rcItem.right - timeSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom - timeSize.cy)>>1, buff,lstrlen(buff)); + TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,titlebuff,mir_tstrlen(titlebuff)); + TextOut(dis->hDC,dis->rcItem.right - timeSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom - timeSize.cy)>>1, buff,mir_tstrlen(buff)); } else { - TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,alarm.szTitle,lstrlen(alarm.szTitle)); - TextOut(dis->hDC,dis->rcItem.right - timeSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom - timeSize.cy)>>1, buff,lstrlen(buff)); + TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,alarm.szTitle,mir_tstrlen(alarm.szTitle)); + TextOut(dis->hDC,dis->rcItem.right - timeSize.cx - 2,(dis->rcItem.top + dis->rcItem.bottom - timeSize.cy)>>1, buff,mir_tstrlen(buff)); } SetBkMode(dis->hDC, OPAQUE); -- cgit v1.2.3