summaryrefslogtreecommitdiff
path: root/plugins/SMS/src/senddlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SMS/src/senddlg.cpp')
-rw-r--r--plugins/SMS/src/senddlg.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/plugins/SMS/src/senddlg.cpp b/plugins/SMS/src/senddlg.cpp
index c7e3b640aa..34e1ec1177 100644
--- a/plugins/SMS/src/senddlg.cpp
+++ b/plugins/SMS/src/senddlg.cpp
@@ -146,7 +146,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l
size_t dwSignLen = 0;
if (DB_SMS_GetByte(NULL,"UseSignature",SMS_DEFAULT_USESIGNATURE))
- if (DB_SMS_GetStaticStringW(NULL,"Signature",tszSign,SIZEOF(tszSign),&dwSignLen))
+ if (DB_SMS_GetStaticStringW(NULL,"Signature",tszSign,_countof(tszSign),&dwSignLen))
{
SetDlgItemText(hWndDlg,IDC_MESSAGE,tszSign);
@@ -155,7 +155,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l
EnableWindow(GetDlgItem(hWndDlg,IDOK), dwSignLen != 0);
}
- mir_sntprintf(tszSign,SIZEOF(tszSign),_T("%d/%d"),dwSignLen,GetSMSMessageLenMax(hWndDlg));
+ mir_sntprintf(tszSign,_countof(tszSign),_T("%d/%d"),dwSignLen,GetSMSMessageLenMax(hWndDlg));
SetDlgItemText(hWndDlg,IDC_COUNT,tszSign);
}
@@ -220,12 +220,12 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l
tvi.mask=TVIF_TEXT;
tvi.hItem=SendSMSWindowHItemSendGet(hWndDlg);
tvi.pszText=tszPhone;
- tvi.cchTextMax=SIZEOF(tszPhone);
+ tvi.cchTextMax=_countof(tszPhone);
TreeView_GetItem(GetDlgItem(hWndDlg,IDC_NUMBERSLIST),&tvi);
}else{
- GetDlgItemText(hWndDlg,IDC_ADDRESS,tszPhone,SIZEOF(tszPhone));
+ GetDlgItemText(hWndDlg,IDC_ADDRESS,tszPhone,_countof(tszPhone));
}
- mir_sntprintf(tszMessage,SIZEOF(tszMessage),TranslateT("The SMS message send to %s timed out."),tszPhone);
+ mir_sntprintf(tszMessage,_countof(tszMessage),TranslateT("The SMS message send to %s timed out."),tszPhone);
KillTimer(hWndDlg,wParam);
ShowWindow(hWndDlg,SW_SHOWNORMAL);
EnableWindow(hWndDlg,FALSE);
@@ -285,11 +285,11 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l
tvi.mask = TVIF_TEXT;
tvi.hItem = psswdWindowData->hItemSend;
tvi.pszText = tszPhone;
- tvi.cchTextMax = SIZEOF(tszPhone);
+ tvi.cchTextMax = _countof(tszPhone);
TreeView_GetItem(GetDlgItem(hWndDlg,IDC_NUMBERSLIST),&tvi);
dwPhoneSize = mir_tstrlen(tszPhone);
}
- else dwPhoneSize = GetDlgItemText(hWndDlg, IDC_ADDRESS, tszPhone, SIZEOF(tszPhone));
+ else dwPhoneSize = GetDlgItemText(hWndDlg, IDC_ADDRESS, tszPhone, _countof(tszPhone));
dwMessageSize=GetDlgItemText(hWndDlg,IDC_MESSAGE,lpwszMessage,(int)dwMessageSize+2);
SendSMSWindowNumberSet(hWndDlg,tszPhone,dwPhoneSize);
@@ -310,7 +310,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l
case IDC_ADDNUMBER:
{
TCHAR tszPhone[MAX_PHONE_LEN];
- if (IsPhoneW(tszPhone,GetDlgItemText(hWndDlg,IDC_ADDRESS,tszPhone,SIZEOF(tszPhone)))) {
+ if (IsPhoneW(tszPhone,GetDlgItemText(hWndDlg,IDC_ADDRESS,tszPhone,_countof(tszPhone)))) {
TVINSERTSTRUCT tvis = {0};
tvis.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
tvis.hInsertAfter = TVI_SORT;
@@ -352,7 +352,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l
}
}else{
TCHAR tszPhone[MAX_PHONE_LEN];
- size_t dwPhoneSize=GetDlgItemText(hWndDlg,IDC_ADDRESS,tszPhone,SIZEOF(tszPhone));
+ size_t dwPhoneSize=GetDlgItemText(hWndDlg,IDC_ADDRESS,tszPhone,_countof(tszPhone));
if (IsPhoneW(tszPhone,dwPhoneSize))
{
size_t dwMessageSize=GET_DLG_ITEM_TEXT_LENGTH(hWndDlg,IDC_MESSAGE);
@@ -394,7 +394,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l
size_t dwMessageSize=GET_DLG_ITEM_TEXT_LENGTH(hWndDlg,IDC_MESSAGE);
EnableWindow(GetDlgItem(hWndDlg,IDOK), dwMessageSize != 0);
- mir_sntprintf(tszBuff, SIZEOF(tszBuff), _T("%d/%d"), dwMessageSize,GetSMSMessageLenMax(hWndDlg));
+ mir_sntprintf(tszBuff, _countof(tszBuff), _T("%d/%d"), dwMessageSize,GetSMSMessageLenMax(hWndDlg));
SetDlgItemText(hWndDlg,IDC_COUNT,tszBuff);
}
break;
@@ -405,7 +405,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l
TCHAR tszPhone[MAX_PHONE_LEN];
DBVARIANT dbv;
- size_t dwPhoneSize=GetDlgItemText(hWndDlg,IDC_ADDRESS,tszPhone,(SIZEOF(tszPhone)-4));
+ size_t dwPhoneSize=GetDlgItemText(hWndDlg,IDC_ADDRESS,tszPhone,(_countof(tszPhone)-4));
if (IsPhoneW(tszPhone,dwPhoneSize))
{
if (IsContactPhone(psswdWindowData->hMyContact,tszPhone,dwPhoneSize)==FALSE)
@@ -413,7 +413,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l
mir_tstrcat(tszPhone, _T(" SMS"));
for(DWORD i=0;bCont;i++)
{
- mir_snprintf(szBuff,SIZEOF(szBuff),"MyPhone%d",i);
+ mir_snprintf(szBuff,_countof(szBuff),"MyPhone%d",i);
if (db_get(psswdWindowData->hMyContact,"UserInfo",szBuff,&dbv)) bCont=FALSE;
db_free(&dbv);
}
@@ -575,7 +575,7 @@ HWND SendSMSWindowAdd(MCONTACT hContact)
LPTSTR lptszContactDisplayName=GetContactNameW(hContact);
TCHAR tszTitle[MAX_PATH];
- mir_sntprintf(tszTitle, SIZEOF(tszTitle), _T("%s - %s"), lptszContactDisplayName, TranslateT("Send SMS"));
+ mir_sntprintf(tszTitle, _countof(tszTitle), _T("%s - %s"), lptszContactDisplayName, TranslateT("Send SMS"));
SetWindowText(psswdWindowData->hWnd,tszTitle);
SendDlgItemMessage(psswdWindowData->hWnd,IDC_NAME,CB_ADDSTRING,0,(LPARAM)lptszContactDisplayName);
SendDlgItemMessage(psswdWindowData->hWnd,IDC_NAME,CB_SETCURSEL,0,0);
@@ -729,7 +729,7 @@ void SendSMSWindowAsSentSet(HWND hWndDlg)
// lvi.mask=LVIF_TEXT|LVIF_IMAGE;
// lvi.iItem=GetSendSMSWindowSMSSend(hWndDlg) - 1;
// lvi.iSubItem=0;
-// ListView_GetItemText(GetDlgItem(hWndDlg,IDC_NUMBERSLIST),GetSendSMSWindowSMSSend(hWndDlg) - 1,0,szPhone,SIZEOF(szPhone));
+// ListView_GetItemText(GetDlgItem(hWndDlg,IDC_NUMBERSLIST),GetSendSMSWindowSMSSend(hWndDlg) - 1,0,szPhone,_countof(szPhone));
// lvi.pszText=szPhone;
// lvi.iImage=2;
// ListView_SetItem(GetDlgItem(hWndDlg,IDC_NUMBERSLIST),&lvi);
@@ -881,7 +881,7 @@ void SendSMSWindowNext(HWND hWndDlg)
tvi.mask=TVIF_TEXT;
tvi.hItem=SendSMSWindowHItemSendGet(hWndDlg);
tvi.pszText=tszPhone;
- tvi.cchTextMax=SIZEOF(tszPhone);
+ tvi.cchTextMax=_countof(tszPhone);
TreeView_GetItem(GetDlgItem(hWndDlg,IDC_NUMBERSLIST),&tvi);
TreeView_SelectItem(GetDlgItem(hWndDlg,IDC_NUMBERSLIST),tvi.hItem);
dwPhoneSize=mir_wstrlen(tszPhone);
@@ -985,7 +985,7 @@ void AddContactPhonesToComboToListParam(MCONTACT hContact,LPSTR lpszModule,LPSTR
TCHAR tszPhone[MAX_PHONE_LEN],tszPhoneRaw[MAX_PHONE_LEN];
size_t i,dwPhoneSize;
- if (DB_GetStaticStringW(hContact,lpszModule,lpszValueName,tszPhoneRaw,SIZEOF(tszPhoneRaw),&dwPhoneSize))
+ if (DB_GetStaticStringW(hContact,lpszModule,lpszValueName,tszPhoneRaw,_countof(tszPhoneRaw),&dwPhoneSize))
{
tszPhone[0]='+';
dwPhoneSize=CopyNumberW(tszPhone+1,tszPhoneRaw,dwPhoneSize);
@@ -997,8 +997,8 @@ void AddContactPhonesToComboToListParam(MCONTACT hContact,LPSTR lpszModule,LPSTR
for (i=0;TRUE;i++)
{
- mir_snprintf(szBuff,SIZEOF(szBuff),"%s%ld",lpszValueName,i);
- if (DB_GetStaticStringW(hContact,lpszModule,szBuff,tszPhoneRaw,SIZEOF(tszPhoneRaw),&dwPhoneSize))
+ mir_snprintf(szBuff,_countof(szBuff),"%s%ld",lpszValueName,i);
+ if (DB_GetStaticStringW(hContact,lpszModule,szBuff,tszPhoneRaw,_countof(tszPhoneRaw),&dwPhoneSize))
{
tszPhone[0]='+';
dwPhoneSize=CopyNumberW(tszPhone+1,tszPhoneRaw,dwPhoneSize);
@@ -1046,7 +1046,7 @@ void AddContactPhonesToTreeViewParam(MCONTACT hContact,LPSTR lpszModule,LPSTR lp
tvis.hInsertAfter=TVI_SORT;
tvis.item.iImage=tvis.item.iSelectedImage=0;
- if (DB_GetStaticStringW(hContact,lpszModule,lpszValueName,tszPhoneRaw,SIZEOF(tszPhoneRaw),&dwPhoneSize))
+ if (DB_GetStaticStringW(hContact,lpszModule,lpszValueName,tszPhoneRaw,_countof(tszPhoneRaw),&dwPhoneSize))
{
tszPhone[0]='+';
dwPhoneSize=CopyNumberW(tszPhone+1,tszPhoneRaw,dwPhoneSize);
@@ -1064,8 +1064,8 @@ void AddContactPhonesToTreeViewParam(MCONTACT hContact,LPSTR lpszModule,LPSTR lp
for (i=0;TRUE;i++)
{
- mir_snprintf(szBuff,SIZEOF(szBuff),"%s%ld",lpszValueName,i);
- if (DB_GetStaticStringW(hContact,lpszModule,szBuff,tszPhoneRaw,SIZEOF(tszPhoneRaw),&dwPhoneSize))
+ mir_snprintf(szBuff,_countof(szBuff),"%s%ld",lpszValueName,i);
+ if (DB_GetStaticStringW(hContact,lpszModule,szBuff,tszPhoneRaw,_countof(tszPhoneRaw),&dwPhoneSize))
{
tszPhone[0]='+';
dwPhoneSize=CopyNumberW(tszPhone+1,tszPhoneRaw,dwPhoneSize);