diff options
Diffstat (limited to 'plugins/SMS')
-rw-r--r-- | plugins/SMS/src/SMSConstans.h | 6 | ||||
-rw-r--r-- | plugins/SMS/src/SMS_svc.cpp | 4 | ||||
-rw-r--r-- | plugins/SMS/src/functions.cpp | 14 | ||||
-rw-r--r-- | plugins/SMS/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/SMS/src/receive.cpp | 6 | ||||
-rw-r--r-- | plugins/SMS/src/senddlg.cpp | 28 |
6 files changed, 30 insertions, 30 deletions
diff --git a/plugins/SMS/src/SMSConstans.h b/plugins/SMS/src/SMSConstans.h index b347620cbf..b212510210 100644 --- a/plugins/SMS/src/SMSConstans.h +++ b/plugins/SMS/src/SMSConstans.h @@ -33,7 +33,7 @@ struct FontOptionsList
{
COLORREF defColour;
- TCHAR* szDefFace;
+ wchar_t* szDefFace;
BYTE defStyle;
char defSize;
}
@@ -66,8 +66,8 @@ int SendSMSMenuCommand(WPARAM wParam,LPARAM lParam); #define SMS_READ "/ReadSms"
#define SMS_READ_ACK "/ReadSmsAck"
#define SMS_SEND "/SendSMS"
-#define SMS_SEND_STR LPGENT("Send &SMS...")
-#define SMS_SEND_CM_STR LPGENT("&SMS Message")
+#define SMS_SEND_STR LPGENW("Send &SMS...")
+#define SMS_SEND_CM_STR LPGENW("&SMS Message")
// структура содержащая информацию о сервисах/функциях
struct SERVICE_ITEM
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp index d7a411f20b..3ad9cc6b53 100644 --- a/plugins/SMS/src/SMS_svc.cpp +++ b/plugins/SMS/src/SMS_svc.cpp @@ -32,7 +32,7 @@ int LoadModules(void) SET_UID(mi, 0x3ce387db, 0xbaac, 0x490f, 0xac, 0xab, 0x8c, 0xf7, 0xe9, 0xcd, 0x86, 0xa1);
mi.position = 300050000;
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_SMS);
- mi.name.t = SMS_SEND_STR;
+ mi.name.w = SMS_SEND_STR;
mi.pszService = szServiceFunction;
mi.flags = CMIF_TCHAR;
Menu_AddMainMenuItem(&mi);
@@ -40,7 +40,7 @@ int LoadModules(void) SET_UID(mi, 0x736e4cff, 0x769e, 0x45dc, 0x8b, 0x78, 0x83, 0xf9, 0xe4, 0xbb, 0x81, 0x9e);
mi.position = -2000070000;
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_SMS);
- mi.name.t = SMS_SEND_CM_STR;
+ mi.name.w = SMS_SEND_CM_STR;
mi.pszService = szServiceFunction;
mi.flags = CMIF_TCHAR;
ssSMSSettings.hContactMenuItems[0] = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/SMS/src/functions.cpp b/plugins/SMS/src/functions.cpp index 7c42dc769c..d6256e4726 100644 --- a/plugins/SMS/src/functions.cpp +++ b/plugins/SMS/src/functions.cpp @@ -402,31 +402,31 @@ DWORD ReplaceInBuff(LPVOID lpInBuff, size_t dwInBuffSize, size_t dwReplaceItemsC static const LPTSTR lpszXMLTags[] = { TEXT("'"), TEXT("""), TEXT("&"), TEXT("<"), TEXT(">") };
-static const size_t dwXMLTagsCount[] = { (6 * sizeof(TCHAR)), (6 * sizeof(TCHAR)), (5 * sizeof(TCHAR)), (4 * sizeof(TCHAR)), (4 * sizeof(TCHAR)) };
+static const size_t dwXMLTagsCount[] = { (6 * sizeof(wchar_t)), (6 * sizeof(wchar_t)), (5 * sizeof(wchar_t)), (4 * sizeof(wchar_t)), (4 * sizeof(wchar_t)) };
static const LPTSTR lpszXMLSymbols[] = { TEXT("\'"), TEXT("\""), TEXT("&"), TEXT("<"), TEXT(">") };
-static const size_t dwXMLSymbolsCount[] = { sizeof(TCHAR), sizeof(TCHAR), sizeof(TCHAR), sizeof(TCHAR), sizeof(TCHAR) };
+static const size_t dwXMLSymbolsCount[] = { sizeof(wchar_t), sizeof(wchar_t), sizeof(wchar_t), sizeof(wchar_t), sizeof(wchar_t) };
//Decode XML coded string. The function translate special xml code into standard characters.
DWORD DecodeXML(LPTSTR lptszMessage, size_t dwMessageSize, LPTSTR lptszMessageConverted, size_t dwMessageConvertedBuffSize, size_t *pdwMessageConvertedSize)
{
- DWORD dwRet = ReplaceInBuff(lptszMessage, (dwMessageSize*sizeof(TCHAR)), _countof(lpszXMLTags), (LPVOID*)lpszXMLTags, (size_t*)dwXMLTagsCount, (LPVOID*)lpszXMLSymbols, (size_t*)dwXMLSymbolsCount, lptszMessageConverted, (dwMessageConvertedBuffSize*sizeof(TCHAR)), pdwMessageConvertedSize);
+ DWORD dwRet = ReplaceInBuff(lptszMessage, (dwMessageSize*sizeof(wchar_t)), _countof(lpszXMLTags), (LPVOID*)lpszXMLTags, (size_t*)dwXMLTagsCount, (LPVOID*)lpszXMLSymbols, (size_t*)dwXMLSymbolsCount, lptszMessageConverted, (dwMessageConvertedBuffSize*sizeof(wchar_t)), pdwMessageConvertedSize);
- if (pdwMessageConvertedSize) (*pdwMessageConvertedSize) /= sizeof(TCHAR);
+ if (pdwMessageConvertedSize) (*pdwMessageConvertedSize) /= sizeof(wchar_t);
return(dwRet);
}
//Encode XML coded string. The function translate special saved xml characters into special characters.
DWORD EncodeXML(LPTSTR lptszMessage, size_t dwMessageSize, LPTSTR lptszMessageConverted, size_t dwMessageConvertedBuffSize, size_t *pdwMessageConvertedSize)
{
- DWORD dwRet = ReplaceInBuff(lptszMessage, (dwMessageSize*sizeof(TCHAR)), _countof(lpszXMLTags), (LPVOID*)lpszXMLSymbols, (size_t*)dwXMLSymbolsCount, (LPVOID*)lpszXMLTags, (size_t*)dwXMLTagsCount, lptszMessageConverted, (dwMessageConvertedBuffSize*sizeof(TCHAR)), pdwMessageConvertedSize);
+ DWORD dwRet = ReplaceInBuff(lptszMessage, (dwMessageSize*sizeof(wchar_t)), _countof(lpszXMLTags), (LPVOID*)lpszXMLSymbols, (size_t*)dwXMLSymbolsCount, (LPVOID*)lpszXMLTags, (size_t*)dwXMLTagsCount, lptszMessageConverted, (dwMessageConvertedBuffSize*sizeof(wchar_t)), pdwMessageConvertedSize);
- if (pdwMessageConvertedSize) (*pdwMessageConvertedSize) /= sizeof(TCHAR);
+ if (pdwMessageConvertedSize) (*pdwMessageConvertedSize) /= sizeof(wchar_t);
return(dwRet);
}
//(Taken from Miranda-IM source code:)
-BYTE MsgDlgGetFontDefaultCharset(const TCHAR*)
+BYTE MsgDlgGetFontDefaultCharset(const wchar_t*)
{
return(DEFAULT_CHARSET);
}
diff --git a/plugins/SMS/src/options.cpp b/plugins/SMS/src/options.cpp index 2d59221d13..5a464a79c5 100644 --- a/plugins/SMS/src/options.cpp +++ b/plugins/SMS/src/options.cpp @@ -31,7 +31,7 @@ WORD wSMSSignControlsList[] = { IDC_BEGIN, IDC_END, IDC_SIGNATURE, IDC_SIGNGROUP INT_PTR CALLBACK DlgProcEditorOptions(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- TCHAR tszSign[1024];
+ wchar_t tszSign[1024];
switch(msg){
case WM_INITDIALOG:
diff --git a/plugins/SMS/src/receive.cpp b/plugins/SMS/src/receive.cpp index fad6ded482..9779f46907 100644 --- a/plugins/SMS/src/receive.cpp +++ b/plugins/SMS/src/receive.cpp @@ -36,7 +36,7 @@ int handleAckSMS(WPARAM wParam, LPARAM lParam) return 0;
char szPhone[MAX_PHONE_LEN] = { 0 };
- TCHAR tszPhone[MAX_PHONE_LEN] = { 0 };
+ wchar_t tszPhone[MAX_PHONE_LEN] = { 0 };
LPSTR lpszXML = (LPSTR)((ACKDATA*)lParam)->lParam, lpszData, lpszPhone;
size_t dwXMLSize = 0, dwDataSize, dwPhoneSize;
ACKDATA *ack = ((ACKDATA*)lParam);
@@ -138,7 +138,7 @@ int handleAckSMS(WPARAM wParam, LPARAM lParam) if (ack->result == ACKRESULT_FAILED || CompareStringA(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NORM_IGNORECASE, lpszData, (int)dwDataSize, "no", 2) == CSTR_EQUAL) {
char szBuff[1024];
- TCHAR tszErrorMessage[1028];
+ wchar_t tszErrorMessage[1028];
LPSTR lpszErrorDescription;
if (SendSMSWindowMultipleGet(hWndDlg)) {
@@ -209,7 +209,7 @@ int handleAckSMS(WPARAM wParam, LPARAM lParam) int handleNewMessage(WPARAM hContact, LPARAM hDbEvent)
{
char szServiceFunction[MAX_PATH], *pszServiceFunctionName;
- TCHAR szToolTip[MAX_PATH];
+ wchar_t szToolTip[MAX_PATH];
DBEVENTINFO dbei = { sizeof(dbei) };
if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == -1)
diff --git a/plugins/SMS/src/senddlg.cpp b/plugins/SMS/src/senddlg.cpp index 66f7581eeb..96f36d700a 100644 --- a/plugins/SMS/src/senddlg.cpp +++ b/plugins/SMS/src/senddlg.cpp @@ -142,7 +142,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARA SendSMSWindowUpdateAccountList(hWndDlg);
{
- TCHAR tszSign[1024];
+ wchar_t tszSign[1024];
size_t dwSignLen = 0;
if (DB_SMS_GetByte(NULL, "UseSignature", SMS_DEFAULT_USESIGNATURE))
@@ -209,7 +209,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARA case WM_TIMER:
if (wParam == TIMERID_MSGSEND) {
HWND hwndTimeOut;
- TCHAR tszMessage[1028], tszPhone[MAX_PHONE_LEN];
+ wchar_t tszMessage[1028], tszPhone[MAX_PHONE_LEN];
if (psswdWindowData->bMultiple) {
TVITEM tvi;
@@ -268,11 +268,11 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARA break;
case TIMEDOUT_RETRY:
{
- TCHAR tszPhone[MAX_PHONE_LEN];
+ wchar_t tszPhone[MAX_PHONE_LEN];
size_t dwPhoneSize;
size_t dwMessageSize = GET_DLG_ITEM_TEXT_LENGTH(hWndDlg, IDC_MESSAGE);
- LPTSTR lpwszMessage = (LPTSTR)MEMALLOC(((dwMessageSize + 4)*sizeof(TCHAR)));
+ LPTSTR lpwszMessage = (LPTSTR)MEMALLOC(((dwMessageSize + 4)*sizeof(wchar_t)));
if (lpwszMessage) {
if (psswdWindowData->bMultiple) {
TVITEM tvi;
@@ -303,7 +303,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARA case IDC_ADDNUMBER:
{
- TCHAR tszPhone[MAX_PHONE_LEN];
+ wchar_t tszPhone[MAX_PHONE_LEN];
if (IsPhoneW(tszPhone, GetDlgItemText(hWndDlg, IDC_ADDRESS, tszPhone, _countof(tszPhone)))) {
TVINSERTSTRUCT tvis = { 0 };
tvis.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
@@ -345,7 +345,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARA }
}
else {
- TCHAR tszPhone[MAX_PHONE_LEN];
+ wchar_t tszPhone[MAX_PHONE_LEN];
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);
@@ -382,7 +382,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARA break;
case IDC_MESSAGE:
if (HIWORD(wParam) == EN_CHANGE) {
- TCHAR tszBuff[MAX_PATH];
+ wchar_t tszBuff[MAX_PATH];
size_t dwMessageSize = GET_DLG_ITEM_TEXT_LENGTH(hWndDlg, IDC_MESSAGE);
EnableWindow(GetDlgItem(hWndDlg, IDOK), dwMessageSize != 0);
@@ -394,7 +394,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARA {
BOOL bCont = TRUE;
char szBuff[MAX_PATH];
- TCHAR tszPhone[MAX_PHONE_LEN];
+ wchar_t tszPhone[MAX_PHONE_LEN];
DBVARIANT dbv;
size_t dwPhoneSize = GetDlgItemText(hWndDlg, IDC_ADDRESS, tszPhone, (_countof(tszPhone) - 4));
@@ -558,7 +558,7 @@ HWND SendSMSWindowAdd(MCONTACT hContact) ListMTUnLock(&ssSMSSettings.lmtSendSMSWindowsListMT);
LPTSTR lptszContactDisplayName = pcli->pfnGetContactDisplayName(hContact, 0);
- TCHAR tszTitle[MAX_PATH];
+ wchar_t tszTitle[MAX_PATH];
mir_sntprintf(tszTitle, L"%s - %s", lptszContactDisplayName, TranslateT("Send SMS"));
SetWindowText(psswdWindowData->hWnd, tszTitle);
SendDlgItemMessage(psswdWindowData->hWnd, IDC_NAME, CB_ADDSTRING, 0, (LPARAM)lptszContactDisplayName);
@@ -841,12 +841,12 @@ HWND SendSMSWindowIsOtherInstanceHContact(MCONTACT hContact) //
void SendSMSWindowNext(HWND hWndDlg)
{
- TCHAR tszPhone[MAX_PHONE_LEN];
+ wchar_t tszPhone[MAX_PHONE_LEN];
size_t dwPhoneSize, dwMessageSize;
TVITEM tvi = { 0 };
dwMessageSize = GET_DLG_ITEM_TEXT_LENGTH(hWndDlg, IDC_MESSAGE);
- LPTSTR lptszMessage = (LPTSTR)MEMALLOC(((dwMessageSize + 4)*sizeof(TCHAR)));
+ LPTSTR lptszMessage = (LPTSTR)MEMALLOC(((dwMessageSize + 4)*sizeof(wchar_t)));
if (!lptszMessage)
return;
@@ -952,7 +952,7 @@ void SendSMSWindowsUpdateAllAccountLists() void AddContactPhonesToComboToListParam(MCONTACT hContact, LPSTR lpszModule, LPSTR lpszValueName, HWND hWndList)
{
char szBuff[MAX_PATH];
- TCHAR tszPhone[MAX_PHONE_LEN], tszPhoneRaw[MAX_PHONE_LEN];
+ wchar_t tszPhone[MAX_PHONE_LEN], tszPhoneRaw[MAX_PHONE_LEN];
size_t i, dwPhoneSize;
if (DB_GetStaticStringW(hContact, lpszModule, lpszValueName, tszPhoneRaw, _countof(tszPhoneRaw), &dwPhoneSize)) {
@@ -1003,7 +1003,7 @@ void AddContactPhonesToCombo(HWND hWnd, MCONTACT hContact) void AddContactPhonesToTreeViewParam(MCONTACT hContact, LPSTR lpszModule, LPSTR lpszValueName, HWND hWndList, HTREEITEM *phParent)
{
char szBuff[MAX_PATH];
- TCHAR tszPhone[MAX_PHONE_LEN], tszPhoneRaw[MAX_PHONE_LEN];
+ wchar_t tszPhone[MAX_PHONE_LEN], tszPhoneRaw[MAX_PHONE_LEN];
size_t i, dwPhoneSize;
TVINSERTSTRUCT tvis = { 0 };
@@ -1073,7 +1073,7 @@ size_t GetSMSMessageLenMax(HWND hWndDlg) size_t dwMessageSize, dwLenght = 160;
dwMessageSize = GET_DLG_ITEM_TEXT_LENGTH(hWndDlg, IDC_MESSAGE);
- LPTSTR lptszMessage = (LPTSTR)MEMALLOC(((dwMessageSize + 4)*sizeof(TCHAR)));
+ LPTSTR lptszMessage = (LPTSTR)MEMALLOC(((dwMessageSize + 4)*sizeof(wchar_t)));
if (lptszMessage) {
dwMessageSize = GetDlgItemText(hWndDlg, IDC_MESSAGE, lptszMessage, (int)dwMessageSize + 2);
if (dwMessageSize != WideCharToMultiByte(CP_UTF8, 0, lptszMessage, (int)dwMessageSize, NULL, 0, NULL, NULL))
|