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 /plugins/UserInfoEx | |
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 'plugins/UserInfoEx')
35 files changed, 254 insertions, 255 deletions
diff --git a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp index d28f9fcd36..445928a641 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp @@ -342,12 +342,12 @@ void InitIcons() if (phIconHandles != NULL) {
char szId[20];
SKINICONDESC sid = { 0 };
- sid.section.t = LPGENT("Country flags");
+ sid.section.w = LPGENW("Country flags");
sid.pszName = szId; // name to refer to icon when playing and in db
sid.flags = SIDF_SORTED | SIDF_TCHAR;
for (int i=0; i < nCountriesCount; i++) {
- sid.description.t = mir_a2t(LPGEN(countries[i].szName));
+ sid.description.w = mir_a2t(LPGEN(countries[i].szName));
/* create identifier */
mir_snprintf(szId, (countries[i].id == 0xFFFF) ? "%s0x%X" : "%s%i", "flags_", countries[i].id); /* buffer safe */
int index = CountryNumberToBitmapIndex(countries[i].id);
@@ -358,7 +358,7 @@ void InitIcons() phIconHandles[index] = IcoLib_AddIcon(&sid);
if (sid.hDefaultIcon != NULL)
DestroyIcon(sid.hDefaultIcon);
- mir_free(sid.description.t); sid.description.t = NULL;
+ mir_free(sid.description.w); sid.description.w = NULL;
}
}
ImageList_Destroy(himl);
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.cpp b/plugins/UserInfoEx/src/classMAnnivDate.cpp index 9567506ab3..2bf0c62670 100644 --- a/plugins/UserInfoEx/src/classMAnnivDate.cpp +++ b/plugins/UserInfoEx/src/classMAnnivDate.cpp @@ -218,19 +218,19 @@ struct LPCSTR szZodiacIcon;
}
static zodiac[] = {
- { 80, 110, LPGENT("Aries"), ICO_ZOD_ARIES }, // Widder
- { 111, 140, LPGENT("Taurus"), ICO_ZOD_TAURUS }, // Stier
- { 141, 172, LPGENT("Gemini"), ICO_ZOD_GEMINI }, // Zwillinge
- { 173, 203, LPGENT("Cancer"), ICO_ZOD_CANCER }, // Krebs
- { 204, 235, LPGENT("Leo"), ICO_ZOD_LEO }, // Löwe
- { 236, 266, LPGENT("Virgo"), ICO_ZOD_VIRGO }, // Jungfrau
- { 267, 296, LPGENT("Libra"), ICO_ZOD_LIBRA }, // Waage
- { 297, 326, LPGENT("Scorpio"), ICO_ZOD_SCORPIO }, // Scorpion
- { 327, 355, LPGENT("Sagittarius"), ICO_ZOD_SAGITTARIUS }, // Schütze
- { 356, 364, LPGENT("Capricorn"), ICO_ZOD_CAPRICORN }, // Steinbock
- { 1, 19, LPGENT("Capricorn"), ICO_ZOD_CAPRICORN }, // Steinbock
- { 20, 49, LPGENT("Aquarius"), ICO_ZOD_AQUARIUS }, // Wassermann
- { 50, 79, LPGENT("Pisces"), ICO_ZOD_PISCES }, // Fische
+ { 80, 110, LPGENW("Aries"), ICO_ZOD_ARIES }, // Widder
+ { 111, 140, LPGENW("Taurus"), ICO_ZOD_TAURUS }, // Stier
+ { 141, 172, LPGENW("Gemini"), ICO_ZOD_GEMINI }, // Zwillinge
+ { 173, 203, LPGENW("Cancer"), ICO_ZOD_CANCER }, // Krebs
+ { 204, 235, LPGENW("Leo"), ICO_ZOD_LEO }, // Löwe
+ { 236, 266, LPGENW("Virgo"), ICO_ZOD_VIRGO }, // Jungfrau
+ { 267, 296, LPGENW("Libra"), ICO_ZOD_LIBRA }, // Waage
+ { 297, 326, LPGENW("Scorpio"), ICO_ZOD_SCORPIO }, // Scorpion
+ { 327, 355, LPGENW("Sagittarius"), ICO_ZOD_SAGITTARIUS }, // Schütze
+ { 356, 364, LPGENW("Capricorn"), ICO_ZOD_CAPRICORN }, // Steinbock
+ { 1, 19, LPGENW("Capricorn"), ICO_ZOD_CAPRICORN }, // Steinbock
+ { 20, 49, LPGENW("Aquarius"), ICO_ZOD_AQUARIUS }, // Wassermann
+ { 50, 79, LPGENW("Pisces"), ICO_ZOD_PISCES }, // Fische
{ 0, 0, NULL, "" } // end of array
};
@@ -680,9 +680,9 @@ int MAnnivDate::DBWriteAnniversaryDate(MCONTACT hContact, WORD wIndex) static WORD AskUser(MCONTACT hContact, MAnnivDate *pOldCustomDate, MAnnivDate *pNewProtoDate)
{
MSGBOX MB;
- TCHAR szMsg[MAXDATASIZE];
- TCHAR szDate[MAX_PATH];
- TCHAR szoldDate[MAX_PATH];
+ wchar_t szMsg[MAXDATASIZE];
+ wchar_t szDate[MAX_PATH];
+ wchar_t szoldDate[MAX_PATH];
pOldCustomDate->DateFormat(szoldDate, _countof(szoldDate));
pNewProtoDate->DateFormat(szDate, _countof(szDate));
@@ -696,8 +696,8 @@ static WORD AskUser(MCONTACT hContact, MAnnivDate *pOldCustomDate, MAnnivDate *p MB.hiLogo = IcoLib_GetIcon(ICO_DLG_ANNIVERSARY);
MB.hiMsg = NULL;
MB.uType = MB_YESALLNO|MB_ICON_QUESTION|MB_INFOBAR|MB_NOPOPUP;
- MB.ptszTitle = LPGENT("Update custom birthday");
- MB.ptszInfoText = LPGENT("Keeps your custom birthday up to date.");
+ MB.ptszTitle = LPGENW("Update custom birthday");
+ MB.ptszInfoText = LPGENW("Keeps your custom birthday up to date.");
MB.ptszMsg = szMsg;
return MsgBoxService(NULL, (LPARAM)&MB);
}
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.h b/plugins/UserInfoEx/src/classMAnnivDate.h index 14246f79f6..9d600eb814 100644 --- a/plugins/UserInfoEx/src/classMAnnivDate.h +++ b/plugins/UserInfoEx/src/classMAnnivDate.h @@ -44,7 +44,7 @@ public: private:
WORD _wID; // index to anniversary in database or ANID_BIRTHDAY
- tstring _strDesc; // descripes the anniversary (e.g. birthday)
+ wstring _strDesc; // descripes the anniversary (e.g. birthday)
string _strModule; // the module the anniversary has been read from
WORD _wFlags; // the flags
BYTE _bRemind; // per user setting for reminder (0 - disabled, 1 - use local offset, 2 - use global offset)
diff --git a/plugins/UserInfoEx/src/classMTime.cpp b/plugins/UserInfoEx/src/classMTime.cpp index 8c2049b3d7..03cc310118 100644 --- a/plugins/UserInfoEx/src/classMTime.cpp +++ b/plugins/UserInfoEx/src/classMTime.cpp @@ -363,9 +363,9 @@ WORD MTime::DateFormatAlt(LPTSTR ptszTimeFormat, WORD cchTimeFormat) return 0;
}
- TCHAR tszText[10];
- _itot(mtNow.Year(), tszText, 10);
- TCHAR * tszYear = _tcsstr(ptszTimeFormat, tszText);
+ wchar_t tszText[10];
+ _itow(mtNow.Year(), tszText, 10);
+ wchar_t * tszYear = wcsstr(ptszTimeFormat, tszText);
if (tszYear && mir_tstrlen(tszYear) == 4)
mir_tstrcpy(tszYear, L"????");
diff --git a/plugins/UserInfoEx/src/classMTime.h b/plugins/UserInfoEx/src/classMTime.h index 78ff1b23dd..623b1a156b 100644 --- a/plugins/UserInfoEx/src/classMTime.h +++ b/plugins/UserInfoEx/src/classMTime.h @@ -59,7 +59,6 @@ public: WORD AdjustYear(const int nDiffDays);
WORD TimeFormat(LPTSTR ptszTimeFormat, WORD cchTimeFormat);
- WORD TimeFormat(tstring& str);
WORD DateFormat(LPTSTR ptszTimeFormat, WORD cchTimeFormat);
WORD DateFormatAlt(LPTSTR ptszTimeFormat, WORD cchTimeFormat);
WORD DateFormatLong(LPTSTR ptszTimeFormat, WORD cchTimeFormat);
diff --git a/plugins/UserInfoEx/src/classPsTree.cpp b/plugins/UserInfoEx/src/classPsTree.cpp index 6cbd32fe43..ba83d12e61 100644 --- a/plugins/UserInfoEx/src/classPsTree.cpp +++ b/plugins/UserInfoEx/src/classPsTree.cpp @@ -130,10 +130,10 @@ int CPsTree::AddDummyItem(LPCSTR pszGroup) OPTIONSDIALOGPAGE odp = { 0 }; odp.hInstance = ghInst; odp.flags = ODPF_TCHAR; - odp.ptszTitle = mir_utf8decodeT(pszGroup); + odp.pwszTitle = mir_utf8decodeT(pszGroup); INT_PTR rc = UserInfo_AddPage((WPARAM)&psh, &odp); - mir_free(odp.ptszTitle); + mir_free(odp.pwszTitle); if (!rc) { _pItems = psh._pPages; _numItems = psh._numPages; @@ -368,7 +368,7 @@ HTREEITEM CPsTree::ShowItem(const int iPageIndex, LPWORD needWidth) !pti->Name() || !pti->Label()) { - MsgErr(GetParent(_hWndTree), LPGENT("Due to a parameter error, one of the treeitems can't be added!")); + MsgErr(GetParent(_hWndTree), LPGENW("Due to a parameter error, one of the treeitems can't be added!")); return NULL; } // item is visible at the moment @@ -393,7 +393,7 @@ HTREEITEM CPsTree::ShowItem(const int iPageIndex, LPWORD needWidth) // insert item into tree if set visible if ((tvii.itemex.hItem = TreeView_InsertItem(_hWndTree, &tvii)) == NULL) { - MsgErr(GetParent(_hWndTree), LPGENT("A fatal error occurred on adding a property sheet page!\nDialog creation aborted!")); + MsgErr(GetParent(_hWndTree), LPGENW("A fatal error occurred on adding a property sheet page!\nDialog creation aborted!")); return NULL; } pti->Hti(tvii.itemex.hItem); @@ -685,7 +685,7 @@ int CPsTree::BeginLabelEdit(HTREEITEM hItem) **/ int CPsTree::EndLabelEdit(const BYTE bSave) { - TCHAR szEdit[MAX_TINAME]; + wchar_t szEdit[MAX_TINAME]; TVITEM tvi; WORD cchEdit; diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp index ca46d61dfa..2035874a55 100644 --- a/plugins/UserInfoEx/src/classPsTreeItem.cpp +++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. **/
BOOL CALLBACK BoldGroupTitlesEnumChildren(HWND hWnd, LPARAM lParam)
{
- TCHAR szClass[64];
+ wchar_t szClass[64];
GetClassName(hWnd, szClass, 64);
if (!mir_tstrcmp(szClass, L"Button") && (GetWindowLongPtr(hWnd, GWL_STYLE) & 0x0F) == BS_GROUPBOX)
SendMessage(hWnd, WM_SETFONT, lParam, NULL);
@@ -318,8 +318,8 @@ int CPsTreeItem::Icon(HIMAGELIST hIml, OPTIONSDIALOGPAGE *odp, BYTE bInitIconsOn SKINICONDESC sid = { 0 };
sid.flags = SIDF_ALL_TCHAR;
sid.pszName = (LPSTR)pszIconName;
- sid.description.t = _ptszLabel;
- sid.section.t = LPGENT(SECT_TREE);
+ sid.description.w = _ptszLabel;
+ sid.section.w = _A2W(SECT_TREE);
// the item to insert brings along an icon?
if (odp->flags & ODPF_ICON) {
@@ -327,10 +327,10 @@ int CPsTreeItem::Icon(HIMAGELIST hIml, OPTIONSDIALOGPAGE *odp, BYTE bInitIconsOn if (odp->hInstance == ghInst) {
// the pszGroup holds the iconfile for items added by uinfoex
- sid.defaultFile.t = odp->ptszGroup;
+ sid.defaultFile.w = odp->pwszGroup;
// icon library exists?
- if (sid.defaultFile.t)
+ if (sid.defaultFile.w)
sid.iDefaultIndex = (INT_PTR)odp->hIcon;
// no valid icon library
else {
@@ -385,7 +385,7 @@ int CPsTreeItem::Icon(HIMAGELIST hIml, OPTIONSDIALOGPAGE *odp, BYTE bInitIconsOn int CPsTreeItem::Create(CPsHdr* pPsh, OPTIONSDIALOGPAGE *odp)
{
int err;
- TCHAR szTitle[ MAXSETTING ];
+ wchar_t szTitle[ MAXSETTING ];
// check parameter
if (pPsh && pPsh->_dwSize == sizeof(CPsHdr) && odp && PtrIsValid(odp->hInstance)) {
@@ -403,23 +403,23 @@ int CPsTreeItem::Create(CPsHdr* pPsh, OPTIONSDIALOGPAGE *odp) if (pPsh->_dwFlags & PSF_PROTOPAGESONLY) {
if (_dwFlags & ODPF_USERINFOTAB)
- mir_sntprintf(szTitle, L"%s %d\\%s", odp->ptszTitle, pPsh->_nSubContact+1, odp->ptszTab);
+ mir_sntprintf(szTitle, L"%s %d\\%s", odp->pwszTitle, pPsh->_nSubContact+1, odp->pwszTab);
else
- mir_sntprintf(szTitle, L"%s %d", odp->ptszTitle, pPsh->_nSubContact+1);
+ mir_sntprintf(szTitle, L"%s %d", odp->pwszTitle, pPsh->_nSubContact+1);
}
else {
if (_dwFlags & ODPF_USERINFOTAB)
- mir_sntprintf(szTitle, L"%s\\%s", odp->ptszTitle, odp->ptszTab);
+ mir_sntprintf(szTitle, L"%s\\%s", odp->pwszTitle, odp->pwszTab);
else
- mir_tstrcpy(szTitle, odp->ptszTitle);
+ mir_tstrcpy(szTitle, odp->pwszTitle);
}
// set the unique utf8 encoded name for the item
if (err = Name(szTitle, (_dwFlags & ODPF_UNICODE) == ODPF_UNICODE))
- MsgErr(NULL, LPGENT("Creating unique name for a page failed with %d and error code %d"), err, GetLastError());
+ MsgErr(NULL, LPGENW("Creating unique name for a page failed with %d and error code %d"), err, GetLastError());
// read label from database or create it
else if (err = ItemLabel(TRUE))
- MsgErr(NULL, LPGENT("Creating the label for a page failed with %d and error code %d"), err, GetLastError());
+ MsgErr(NULL, LPGENW("Creating the label for a page failed with %d and error code %d"), err, GetLastError());
else {
// load icon for the item
Icon(pPsh->_hImages, odp, (pPsh->_dwFlags & PSTVF_INITICONS) == PSTVF_INITICONS);
@@ -439,7 +439,7 @@ int CPsTreeItem::Create(CPsHdr* pPsh, OPTIONSDIALOGPAGE *odp) // error for no longer supported dialog template type
if (((UINT_PTR)odp->pszTemplate & 0xFFFF0000))
- MsgErr(NULL, LPGENT("The dialog template type is no longer supported"));
+ MsgErr(NULL, LPGENW("The dialog template type is no longer supported"));
else {
// fetch dialog resource id
_idDlg = (INT_PTR)odp->pszTemplate;
diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.cpp b/plugins/UserInfoEx/src/ctrl_annivedit.cpp index 591df8f8b3..a8fcf14a4d 100644 --- a/plugins/UserInfoEx/src/ctrl_annivedit.cpp +++ b/plugins/UserInfoEx/src/ctrl_annivedit.cpp @@ -403,7 +403,7 @@ INT_PTR CAnnivEditCtrl::SetCurSel(WORD wIndex) DateTime_SetFormat(_hwndDate, NULL);
}
else {
- TCHAR szText[MAX_DESC];
+ wchar_t szText[MAX_DESC];
mir_sntprintf(szText, L"'%s'", TranslateT("Unspecified"));
DateTime_SetSystemtime(_hwndDate, GDT_NONE, NULL);
DateTime_SetFormat(_hwndDate, szText);
@@ -528,7 +528,7 @@ void CAnnivEditCtrl::OnReminderChecked() MCONTACT hContact;
LPCSTR pszProto;
int state;
- TCHAR buf[6];
+ wchar_t buf[6];
MAnnivDate *pCurrent = Current();
PSGetContact(_hwndDlg, hContact);
@@ -540,7 +540,7 @@ void CAnnivEditCtrl::OnReminderChecked() {
if (IsDlgButtonChecked(_hwndDlg, RADIO_REMIND1))
{
- _itot(db_get_b(NULL, MODNAME, SET_REMIND_OFFSET, DEFVAL_REMIND_OFFSET), buf, 10);
+ _itow(db_get_b(NULL, MODNAME, SET_REMIND_OFFSET, DEFVAL_REMIND_OFFSET), buf, 10);
EnableWindow(GetDlgItem(_hwndDlg, EDIT_REMIND), FALSE);
EnableWindow(GetDlgItem(_hwndDlg, SPIN_REMIND), FALSE);
state = BST_INDETERMINATE;
@@ -549,11 +549,11 @@ void CAnnivEditCtrl::OnReminderChecked() {
if (pCurrent->RemindOffset() == (WORD)-1)
{
- _itot(db_get_b(NULL, MODNAME, SET_REMIND_OFFSET, DEFVAL_REMIND_OFFSET), buf, 10);
+ _itow(db_get_b(NULL, MODNAME, SET_REMIND_OFFSET, DEFVAL_REMIND_OFFSET), buf, 10);
}
else
{
- _itot(pCurrent->RemindOffset(), buf, 10);
+ _itow(pCurrent->RemindOffset(), buf, 10);
}
EnableWindow(GetDlgItem(_hwndDlg, EDIT_REMIND), _ReminderEnabled);
EnableWindow(GetDlgItem(_hwndDlg, SPIN_REMIND), _ReminderEnabled);
diff --git a/plugins/UserInfoEx/src/ctrl_button.cpp b/plugins/UserInfoEx/src/ctrl_button.cpp index e2ec2b7292..59ccb0a1ee 100644 --- a/plugins/UserInfoEx/src/ctrl_button.cpp +++ b/plugins/UserInfoEx/src/ctrl_button.cpp @@ -41,7 +41,7 @@ typedef struct TMBCtrl{ int stateId; // button state
int defbutton; // default button
int pbState;
- TCHAR cHot;
+ wchar_t cHot;
} BTNCTRL, *LPBTNCTRL;
// External theme methods and properties
@@ -254,7 +254,7 @@ static void __fastcall PaintThemeButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClien static void __fastcall PaintButton(BTNCTRL *ctl, HDC hdcMem, LPRECT rcClient)
{
RECT rcText = { 0, 0, 0, 0 };
- TCHAR szText[MAX_PATH] = { 0 };
+ wchar_t szText[MAX_PATH] = { 0 };
WORD ccText;
// Draw the flat button
@@ -408,7 +408,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L while (*tmp) {
if (*tmp == '&' && *(tmp + 1)) {
- bct->cHot = _totlower(*(tmp + 1));
+ bct->cHot = towlower(*(tmp + 1));
break;
}
tmp++;
@@ -417,7 +417,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L }
break;
case WM_SYSKEYUP:
- if (bct->stateId != PBS_DISABLED && bct->cHot && bct->cHot == _totlower((TCHAR)wParam)) {
+ if (bct->stateId != PBS_DISABLED && bct->cHot && bct->cHot == towlower((wchar_t)wParam)) {
if (bct->dwStyle & MBS_PUSHBUTTON) {
if (bct->pbState) bct->pbState = 0;
else bct->pbState = 1;
@@ -542,7 +542,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L break;
case BUTTONTRANSLATE:
{
- TCHAR szButton[MAX_PATH];
+ wchar_t szButton[MAX_PATH];
GetWindowText(bct->hwnd, szButton, _countof(szButton));
SetWindowText(bct->hwnd, TranslateTS(szButton));
}
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp index b37897793b..ae37e6eaac 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.cpp +++ b/plugins/UserInfoEx/src/ctrl_contact.cpp @@ -35,7 +35,7 @@ typedef struct TCbExItem WORD wMask;
WORD wFlags;
DWORD dwID;
- TCHAR szCat[MAX_CAT];
+ wchar_t szCat[MAX_CAT];
LPTSTR pszVal;
LPCSTR pszIcon;
HICON hIcon;
@@ -158,7 +158,7 @@ static INT_PTR CALLBACK DlgProc_EMail(HWND hDlg, UINT msg, WPARAM wParam, LPARAM }
if (*cbi->pszVal)
- SetWindowText(hDlg, LPGENT("Edit e-mail"));
+ SetWindowText(hDlg, LPGENW("Edit e-mail"));
TranslateDialogDefault(hDlg);
SendDlgItemMessage(hDlg, EDIT_CATEGORY, EM_LIMITTEXT, cbi->ccCat - 1, 0);
SendDlgItemMessage(hDlg, EDIT_EMAIL, EM_LIMITTEXT, cbi->ccVal - 1, 0);
@@ -169,7 +169,7 @@ static INT_PTR CALLBACK DlgProc_EMail(HWND hDlg, UINT msg, WPARAM wParam, LPARAM // translate Userinfo buttons
{
- TCHAR szButton[MAX_PATH];
+ wchar_t szButton[MAX_PATH];
HWND hBtn = GetDlgItem(hDlg, IDOK);
GetWindowText(hBtn, szButton, _countof(szButton));
SetWindowText(hBtn, TranslateTS(szButton));
@@ -202,14 +202,14 @@ static INT_PTR CALLBACK DlgProc_EMail(HWND hDlg, UINT msg, WPARAM wParam, LPARAM }
case EDIT_EMAIL:
if (HIWORD(wParam) == EN_UPDATE) {
- TCHAR szText[MAXDATASIZE];
+ wchar_t szText[MAXDATASIZE];
LPTSTR pszAdd, pszDot;
if (PtrIsValid(cbi)) {
GetWindowText((HWND)lParam, szText, _countof(szText));
EnableWindow(GetDlgItem(hDlg, IDOK),
- ((pszAdd = _tcschr(szText, '@')) &&
+ ((pszAdd = wcschr(szText, '@')) &&
*(pszAdd + 1) != '.' &&
- (pszDot = _tcschr(pszAdd, '.')) &&
+ (pszDot = wcschr(pszAdd, '.')) &&
*(pszDot + 1) &&
mir_tstrcmp(szText, cbi->pszVal)));
}
@@ -251,7 +251,7 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam // translate Userinfo buttons
{
- TCHAR szButton[MAX_PATH];
+ wchar_t szButton[MAX_PATH];
HWND hBtn;
hBtn = GetDlgItem(hDlg, IDOK);
@@ -261,7 +261,7 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam GetWindowText(hBtn, szButton, _countof(szButton));
SetWindowText(hBtn, TranslateTS(szButton));
}
- if (*cbi->pszVal) SetWindowText(hDlg, LPGENT("Edit phone number"));
+ if (*cbi->pszVal) SetWindowText(hDlg, LPGENW("Edit phone number"));
if (cbi->wFlags & CBEXIF_SMS) CheckDlgButton(hDlg, CHECK_SMS, BST_CHECKED);
TranslateDialogDefault(hDlg);
@@ -292,7 +292,7 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam switch (LOWORD(wParam)) {
case IDOK:
if (HIWORD(wParam) == BN_CLICKED) {
- TCHAR szText[MAXDATASIZE];
+ wchar_t szText[MAXDATASIZE];
int errorPos;
if (!GetDlgItemText(hDlg, EDIT_PHONE, szText, _countof(szText)) || !CheckPhoneSyntax(szText, cbi->pszVal, cbi->ccVal, errorPos) || errorPos > -1) {
@@ -322,7 +322,7 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam if (noRecursion) break;
EnableWindow(GetDlgItem(hDlg, IDOK), TRUE);
{
- TCHAR szPhone[MAXDATASIZE], szArea[32], szData[64];
+ wchar_t szPhone[MAXDATASIZE], szArea[32], szData[64];
int nCurSel = SendDlgItemMessage(hDlg, EDIT_COUNTRY, CB_GETCURSEL, 0, 0);
UINT nCountry = (nCurSel != CB_ERR) ? SendDlgItemMessage(hDlg, EDIT_COUNTRY, CB_GETITEMDATA, nCurSel, 0) : 0;
@@ -340,13 +340,13 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam if (noRecursion) break;
noRecursion = 1;
{
- TCHAR szText[MAXDATASIZE], *pText = 0, *pArea, *pNumber;
+ wchar_t szText[MAXDATASIZE], *pText = 0, *pArea, *pNumber;
bool isValid = true;
GetDlgItemText(hDlg, EDIT_PHONE, szText, _countof(szText));
if (szText[0] != '+')
isValid = false;
if (isValid) {
- int country = _tcstol(szText + 1, &pText, 10);
+ int country = wcstol(szText + 1, &pText, 10);
if (pText - szText > 4)
isValid = false;
else {
@@ -362,11 +362,11 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam }
}
if (isValid) {
- pArea = pText + _tcscspn(pText, L"0123456789");
+ pArea = pText + wcscspn(pText, L"0123456789");
pText = pArea + _tcsspn(pArea, L"0123456789");
if (*pText) {
*pText = '\0';
- pNumber = pText + 1 + _tcscspn(pText + 1, L"0123456789");
+ pNumber = pText + 1 + wcscspn(pText + 1, L"0123456789");
SetDlgItemText(hDlg, EDIT_NUMBER, pNumber);
}
SetDlgItemText(hDlg, EDIT_AREA, pArea);
@@ -659,8 +659,8 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if (HIWORD(wParam) == BN_CLICKED) {
DLGPROC dlgProc;
WORD dlgID;
- TCHAR szCat[MAX_CAT] = { 0 };
- TCHAR szVal[MAXDATASIZE] = { 0 };
+ wchar_t szCat[MAX_CAT] = { 0 };
+ wchar_t szVal[MAXDATASIZE] = { 0 };
CBEXITEM cbi;
HWND hDlgDetails;
@@ -716,8 +716,8 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if (HIWORD(wParam) == BN_CLICKED) {
DLGPROC dlgProc;
WORD dlgID;
- TCHAR szCat[MAX_CAT] = { 0 };
- TCHAR szVal[MAXDATASIZE] = { 0 };
+ wchar_t szCat[MAX_CAT] = { 0 };
+ wchar_t szVal[MAXDATASIZE] = { 0 };
CBEXITEM cbi;
HWND hDlgDetails;
@@ -746,7 +746,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L cbi.ccCat = MAX_CAT;
cbi.ccVal = MAXDATASIZE;
if (!CtrlContactWndProc(hwnd, CBEXM_GETITEM, NULL, (LPARAM)&cbi)) {
- MsgErr(hwnd, LPGENT("CRITICAL: Unable to edit current entry!\nThis should not happen!"));
+ MsgErr(hwnd, LPGENW("CRITICAL: Unable to edit current entry!\nThis should not happen!"));
return 1;
}
@@ -772,7 +772,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if (HIWORD(wParam) == BN_CLICKED) {
HWND hDlgDetails;
MSGBOX mBox;
- TCHAR szMsg[MAXDATASIZE];
+ wchar_t szMsg[MAXDATASIZE];
SetFocus((HWND)lParam);
if (!(hDlgDetails = GetParent(GetParent(hwnd))) ||
@@ -827,7 +827,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L switch (HIWORD(wParam)) {
case EN_UPDATE:
{
- TCHAR szVal[MAXDATASIZE] = { 0 };
+ wchar_t szVal[MAXDATASIZE] = { 0 };
int ccVal;
MCONTACT hContact;
HWND hDlgDetails = GetParent(GetParent(hwnd));
@@ -845,7 +845,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L case EDIT_PHONE:
{
int errorPos;
- TCHAR szEdit[MAXDATASIZE];
+ wchar_t szEdit[MAXDATASIZE];
if (ccVal = GetWindowText(cbex->hEdit, szEdit, _countof(szEdit))) {
if (!(ccVal = CheckPhoneSyntax(szEdit, szVal, MAXDATASIZE, errorPos)) || errorPos > -1) {
@@ -894,7 +894,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L cbex->bIsChanged = TRUE;
}
else
- if (cbex->pItems[cbex->iSelectedItem].pszVal = (LPTSTR)mir_realloc(cbex->pItems[cbex->iSelectedItem].pszVal, (ccText + 2) * sizeof(TCHAR))) {
+ if (cbex->pItems[cbex->iSelectedItem].pszVal = (LPTSTR)mir_realloc(cbex->pItems[cbex->iSelectedItem].pszVal, (ccText + 2) * sizeof(wchar_t))) {
cbex->pItems[cbex->iSelectedItem].pszVal[ccText + 1] = 0;
GetWindowText(cbex->hEdit, cbex->pItems[cbex->iSelectedItem].pszVal, ccText + 1);
}
@@ -1297,7 +1297,7 @@ int CtrlContactAddItemFromDB( cbi.pszVal = NULL;
else { // check the database value
cbi.pszVal = dbv.ptszVal;
- if (LPTSTR sms = _tcsstr(cbi.pszVal, L" SMS")) {
+ if (LPTSTR sms = wcsstr(cbi.pszVal, L" SMS")) {
cbi.wFlags |= CBEXIF_SMS;
*sms = 0;
}
@@ -1377,7 +1377,7 @@ int CtrlContactAddMyItemsFromDB( dbv.ptszVal = NULL;
}
}
- if (sms = _tcsstr(cbi.pszVal, L" SMS")) {
+ if (sms = wcsstr(cbi.pszVal, L" SMS")) {
cbi.wFlags |= CBEXIF_SMS;
*sms = 0;
}
@@ -1411,7 +1411,7 @@ int CtrlContactWriteItemToDB( LPCSTR pszProto,
LPCSTR pszSetting)
{
- TCHAR szVal[MAXDATASIZE];
+ wchar_t szVal[MAXDATASIZE];
CBEXITEM cbi;
if (!CtrlContactWndProc(hCtrl, CBEXM_ISCHANGED, NULL, NULL)) return 1;
@@ -1455,8 +1455,8 @@ int CtrlContactWriteMyItemsToDB( LPCSTR szFormatVal)
{
CHAR pszSetting[MAXSETTING];
- TCHAR szCat[MAX_CAT];
- TCHAR szVal[MAXDATASIZE];
+ wchar_t szCat[MAX_CAT];
+ wchar_t szVal[MAXDATASIZE];
LPTSTR pszOther;
CBEXITEM cbi;
INT_PTR ccOther;
@@ -1481,7 +1481,7 @@ int CtrlContactWriteMyItemsToDB( mir_tstrncat(szVal, L" SMS", _countof(szVal) - mir_tstrlen(szVal));
}
mir_snprintf(pszSetting, szFormatCat, i);
- if (*szCat && _tcsncmp(szCat, pszOther, ccOther)) {
+ if (*szCat && wcsncmp(szCat, pszOther, ccOther)) {
if (db_set_ts(hContact, pszModule, pszSetting, szCat)) return 1;
}
else
diff --git a/plugins/UserInfoEx/src/ctrl_edit.cpp b/plugins/UserInfoEx/src/ctrl_edit.cpp index 77a3904eb6..04bfdbe2b8 100644 --- a/plugins/UserInfoEx/src/ctrl_edit.cpp +++ b/plugins/UserInfoEx/src/ctrl_edit.cpp @@ -108,7 +108,7 @@ BOOL CEditCtrl::OnInfoChanged(MCONTACT hContact, LPCSTR pszProto) { if (!_Flags.B.hasChanged) { DBVARIANT dbv; - TCHAR szText[64]; + wchar_t szText[64]; _Flags.B.hasCustom = _Flags.B.hasProto = _Flags.B.hasMeta = false; _Flags.W |= DB::Setting::GetTStringCtrl(hContact, _pszModule, _pszModule, pszProto, _pszSetting, &dbv); @@ -171,7 +171,7 @@ void CEditCtrl::OnApply(MCONTACT hContact, LPCSTR pszProto) DWORD cch = GetWindowTextLength(_hwnd); if (cch > 0) { - LPTSTR val = (LPTSTR)mir_alloc((cch + 1) * sizeof(TCHAR)); + LPTSTR val = (LPTSTR)mir_alloc((cch + 1) * sizeof(wchar_t)); if (GetWindowText(_hwnd, val, cch + 1) > 0) { DBVARIANT dbv; @@ -179,15 +179,15 @@ void CEditCtrl::OnApply(MCONTACT hContact, LPCSTR pszProto) dbv.type = _dbType; switch (_dbType) { case DBVT_BYTE: - dbv.bVal = (BYTE)_tcstol(val, NULL, 10); + dbv.bVal = (BYTE)wcstol(val, NULL, 10); break; case DBVT_WORD: - dbv.wVal = (WORD)_tcstol(val, NULL, 10); + dbv.wVal = (WORD)wcstol(val, NULL, 10); break; case DBVT_DWORD: - dbv.dVal = (DWORD)_tcstol(val, NULL, 10); + dbv.dVal = (DWORD)wcstol(val, NULL, 10); break; case DBVT_TCHAR: @@ -245,11 +245,11 @@ void CEditCtrl::OnChangedByUser(WORD wChangedMsg) LPTSTR szText; __try { - szText = (LPTSTR)alloca((cch + 1) * sizeof(TCHAR)); + szText = (LPTSTR)alloca((cch + 1) * sizeof(wchar_t)); } __except (EXCEPTION_EXECUTE_HANDLER) { - szText = (LPTSTR)mir_alloc((cch + 1) * sizeof(TCHAR)); + szText = (LPTSTR)mir_alloc((cch + 1) * sizeof(wchar_t)); need_free = 1; } @@ -278,11 +278,11 @@ void CEditCtrl::OpenUrl() BYTE need_free = 0; __try { - szUrl = (LPTSTR)alloca((8 + lenUrl) * sizeof(TCHAR)); + szUrl = (LPTSTR)alloca((8 + lenUrl) * sizeof(wchar_t)); } __except (EXCEPTION_EXECUTE_HANDLER) { - szUrl = (LPTSTR)mir_alloc((8 + lenUrl) * sizeof(TCHAR)); + szUrl = (LPTSTR)mir_alloc((8 + lenUrl) * sizeof(wchar_t)); need_free = 1; } @@ -315,17 +315,17 @@ LRESULT CEditCtrl::LinkNotificationHandler(ENLINK* lnk) tr.chrg = lnk->chrg; __try { - tr.lpstrText = (LPTSTR)alloca((tr.chrg.cpMax - tr.chrg.cpMin + 8) * sizeof(TCHAR)); + tr.lpstrText = (LPTSTR)alloca((tr.chrg.cpMax - tr.chrg.cpMin + 8) * sizeof(wchar_t)); } __except (EXCEPTION_EXECUTE_HANDLER) { - tr.lpstrText = (LPTSTR)mir_alloc((tr.chrg.cpMax - tr.chrg.cpMin + 8) * sizeof(TCHAR)); + tr.lpstrText = (LPTSTR)mir_alloc((tr.chrg.cpMax - tr.chrg.cpMin + 8) * sizeof(wchar_t)); need_free = 1; } if (tr.lpstrText && (SendMessage(_hwnd, EM_GETTEXTRANGE, NULL, (LPARAM)&tr) > 0)) { - if (_tcschr(tr.lpstrText, '@') != NULL && _tcschr(tr.lpstrText, ':') == NULL && _tcschr(tr.lpstrText, '/') == NULL) { - memmove(tr.lpstrText + 7, tr.lpstrText, (tr.chrg.cpMax - tr.chrg.cpMin + 1)*sizeof(TCHAR)); - memcpy(tr.lpstrText, L"mailto:", (7 * sizeof(TCHAR))); + if (wcschr(tr.lpstrText, '@') != NULL && wcschr(tr.lpstrText, ':') == NULL && wcschr(tr.lpstrText, '/') == NULL) { + memmove(tr.lpstrText + 7, tr.lpstrText, (tr.chrg.cpMax - tr.chrg.cpMin + 1)*sizeof(wchar_t)); + memcpy(tr.lpstrText, L"mailto:", (7 * sizeof(wchar_t))); } Utils_OpenUrlT(tr.lpstrText); diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp index a1c3fb3be8..ede54b4d37 100644 --- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp +++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp @@ -234,8 +234,8 @@ class CAnnivList int result;
if (pDlg) {
- TCHAR szText1[MAX_PATH];
- TCHAR szText2[MAX_PATH];
+ wchar_t szText1[MAX_PATH];
+ wchar_t szText2[MAX_PATH];
szText1[0] = szText2[0] = 0;
switch (pDlg->_sortHeader) {
@@ -251,7 +251,7 @@ class CAnnivList case COLUMN_ETA:
ListView_GetItemText(pDlg->_hList, iItem1, pDlg->_sortHeader, szText1, _countof(szText1));
ListView_GetItemText(pDlg->_hList, iItem2, pDlg->_sortHeader, szText2, _countof(szText2));
- result = pDlg->_sortOrder * (_ttoi(szText1) - _ttoi(szText2));
+ result = pDlg->_sortOrder * (_wtoi(szText1) - _wtoi(szText2));
break;
case COLUMN_DATE:
@@ -314,12 +314,12 @@ class CAnnivList ListView_SetExtendedListViewStyle(pDlg->_hList, LVS_EX_FULLROWSELECT);
// add columns
- if (pDlg->AddColumn(CAnnivList::COLUMN_ETA, LPGENT("ETA"), 40)
- || pDlg->AddColumn(CAnnivList::COLUMN_CONTACT, LPGENT("Contact"), 160)
- || pDlg->AddColumn(CAnnivList::COLUMN_PROTO, LPGENT("Proto"), 50)
- || pDlg->AddColumn(CAnnivList::COLUMN_AGE, LPGENT("Age/Nr."), 40)
- || pDlg->AddColumn(CAnnivList::COLUMN_DESC, LPGENT("Anniversary"), 100)
- || pDlg->AddColumn(CAnnivList::COLUMN_DATE, LPGENT("Date"), 80))
+ if (pDlg->AddColumn(CAnnivList::COLUMN_ETA, LPGENW("ETA"), 40)
+ || pDlg->AddColumn(CAnnivList::COLUMN_CONTACT, LPGENW("Contact"), 160)
+ || pDlg->AddColumn(CAnnivList::COLUMN_PROTO, LPGENW("Proto"), 50)
+ || pDlg->AddColumn(CAnnivList::COLUMN_AGE, LPGENW("Age/Nr."), 40)
+ || pDlg->AddColumn(CAnnivList::COLUMN_DESC, LPGENW("Anniversary"), 100)
+ || pDlg->AddColumn(CAnnivList::COLUMN_DATE, LPGENW("Date"), 80))
break;
TranslateDialogDefault(hDlg);
@@ -666,7 +666,7 @@ class CAnnivList **/
BYTE AddRow(MCONTACT hContact, LPCSTR pszProto, MAnnivDate &ad, MTime &mtNow, WORD wDaysBefore)
{
- TCHAR szText[MAX_PATH];
+ wchar_t szText[MAX_PATH];
int diff, iItem = -1;
CItemData *pdata;
@@ -688,7 +688,7 @@ class CAnnivList if (!pdata)
return FALSE;
// add item
- iItem = AddItem(_itot(diff, szText, 10), (LPARAM)pdata);
+ iItem = AddItem(_itow(diff, szText, 10), (LPARAM)pdata);
if (iItem == -1) {
delete pdata;
return FALSE;
@@ -698,13 +698,13 @@ class CAnnivList AddSubItem(iItem, COLUMN_CONTACT, DB::Contact::DisplayName(hContact));
// third column: protocol
- TCHAR *ptszProto = mir_a2t(pszProto);
+ wchar_t *ptszProto = mir_a2t(pszProto);
AddSubItem(iItem, COLUMN_PROTO, ptszProto);
mir_free(ptszProto);
// forth line: age
if (ad.Age(&mtNow))
- AddSubItem(iItem, COLUMN_AGE, _itot(ad.Age(&mtNow), szText, 10));
+ AddSubItem(iItem, COLUMN_AGE, _itow(ad.Age(&mtNow), szText, 10));
else
AddSubItem(iItem, COLUMN_AGE, L"???");
diff --git a/plugins/UserInfoEx/src/dlg_msgbox.cpp b/plugins/UserInfoEx/src/dlg_msgbox.cpp index 8cb11462e3..a3b3444e43 100644 --- a/plugins/UserInfoEx/src/dlg_msgbox.cpp +++ b/plugins/UserInfoEx/src/dlg_msgbox.cpp @@ -322,9 +322,9 @@ static INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l case MB_OKCANCEL:
retOk = IDRETRY;
- SetDlgItemText(hDlg, IDOK, LPGENT("OK"));
+ SetDlgItemText(hDlg, IDOK, LPGENW("OK"));
retCancel = IDCANCEL;
- SetDlgItemText(hDlg, IDCANCEL, LPGENT("Cancel"));
+ SetDlgItemText(hDlg, IDCANCEL, LPGENW("Cancel"));
rcOk.left = dlgMid - okWidth - 10;
rcOk.right = rcOk.left + okWidth;
rcCancel.left = dlgMid + 10;
@@ -335,9 +335,9 @@ static INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l case MB_RETRYCANCEL:
retOk = IDRETRY;
- SetDlgItemText(hDlg, IDOK, LPGENT("Retry"));
+ SetDlgItemText(hDlg, IDOK, LPGENW("Retry"));
retCancel = IDCANCEL;
- SetDlgItemText(hDlg, IDCANCEL, LPGENT("Cancel"));
+ SetDlgItemText(hDlg, IDCANCEL, LPGENW("Cancel"));
rcOk.left = dlgMid - okWidth - 10;
rcOk.right = rcOk.left + okWidth;
rcCancel.left = dlgMid + 10;
@@ -348,9 +348,9 @@ static INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l case MB_YESNO:
retOk = IDYES;
- SetDlgItemText(hDlg, IDOK, LPGENT("Yes"));
+ SetDlgItemText(hDlg, IDOK, LPGENW("Yes"));
retCancel = IDNO;
- SetDlgItemText(hDlg, IDCANCEL, LPGENT("No"));
+ SetDlgItemText(hDlg, IDCANCEL, LPGENW("No"));
rcOk.left = dlgMid - okWidth - 10;
rcOk.right = rcOk.left + okWidth;
rcCancel.left = dlgMid + 10;
@@ -361,11 +361,11 @@ static INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l case MB_ABORTRETRYIGNORE:
retOk = IDABORT;
- SetDlgItemText(hDlg, IDOK, LPGENT("Abort"));
+ SetDlgItemText(hDlg, IDOK, LPGENW("Abort"));
retAll = IDABORT;
- SetDlgItemText(hDlg, IDALL, LPGENT("Retry"));
+ SetDlgItemText(hDlg, IDALL, LPGENW("Retry"));
retCancel = IDCANCEL;
- SetDlgItemText(hDlg, IDCANCEL, LPGENT("Ignore"));
+ SetDlgItemText(hDlg, IDCANCEL, LPGENW("Ignore"));
rcAll.left = dlgMid - (allWidth / 2);
rcAll.right = rcAll.left + allWidth;
rcOk.left = rcAll.left - okWidth - 5;
@@ -379,11 +379,11 @@ static INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l case MB_YESNOCANCEL:
retOk = IDYES;
- SetDlgItemText(hDlg, IDOK, LPGENT("Yes"));
+ SetDlgItemText(hDlg, IDOK, LPGENW("Yes"));
retAll = IDNO;
- SetDlgItemText(hDlg, IDALL, LPGENT("No"));
+ SetDlgItemText(hDlg, IDALL, LPGENW("No"));
retCancel = IDCANCEL;
- SetDlgItemText(hDlg, IDCANCEL, LPGENT("Cancel"));
+ SetDlgItemText(hDlg, IDCANCEL, LPGENW("Cancel"));
rcAll.left = dlgMid - (allWidth / 2);
rcAll.right = rcAll.left + allWidth;
rcOk.left = rcAll.left - okWidth - 5;
@@ -397,13 +397,13 @@ static INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l case MB_YESALLNO:
retOk = IDYES;
- SetDlgItemText(hDlg, IDOK, LPGENT("Yes"));
+ SetDlgItemText(hDlg, IDOK, LPGENW("Yes"));
retAll = IDALL;
- SetDlgItemText(hDlg, IDALL, LPGENT("All"));
+ SetDlgItemText(hDlg, IDALL, LPGENW("All"));
//retNon = IDNONE;
- SetDlgItemText(hDlg, IDNONE, LPGENT("None"));
+ SetDlgItemText(hDlg, IDNONE, LPGENW("None"));
retCancel = IDNO;
- SetDlgItemText(hDlg, IDCANCEL, LPGENT("No"));
+ SetDlgItemText(hDlg, IDCANCEL, LPGENW("No"));
rcCancel.right = rcDlg.right - rcDlg.left - 10;
rcCancel.left = rcCancel.right - caWidth;
rcNone.right = rcCancel.left - 5;
@@ -660,7 +660,7 @@ INT_PTR MsgBoxService(WPARAM, LPARAM lParam) **/
INT_PTR CALLBACK MsgBox(HWND hParent, UINT uType, LPCTSTR pszTitle, LPCTSTR pszInfo, LPCTSTR pszFormat, ...)
{
- TCHAR tszMsg[MAX_SECONDLINE];
+ wchar_t tszMsg[MAX_SECONDLINE];
va_list vl;
va_start(vl, pszFormat);
@@ -686,7 +686,7 @@ INT_PTR CALLBACK MsgBox(HWND hParent, UINT uType, LPCTSTR pszTitle, LPCTSTR pszI **/
INT_PTR CALLBACK MsgErr(HWND hParent, LPCTSTR pszFormat, ...)
{
- TCHAR tszTitle[MAX_SECONDLINE], tszMsg[MAX_SECONDLINE];
+ wchar_t tszTitle[MAX_SECONDLINE], tszMsg[MAX_SECONDLINE];
mir_sntprintf(tszTitle, L"%s - %s", _T(MODNAME), TranslateT("Error"));
va_list vl;
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index c03a5a75db..b70724c993 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -268,7 +268,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM) metrics.x = GetSystemMetrics(SM_CXSMICON);
metrics.y = GetSystemMetrics(SM_CYSMICON);
if ((psh._hImages = ImageList_Create(metrics.x, metrics.y, ILC_COLOR32 | ILC_MASK, 0, 1)) == NULL) {
- MsgErr(NULL, LPGENT("Creating the image list failed!"));
+ MsgErr(NULL, LPGENW("Creating the image list failed!"));
return 1;
}
@@ -291,7 +291,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM) // get contact's protocol
psh._pszPrefix = psh._pszProto = Proto_GetBaseAccountName(wParam);
if (psh._pszProto == NULL) {
- MsgErr(NULL, LPGENT("Could not find contact's protocol. Maybe it is not active!"));
+ MsgErr(NULL, LPGENW("Could not find contact's protocol. Maybe it is not active!"));
return 1;
}
// prepare scanning for metacontact's subcontact's pages
@@ -302,7 +302,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM) // add the pages
NotifyEventHooks(g_hDetailsInitEvent, (WPARAM)&psh, wParam);
if (!psh._pPages || !psh._numPages) {
- MsgErr(NULL, LPGENT("No pages have been added. Canceling dialog creation!"));
+ MsgErr(NULL, LPGENW("No pages have been added. Canceling dialog creation!"));
return 1;
}
@@ -330,7 +330,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM) // create the dialog itself
if (!CreateDialogParam(ghInst, MAKEINTRESOURCE(IDD_DETAILS), NULL, DlgProc, (LPARAM)&psh))
- MsgErr(NULL, LPGENT("Details dialog failed to be created. Returning error is %d."), GetLastError());
+ MsgErr(NULL, LPGENW("Details dialog failed to be created. Returning error is %d."), GetLastError());
return 0;
}
@@ -356,7 +356,7 @@ static INT_PTR AddPage(WPARAM wParam, LPARAM lParam) if (pPsh->_dwFlags & (PSF_PROTOPAGESONLY | PSF_PROTOPAGESONLY_INIT)) {
BYTE bIsUnicode = (odp->flags & ODPF_UNICODE) == ODPF_UNICODE;
- TCHAR *ptszTitle = bIsUnicode ? mir_tstrdup(odp->ptszTitle) : mir_a2t(odp->pszTitle);
+ wchar_t *ptszTitle = bIsUnicode ? mir_tstrdup(odp->pwszTitle) : mir_a2t(odp->pszTitle);
// avoid adding pages for a meta subcontact, which have been added for a metacontact.
if (pPsh->_dwFlags & PSF_PROTOPAGESONLY) {
@@ -428,65 +428,65 @@ static int OnShutdown(WPARAM, LPARAM) **/
static int AddProtocolPages(OPTIONSDIALOGPAGE& odp, WPARAM wParam, LPSTR pszProto = NULL)
{
- TCHAR szTitle[MAX_PATH];
+ wchar_t szTitle[MAX_PATH];
const BYTE ofs = (pszProto) ? mir_sntprintf(szTitle, L"%S\\", pszProto) : 0;
- odp.ptszTitle = szTitle;
+ odp.pwszTitle = szTitle;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_GENERAL);
odp.position = 0x8000000;
odp.pfnDlgProc = PSPProcGeneral;
odp.hIcon = (HICON)ICONINDEX(IDI_TREE_GENERAL);
- mir_tstrncpy(szTitle + ofs, LPGENT("General"), _countof(szTitle) - ofs);
+ mir_tstrncpy(szTitle + ofs, LPGENW("General"), _countof(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ADDRESS);
odp.position = 0x8000001;
odp.pfnDlgProc = PSPProcContactHome;
odp.hIcon = (HICON)ICONINDEX(IDI_TREE_ADDRESS);
- mir_tstrncpy(szTitle + ofs, LPGENT("General") L"\\" LPGENT("Contact (private)"), _countof(szTitle) - ofs);
+ mir_tstrncpy(szTitle + ofs, LPGENW("General") L"\\" LPGENW("Contact (private)"), _countof(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ORIGIN);
odp.position = 0x8000002;
odp.pfnDlgProc = PSPProcOrigin;
odp.hIcon = (HICON)ICONINDEX(IDI_TREE_ADVANCED);
- mir_tstrncpy(szTitle + ofs, LPGENT("General") L"\\" LPGENT("Origin"), _countof(szTitle) - ofs);
+ mir_tstrncpy(szTitle + ofs, LPGENW("General") L"\\" LPGENW("Origin"), _countof(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ANNIVERSARY);
odp.position = 0x8000003;
odp.pfnDlgProc = PSPProcAnniversary;
odp.hIcon = (HICON)ICONINDEX(IDI_BIRTHDAY);
- mir_tstrncpy(szTitle + ofs, LPGENT("General") L"\\" LPGENT("Anniversaries"), _countof(szTitle) - ofs);
+ mir_tstrncpy(szTitle + ofs, LPGENW("General") L"\\" LPGENW("Anniversaries"), _countof(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_COMPANY);
odp.position = 0x8000004;
odp.pfnDlgProc = PSPProcCompany;
odp.hIcon = (HICON)ICONINDEX(IDI_TREE_COMPANY);
- mir_tstrncpy(szTitle + ofs, LPGENT("Work"), _countof(szTitle) - ofs);
+ mir_tstrncpy(szTitle + ofs, LPGENW("Work"), _countof(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ADDRESS);
odp.position = 0x8000005;
odp.pfnDlgProc = PSPProcContactWork;
odp.hIcon = (HICON)ICONINDEX(IDI_TREE_ADDRESS);
- mir_tstrncpy(szTitle + ofs, LPGENT("Work") L"\\" LPGENT("Contact (work)"), _countof(szTitle) - ofs);
+ mir_tstrncpy(szTitle + ofs, LPGENW("Work") L"\\" LPGENW("Contact (work)"), _countof(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ABOUT);
odp.position = 0x8000006;
odp.pfnDlgProc = PSPProcAbout;
odp.hIcon = (HICON)ICONINDEX(IDI_TREE_ABOUT);
- mir_tstrncpy(szTitle + ofs, LPGENT("About"), _countof(szTitle) - ofs);
+ mir_tstrncpy(szTitle + ofs, LPGENW("About"), _countof(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_PROFILE);
odp.position = 0x8000007;
odp.pfnDlgProc = PSPProcContactProfile;
odp.hIcon = (HICON)ICONINDEX(IDI_TREE_PROFILE);
- mir_tstrncpy(szTitle + ofs, LPGENT("About") L"\\" LPGENT("Profile"), _countof(szTitle) - ofs);
+ mir_tstrncpy(szTitle + ofs, LPGENW("About") L"\\" LPGENW("Profile"), _countof(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
return 0;
}
@@ -508,16 +508,16 @@ static int InitDetails(WPARAM wParam, LPARAM lParam) OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = ghInst;
odp.flags = ODPF_ICON | ODPF_TCHAR;
- odp.ptszGroup = IcoLib_GetDefaultIconFileName();
+ odp.pwszGroup = IcoLib_GetDefaultIconFileName();
if (lParam) {
// ignore common pages for weather contacts
if (!pPsh->_pszProto || _stricmp(pPsh->_pszProto, "weather")) {
AddProtocolPages(odp, wParam);
- odp.ptszTitle = LPGENT("About") L"\\" LPGENT("Notes");
+ odp.pwszTitle = LPGENW("About") L"\\" LPGENW("Notes");
}
else
- odp.ptszTitle = LPGENT("Notes");
+ odp.pwszTitle = LPGENW("Notes");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ABOUT);
odp.position = 0x8000008;
@@ -1218,9 +1218,9 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar }
else if (ack->result == ACKRESULT_FAILED) {
MsgBox(hDlg, MB_ICON_WARNING,
- LPGENT("Upload ICQ details"),
- LPGENT("Upload failed"),
- LPGENT("Your details were not uploaded successfully.\nThey were written to database only."));
+ LPGENW("Upload ICQ details"),
+ LPGENW("Upload failed"),
+ LPGENW("Your details were not uploaded successfully.\nThey were written to database only."));
KillTimer(hDlg, TIMERID_UPDATING);
ShowWindow(GetDlgItem(hDlg, TXT_UPDATING), SW_HIDE);
DlgProc(hDlg, M_CHECKONLINE, NULL, NULL);
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.h b/plugins/UserInfoEx/src/dlg_propsheet.h index 8e28a102cc..f2e1d88871 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.h +++ b/plugins/UserInfoEx/src/dlg_propsheet.h @@ -226,7 +226,7 @@ public: WORD _numPages; // number of pages
DWORD _dwFlags; // some option flags
HIMAGELIST _hImages; // the imagelist with all tree item icons
- LIST<TCHAR> _ignore; // list of to skipp items when adding metasubcontacts pages
+ LIST<wchar_t> _ignore; // list of to skipp items when adding metasubcontacts pages
int _nSubContact; // index of a current subcontact
CPsHdr();
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp index 27c15f4d03..96cd972f8c 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp @@ -477,8 +477,8 @@ BYTE CExImContactBase::isHandle(MCONTACT hContact) if (dbv.type == DBVT_UTF8 && dbv.pszVal && !mir_strcmpi(dbv.pszVal,_pszNick)) { LPTSTR ptszNick = mir_utf8decodeT(_pszNick); LPTSTR ptszProto = mir_a2t(_pszProto); - int ans = MsgBox(NULL, MB_ICONQUESTION|MB_YESNO, LPGENT("Question"), LPGENT("contact identification"), - LPGENT("The contact %s(%s) has no unique ID in the vCard,\nbut there is a contact in your contact list with the same nick and protocol.\nDo you wish to use this contact?"), + int ans = MsgBox(NULL, MB_ICONQUESTION|MB_YESNO, LPGENW("Question"), LPGENW("contact identification"), + LPGENW("The contact %s(%s) has no unique ID in the vCard,\nbut there is a contact in your contact list with the same nick and protocol.\nDo you wish to use this contact?"), ptszNick, ptszProto); MIR_FREE(ptszNick); MIR_FREE(ptszProto); diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp index 39e31af3ab..e75750654f 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp @@ -603,9 +603,9 @@ int CExImContactXML::ImportContact() // ask to delete new incomplete contact
if (_isNewContact && _hContact != NULL) {
int result = MsgBox(NULL, MB_YESNO|MB_ICONWARNING,
- LPGENT("Question"),
- LPGENT("Importing a new contact was aborted!"),
- LPGENT("You aborted import of a new contact.\nSome information may be missing for this contact.\n\nDo you want to delete the incomplete contact?"));
+ LPGENW("Question"),
+ LPGENW("Importing a new contact was aborted!"),
+ LPGENW("You aborted import of a new contact.\nSome information may be missing for this contact.\n\nDo you want to delete the incomplete contact?"));
if (result == IDYES) {
DB::Contact::Delete(_hContact);
_hContact = INVALID_CONTACT_ID;
@@ -742,9 +742,9 @@ int CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact) LPTSTR ptszNick = mir_utf8decodeT(_pszNick);
LPTSTR ptszMetaNick = mir_utf8decodeT(pMetaContact->_pszNick);
int result = MsgBox(NULL, MB_YESNO|MB_ICONWARNING,
- LPGENT("Question"),
- LPGENT("Importing a new meta subcontact failed!"),
- LPGENT("The newly created meta subcontact '%s'\ncould not be added to metacontact '%s'!\n\nDo you want to delete this contact?"),
+ LPGENW("Question"),
+ LPGENW("Importing a new meta subcontact failed!"),
+ LPGENW("The newly created meta subcontact '%s'\ncould not be added to metacontact '%s'!\n\nDo you want to delete this contact?"),
ptszNick, ptszMetaNick);
MIR_FREE(ptszNick);
MIR_FREE(ptszMetaNick);
@@ -821,7 +821,7 @@ int CExImContactXML::ImportModule(TiXmlNode* xmlModule) else if (ImportSetting(pszModule, xKey->ToElement()) == ERROR_OK) {
_pXmlFile->_numSettingsDone++;
}
- if (!_pXmlFile->_progress.UpdateSetting(LPGENT("Settings: %S"), pszModule))
+ if (!_pXmlFile->_progress.UpdateSetting(LPGENW("Settings: %S"), pszModule))
return ERROR_ABORTED;
}
// import event
@@ -835,7 +835,7 @@ int CExImContactXML::ImportModule(TiXmlNode* xmlModule) _pXmlFile->_numEventsDuplicated++;
break;
}
- if (!_pXmlFile->_progress.UpdateSetting(LPGENT("Events: %S"), pszModule))
+ if (!_pXmlFile->_progress.UpdateSetting(LPGENW("Events: %S"), pszModule))
return ERROR_ABORTED;
}
} //*end for
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp index 5c43c0a7f1..10c51971b4 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp @@ -196,7 +196,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar // Set the Window Title and description
{
LPCTSTR name = NULL;
- TCHAR oldTitle[MAXDATASIZE],
+ wchar_t oldTitle[MAXDATASIZE],
newTitle[MAXDATASIZE];
switch (pDat->ExImContact->Typ) {
case EXIM_ALL:
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp index e54f06003b..380e238788 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp @@ -106,7 +106,7 @@ static LRESULT CALLBACK PlacesBarSubclassProc(HWND hWnd, UINT uMsg, WPARAM wPara {
if (uMsg == TB_ADDBUTTONS) {
TBBUTTON *tbb = (TBBUTTON *)lParam;
- TCHAR szBtnText[MAX_PATH];
+ wchar_t szBtnText[MAX_PATH];
int iString;
HWND hWndToolTip;
@@ -280,7 +280,7 @@ int DlgExIm_OpenFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPS ofn.Flags |= OFN_PATHMUSTEXIST;
if (!GetOpenFileNameA(&ofn)) {
DWORD dwError = CommDlgExtendedError();
- if (dwError) MsgErr(ofn.hwndOwner, LPGENT("The OpenFileDialog returned an error: %d!"), dwError);
+ if (dwError) MsgErr(ofn.hwndOwner, LPGENW("The OpenFileDialog returned an error: %d!"), dwError);
return -1;
}
SaveInitialDir(pszFile);
@@ -307,7 +307,7 @@ int DlgExIm_SaveFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPS if (!GetSaveFileNameA(&ofn)) {
DWORD dwError = CommDlgExtendedError();
- if (dwError) MsgErr(ofn.hwndOwner, LPGENT("The SaveFileDialog returned an error: %d!"), dwError);
+ if (dwError) MsgErr(ofn.hwndOwner, LPGENW("The SaveFileDialog returned an error: %d!"), dwError);
return -1;
}
SaveInitialDir(pszFile);
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp index 524b3d2169..92981e12d7 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp @@ -187,7 +187,7 @@ BYTE CProgress::UpdateContact(LPCTSTR pszFormat, ...) if (_hDlg != NULL) {
HWND hProg = GetDlgItem(_hDlg, IDC_PROGRESS2);
if (pszFormat) {
- TCHAR buf[MAX_PATH];
+ wchar_t buf[MAX_PATH];
va_list vl;
va_start(vl, pszFormat);
@@ -213,8 +213,8 @@ BYTE CProgress::UpdateSetting(LPCTSTR pszFormat, ...) if (_hDlg != NULL) {
HWND hProg = GetDlgItem(_hDlg, IDC_PROGRESS);
if (pszFormat) {
- TCHAR buf[MAX_PATH];
- TCHAR tmp[MAX_PATH];
+ wchar_t buf[MAX_PATH];
+ wchar_t tmp[MAX_PATH];
va_list vl;
va_start(vl, pszFormat);
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp index a45dc00c67..dfc1499a08 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp @@ -172,7 +172,7 @@ int SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName) if (err != NULL) { MsgErr(NULL, - LPGENT("The ini-file \"%s\"\nfor saving contact information could not be opened."), + LPGENW("The ini-file \"%s\"\nfor saving contact information could not be opened."), pszFileName); return 1; } @@ -500,19 +500,19 @@ int SvcExImINI_Import(MCONTACT hContact, LPCSTR pszFileName) // the contact was not found in the file if (numContactsInFile > 0 && !numContactsAdded) { MsgErr(NULL, - LPGENT("None of the %d contacts, stored in the ini-file, match the selected contact!\nNothing will be imported"), + LPGENW("None of the %d contacts, stored in the ini-file, match the selected contact!\nNothing will be imported"), numContactsInFile); } // Import complete else{ - MsgBox(NULL, MB_ICON_INFO, LPGENT("Import complete"), LPGENT("Some basic statistics"), - LPGENT("Added %d of %d contacts stored in the ini-file."), + MsgBox(NULL, MB_ICON_INFO, LPGENW("Import complete"), LPGENW("Some basic statistics"), + LPGENW("Added %d of %d contacts stored in the ini-file."), numContactsAdded, numContactsInFile); } return 0; } MsgErr(NULL, - LPGENT("The ini-file \"%s\"\nfor reading contact information could not be opened."), + LPGENW("The ini-file \"%s\"\nfor reading contact information could not be opened."), pszFileName); return 1; } diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp index 35975b1abd..30f7151067 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp @@ -107,7 +107,7 @@ int CFileXml::Export(lpExImParam ExImContact, LPCSTR pszFileName) FILE *xmlfile = fopen(pszFileName, "wt");
if (!xmlfile)
{
- MsgErr(NULL, LPGENT("Can't create xml file!\n%S"), pszFileName);
+ MsgErr(NULL, LPGENW("Can't create xml file!\n%S"), pszFileName);
return 1;
}
@@ -183,7 +183,7 @@ int CFileXml::Export(lpExImParam ExImContact, LPCSTR pszFileName) } // *end for
#ifdef _DEBUG
QueryPerformanceCounter(&t2);
- MsgErr(NULL, LPGENT("Export took %f ms"),
+ MsgErr(NULL, LPGENW("Export took %f ms"),
(long double)(t2.QuadPart - t1.QuadPart) / freq.QuadPart * 1000.);
#endif
}// *end other export mode
@@ -255,7 +255,7 @@ int CFileXml::ImportContacts(TiXmlElement* xmlParent) // update progressbar and abort if user clicked cancel
LPTSTR pszNick = mir_utf8decodeT(xContact->Attribute("nick"));
// user clicked abort button
- if (_progress.UpdateContact(LPGENT("Contact: %s (%S)"), pszNick, xContact->Attribute("proto"))) {
+ if (_progress.UpdateContact(LPGENW("Contact: %s (%S)"), pszNick, xContact->Attribute("proto"))) {
int result = vContact.LoadXmlElemnt(xContact);
switch (result) {
case ERROR_OK:
@@ -271,7 +271,7 @@ int CFileXml::ImportContacts(TiXmlElement* xmlParent) return ERROR_ABORTED;
#ifdef _DEBUG
default:
- MsgErr(NULL, LPGENT("Importing %s caused error %d"), pszNick, result);
+ MsgErr(NULL, LPGENW("Importing %s caused error %d"), pszNick, result);
break;
#endif
}
@@ -282,7 +282,7 @@ int CFileXml::ImportContacts(TiXmlElement* xmlParent) return ERROR_ABORTED;
#ifdef _DEBUG
default:
- MsgErr(NULL, LPGENT("Loading contact %s from xml failed with error %d"), pszNick, result);
+ MsgErr(NULL, LPGENW("Loading contact %s from xml failed with error %d"), pszNick, result);
break;
#endif
}
@@ -300,7 +300,7 @@ int CFileXml::ImportContacts(TiXmlElement* xmlParent) return ERROR_ABORTED;
#ifdef _DEBUG
default:
- MsgErr(NULL, LPGENT("Importing Owner caused error %d"), result);
+ MsgErr(NULL, LPGENW("Importing Owner caused error %d"), result);
#endif
}
}
@@ -345,19 +345,19 @@ int CFileXml::Import(MCONTACT hContact, LPCSTR pszFileName) // load xml file
TiXmlDocument doc;
if (!doc.LoadFile(pszFileName)) {
- MsgErr(NULL, LPGENT("Parser is unable to load XMLCard \"%s\"\nError: %d\nDescription: %s"),
+ MsgErr(NULL, LPGENW("Parser is unable to load XMLCard \"%s\"\nError: %d\nDescription: %s"),
pszFileName, doc.ErrorId(), doc.ErrorDesc());
return 1;
}
// is xmlfile a XMLCard ?
TiXmlElement *xmlCard = doc.FirstChildElement("XMLCard");
if (xmlCard == NULL) {
- MsgErr(NULL, LPGENT("The selected file is no valid XMLCard"));
+ MsgErr(NULL, LPGENW("The selected file is no valid XMLCard"));
return 1;
}
// check version
if (mir_strcmp(xmlCard->Attribute("ver"), XMLCARD_VERSION)) {
- MsgErr(NULL, LPGENT("The version of the XMLCard is not supported by UserInfoEx"));
+ MsgErr(NULL, LPGENW("The version of the XMLCard is not supported by UserInfoEx"));
return 1;
}
@@ -374,12 +374,12 @@ int CFileXml::Import(MCONTACT hContact, LPCSTR pszFileName) if (!ret) {
MsgBox(NULL, MB_ICONINFORMATION,
- LPGENT("Complete"),
- LPGENT("Import complete"),
- LPGENT("Owner contact successfully imported."));
+ LPGENW("Complete"),
+ LPGENW("Import complete"),
+ LPGENW("Owner contact successfully imported."));
return 0;
} else {
- MsgErr(NULL, LPGENT("Selected XMLCard does not contain an owner contact!"));
+ MsgErr(NULL, LPGENW("Selected XMLCard does not contain an owner contact!"));
return 1;
}
}
@@ -406,12 +406,12 @@ int CFileXml::Import(MCONTACT hContact, LPCSTR pszFileName) #ifdef _DEBUG
QueryPerformanceCounter(&t2);
- MsgErr(NULL, LPGENT("Import took %f ms"),
+ MsgErr(NULL, LPGENW("Import took %f ms"),
(long double)(t2.QuadPart - t1.QuadPart) / freq.QuadPart * 1000.);
#endif
// show results
- MsgBox(NULL, MB_ICONINFORMATION, LPGENT("Import complete"), LPGENT("Some basic statistics"),
- LPGENT("added contacts: %u / %u\nadded settings: %u / %u\nadded events %u / %u\nduplicated events: %u"),
+ MsgBox(NULL, MB_ICONINFORMATION, LPGENW("Import complete"), LPGENW("Some basic statistics"),
+ LPGENW("added contacts: %u / %u\nadded settings: %u / %u\nadded events %u / %u\nduplicated events: %u"),
_numContactsDone, _numContactsTodo,
_numSettingsDone, _numSettingsTodo,
_numEventsDone, _numEventsTodo,
@@ -421,7 +421,7 @@ int CFileXml::Import(MCONTACT hContact, LPCSTR pszFileName) return 0;
}
catch(...) {
- MsgErr(NULL, LPGENT("FATAL: An exception was thrown while importing contacts from xmlCard!"));
+ MsgErr(NULL, LPGENW("FATAL: An exception was thrown while importing contacts from xmlCard!"));
return 1;
}
}
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp index 157094e89e..864129010c 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp @@ -266,7 +266,7 @@ INT_PTR svcExIm_Group_Service(WPARAM wParam, LPARAM) {
ExImParam ExIm;
INT_PTR hItem = 0, hRoot = 0, hParent = 0;
- TCHAR tszGroup[120], tszItem[120];
+ wchar_t tszGroup[120], tszItem[120];
memset(&tszGroup, 0, sizeof(tszGroup));
memset(&tszItem, 0, sizeof(tszItem));
memset(&ExIm, 0, sizeof(ExIm));
diff --git a/plugins/UserInfoEx/src/mir_icolib.cpp b/plugins/UserInfoEx/src/mir_icolib.cpp index 9f39826acd..6cb53675a8 100644 --- a/plugins/UserInfoEx/src/mir_icolib.cpp +++ b/plugins/UserInfoEx/src/mir_icolib.cpp @@ -132,7 +132,7 @@ LPTSTR IcoLib_GetDefaultIconFileName() L"Plugins\\uinfoex_icons.dll",
L"Customize\\Icons\\uinfoex_icons.dll"
};
- TCHAR absolute[MAX_PATH];
+ wchar_t absolute[MAX_PATH];
for (int i = 0; i < _countof(path); i++) {
PathToAbsoluteT(path[i], absolute);
@@ -156,7 +156,7 @@ static void IcoLib_CheckIconPackVersion(LPTSTR szIconPack) {
if (db_get_b(NULL, MODNAME, SET_ICONS_CHECKFILEVERSION, TRUE)) {
if (szIconPack) {
- TCHAR szAbsolutePath[MAX_PATH];
+ wchar_t szAbsolutePath[MAX_PATH];
PathToAbsoluteT(szIconPack, szAbsolutePath);
HMODULE hIconDll = LoadLibrary(szAbsolutePath);
@@ -165,12 +165,12 @@ static void IcoLib_CheckIconPackVersion(LPTSTR szIconPack) if (!LoadStringA(hIconDll, IDS_ICOPACKVERSION, szFileVersion, sizeof(szFileVersion))
|| mir_strcmp(szFileVersion, "__UserInfoEx_IconPack_1.2__"))
- MsgErr(NULL, LPGENT("Warning: Your current IconPack's version differs from the one UserInfoEx is designed for.\nSome icons may not be displayed correctly"));
+ MsgErr(NULL, LPGENW("Warning: Your current IconPack's version differs from the one UserInfoEx is designed for.\nSome icons may not be displayed correctly"));
FreeLibrary(hIconDll);
}
}
else
- MsgErr(NULL, LPGENT("Warning: No IconPack found in one of the following directories: 'customize\\icons', 'icons' or 'plugins'!"));
+ MsgErr(NULL, LPGENW("Warning: No IconPack found in one of the following directories: 'customize\\icons', 'icons' or 'plugins'!"));
}
}
@@ -229,10 +229,10 @@ static HANDLE IcoLib_RegisterIconHandleEx(LPSTR szIconID, LPSTR szDescription, L SKINICONDESC sid = { 0 };
sid.flags = SIDF_ALL_TCHAR;
sid.pszName = szIconID;
- sid.description.t = mir_a2t(szDescription);
- sid.section.t = mir_a2t(szSection);
+ sid.description.w = mir_a2t(szDescription);
+ sid.section.w = mir_a2t(szSection);
- if (sid.description.t && sid.section.t) {
+ if (sid.description.w && sid.section.w) {
switch (Size) {
// small icons (16x16)
case 0:
@@ -252,8 +252,8 @@ static HANDLE IcoLib_RegisterIconHandleEx(LPSTR szIconID, LPSTR szDescription, L break;
}
- sid.defaultFile.t = szDefaultFile;
- if (sid.defaultFile.t && sid.defaultFile.t[0])
+ sid.defaultFile.w = szDefaultFile;
+ if (sid.defaultFile.w && sid.defaultFile.w[0])
sid.iDefaultIndex = -idIcon;
else {
sid.hDefaultIcon = hDefIcon;
@@ -261,8 +261,8 @@ static HANDLE IcoLib_RegisterIconHandleEx(LPSTR szIconID, LPSTR szDescription, L }
hIconHandle = IcoLib_AddIcon(&sid);
}
- MIR_FREE(sid.description.t);
- MIR_FREE(sid.section.t);
+ MIR_FREE(sid.description.w);
+ MIR_FREE(sid.section.w);
}
return hIconHandle;
}
diff --git a/plugins/UserInfoEx/src/mir_icolib.h b/plugins/UserInfoEx/src/mir_icolib.h index 7ac5bd5e36..f6220fda85 100644 --- a/plugins/UserInfoEx/src/mir_icolib.h +++ b/plugins/UserInfoEx/src/mir_icolib.h @@ -24,11 +24,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // sections
#define SECT_COMMON LPGEN("Extended user info")
-#define SECT_ZODIAC "Extended user info/Zodiacs"
-#define SECT_DLG "Extended user info/Dialogs"
-#define SECT_BUTTONS "Extended user info/Buttons"
-#define SECT_TREE "Extended user info/Treeview"
-#define SECT_REMIND "Extended user info/Reminder"
+#define SECT_ZODIAC LPGEN("Extended user info/Zodiacs")
+#define SECT_DLG LPGEN("Extended user info/Dialogs")
+#define SECT_BUTTONS LPGEN("Extended user info/Buttons")
+#define SECT_TREE LPGEN("Extended user info/Treeview")
+#define SECT_REMIND LPGEN("Extended user info/Reminder")
// icons
#define ICO_COMMON_MAIN MODNAME"_common_main"
diff --git a/plugins/UserInfoEx/src/psp_about.cpp b/plugins/UserInfoEx/src/psp_about.cpp index d097a200b6..d19175763e 100644 --- a/plugins/UserInfoEx/src/psp_about.cpp +++ b/plugins/UserInfoEx/src/psp_about.cpp @@ -43,9 +43,9 @@ INT_PTR CALLBACK PSPProcEdit(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam, SendDlgItemMessage(hDlg, IDC_PAGETITLE, WM_SETFONT, (WPARAM)hBoldFont, 0);
if (!mir_strcmp(pszSetting, SET_CONTACT_MYNOTES))
- SetDlgItemText(hDlg, IDC_PAGETITLE, LPGENT("My notes:"));
+ SetDlgItemText(hDlg, IDC_PAGETITLE, LPGENW("My notes:"));
else
- SetDlgItemText(hDlg, IDC_PAGETITLE, LPGENT("About:"));
+ SetDlgItemText(hDlg, IDC_PAGETITLE, LPGENW("About:"));
TranslateDialogDefault(hDlg);
diff --git a/plugins/UserInfoEx/src/psp_anniversary.cpp b/plugins/UserInfoEx/src/psp_anniversary.cpp index 8683a347c7..b1c7514edc 100644 --- a/plugins/UserInfoEx/src/psp_anniversary.cpp +++ b/plugins/UserInfoEx/src/psp_anniversary.cpp @@ -78,10 +78,10 @@ static INT_PTR CALLBACK DlgProc_AnniversaryEditor(HWND hDlg, UINT uMsg, WPARAM w LPTSTR pszText;
if (len == 0
- || (pszText = (LPTSTR)_alloca((len + 1) * sizeof(TCHAR))) == NULL
+ || (pszText = (LPTSTR)_alloca((len + 1) * sizeof(wchar_t))) == NULL
|| !Edit_GetText(hEdit, pszText, len + 1))
{
- MsgErr(hDlg, LPGENT("Please enter a valid description first!"));
+ MsgErr(hDlg, LPGENW("Please enter a valid description first!"));
break;
}
@@ -213,7 +213,7 @@ INT_PTR CALLBACK PSPProcAnniversary(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM if (HIWORD(wParam) == BN_CLICKED && PtrIsValid(pDateCtrl)) {
MAnnivDate *pDate = pDateCtrl->Current();
if (!pDate)
- MsgErr(hDlg, LPGENT("No valid date selected for editing!"));
+ MsgErr(hDlg, LPGENW("No valid date selected for editing!"));
else if (
IDOK == DialogBoxParam(ghInst, MAKEINTRESOURCE(IDD_ANNIVERSARY_EDITOR), hDlg, DlgProc_AnniversaryEditor, (LPARAM)pDate) &&
(pDate->Flags() & (MAnnivDate::MADF_CHANGED | MAnnivDate::MADF_REMINDER_CHANGED)))
@@ -232,8 +232,8 @@ INT_PTR CALLBACK PSPProcAnniversary(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM if (HIWORD(wParam) == BN_CLICKED && PtrIsValid(pDateCtrl)) {
MAnnivDate *pCurrent = pDateCtrl->Current();
if (pCurrent) {
- int rc = MsgBox(hDlg, MB_YESNO | MB_ICON_QUESTION | MB_NOPOPUP, LPGENT("Delete"), NULL,
- LPGENT("Do you really want to delete the %s?"), pCurrent->Description());
+ int rc = MsgBox(hDlg, MB_YESNO | MB_ICON_QUESTION | MB_NOPOPUP, LPGENW("Delete"), NULL,
+ LPGENW("Do you really want to delete the %s?"), pCurrent->Description());
if (rc == IDYES)
pDateCtrl->DeleteDate(pDateCtrl->CurrentIndex());
diff --git a/plugins/UserInfoEx/src/psp_contact.cpp b/plugins/UserInfoEx/src/psp_contact.cpp index 997df02d38..2f0f6a9fa0 100644 --- a/plugins/UserInfoEx/src/psp_contact.cpp +++ b/plugins/UserInfoEx/src/psp_contact.cpp @@ -38,7 +38,7 @@ INT_PTR CALLBACK PSPProcContactHome(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM {
CCtrlList *pCtrlList = CCtrlList::CreateObj(hDlg);
if (pCtrlList) {
- TCHAR szAddr[MAX_PATH];
+ wchar_t szAddr[MAX_PATH];
LPIDSTRLIST pList;
UINT nList;
@@ -184,7 +184,7 @@ INT_PTR CALLBACK PSPProcContactWork(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM CCtrlList *pCtrlList = CCtrlList::CreateObj(hDlg);
if (pCtrlList)
{
- TCHAR szAddr[MAX_PATH];
+ wchar_t szAddr[MAX_PATH];
LPIDSTRLIST pList;
UINT nList;
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp index 50819e7922..fa6a41a010 100644 --- a/plugins/UserInfoEx/src/psp_options.cpp +++ b/plugins/UserInfoEx/src/psp_options.cpp @@ -447,9 +447,9 @@ static INT_PTR CALLBACK DlgProc_AdvancedOpts(HWND hDlg, UINT uMsg, WPARAM wParam case BTN_OPT_RESET:
BYTE WantReset = MsgBox(hDlg,
MB_ICON_WARNING | MB_YESNO,
- LPGENT("Question"),
- LPGENT("Reset factory defaults"),
- LPGENT("This will delete all settings, you've made!\nAll TreeView settings, window positions and any other settings!\n\nAre you sure to proceed?"));
+ LPGENW("Question"),
+ LPGENW("Reset factory defaults"),
+ LPGENW("This will delete all settings, you've made!\nAll TreeView settings, window positions and any other settings!\n\nAre you sure to proceed?"));
if (WantReset) {
MCONTACT hContact;
@@ -485,9 +485,9 @@ static INT_PTR CALLBACK DlgProc_AdvancedOpts(HWND hDlg, UINT uMsg, WPARAM wParam SendMessage(GetParent(hDlg), PSM_FORCECHANGED, NULL, NULL);
MsgBox(hDlg, MB_ICON_INFO,
- LPGENT("Ready"),
- LPGENT("Everything is done!"),
- LPGENT("All settings are reset to default values now!"));
+ LPGENW("Ready"),
+ LPGENW("Everything is done!"),
+ LPGENW("All settings are reset to default values now!"));
}
}
}
@@ -635,7 +635,7 @@ static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam SendDlgItemMessage(hDlg, EDIT_BIRTHMODULE, CB_SETCURSEL, db_get_b(NULL, MODNAME, SET_REMIND_BIRTHMODULE, DEFVAL_REMIND_BIRTHMODULE), NULL);
MTime mtLast;
- TCHAR szTime[MAX_PATH];
+ wchar_t szTime[MAX_PATH];
mtLast.DBGetStamp(NULL, MODNAME, SET_REMIND_LASTCHECK);
mtLast.UTCToLocal();
@@ -868,9 +868,9 @@ static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR if (IsDlgButtonChecked(hDlg, RADIO_OPT_POPUP_PERMANENT))
db_set_b(NULL, MODNAME, SET_POPUP_DELAY, 255);
else if (IsDlgButtonChecked(hDlg, RADIO_OPT_POPUP_CUSTOM)) {
- TCHAR szDelay[4];
+ wchar_t szDelay[4];
GetDlgItemText(hDlg, EDIT_DELAY, szDelay, _countof(szDelay));
- db_set_b(NULL, MODNAME, SET_POPUP_DELAY, (BYTE)_tcstol(szDelay, NULL, 10));
+ db_set_b(NULL, MODNAME, SET_POPUP_DELAY, (BYTE)wcstol(szDelay, NULL, 10));
}
else
db_unset(NULL, MODNAME, SET_POPUP_DELAY);
diff --git a/plugins/UserInfoEx/src/psp_origin.cpp b/plugins/UserInfoEx/src/psp_origin.cpp index a2c35c73b2..7dd0f8cc53 100644 --- a/plugins/UserInfoEx/src/psp_origin.cpp +++ b/plugins/UserInfoEx/src/psp_origin.cpp @@ -86,7 +86,7 @@ INT_PTR CALLBACK PSPProcOrigin(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara mt.FromStampAsUTC(dwStamp);
}
if (mt.IsValid()) {
- TCHAR szTime[MAX_PATH];
+ wchar_t szTime[MAX_PATH];
LPTSTR ptr;
mt.UTCToLocal();
@@ -133,7 +133,7 @@ INT_PTR CALLBACK PSPProcOrigin(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara case WM_TIMER:
{
- TCHAR szTime[32];
+ wchar_t szTime[32];
CTzCombo::GetObj(hDlg, EDIT_TIMEZONE)->GetTime(szTime, _countof(szTime));
SetDlgItemText(hDlg, TXT_TIME, szTime);
break;
diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp index a2a6917b3c..ead5c48503 100644 --- a/plugins/UserInfoEx/src/psp_profile.cpp +++ b/plugins/UserInfoEx/src/psp_profile.cpp @@ -67,9 +67,9 @@ typedef struct TProfileEntries { } PROFILEENTRY, *LPPROFILEENTRY;
static const PROFILEENTRY pFmt[3] = {
- { LPGENT("Past"), "Past%d", "Past%dText", (MIRANDASERVICE)GetPastList },
- { LPGENT("Affiliation"), "Affiliation%d", "Affiliation%dText", (MIRANDASERVICE)GetAffiliationsList },
- { LPGENT("Interest"), "Interest%dCat", "Interest%dText", (MIRANDASERVICE)GetInterestsList }
+ { LPGENW("Past"), "Past%d", "Past%dText", (MIRANDASERVICE)GetPastList },
+ { LPGENW("Affiliation"), "Affiliation%d", "Affiliation%dText", (MIRANDASERVICE)GetAffiliationsList },
+ { LPGENW("Interest"), "Interest%dCat", "Interest%dText", (MIRANDASERVICE)GetInterestsList }
};
static LRESULT CALLBACK ProfileList_LabelEditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -112,7 +112,7 @@ static int ProfileList_AddGroup(HWND hList, LPTSTR pszText, int iItem) static int ProfileList_GetItemText(HWND hList, int iItem, int iSubItem, LPTSTR pszText, int ccText)
{
LVITEM lvi;
- TCHAR szNull[2];
+ wchar_t szNull[2];
lvi.mask = LVIF_TEXT;
lvi.iItem = iItem;
@@ -223,7 +223,7 @@ static int ProfileList_EndLabelEdit(LPLISTCTRL pList, BYTE bSave) }
// value was edited
else {
- if ((ccText = GetWindowTextLength(hEdit)) > 0 && (szEdit = (LPTSTR)mir_alloc((ccText + 2) * sizeof(TCHAR)))) {
+ if ((ccText = GetWindowTextLength(hEdit)) > 0 && (szEdit = (LPTSTR)mir_alloc((ccText + 2) * sizeof(wchar_t)))) {
GetWindowText(hEdit, szEdit, ccText + 1);
szEdit[ccText + 1] = 0;
@@ -446,7 +446,7 @@ static BYTE ProfileList_AddNewItem(HWND hDlg, LPLISTCTRL pList, const PROFILEENT return TRUE;
}
mir_free(pItem);
- MsgErr(hDlg, LPGENT("Sorry, but there is a problem with adding a new item of type \"%s\""), pEntry->szGroup);
+ MsgErr(hDlg, LPGENW("Sorry, but there is a problem with adding a new item of type \"%s\""), pEntry->szGroup);
}
return FALSE;
}
@@ -907,7 +907,7 @@ static LRESULT CALLBACK ProfileList_SubclassProc(HWND hwnd, UINT msg, WPARAM wPa case BTN_EDIT:
{
int i;
- TCHAR szEdit[MAX_PATH];
+ wchar_t szEdit[MAX_PATH];
if (!PtrIsValid(pList = (LPLISTCTRL)GetUserData(hwnd)))
break;
@@ -1181,7 +1181,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR BYTE iFmt = -1;
int iItem;
LVITEM lvi;
- TCHAR szGroup[MAX_PATH];
+ wchar_t szGroup[MAX_PATH];
CHAR pszSetting[MAXSETTING];
LPLCITEM pItem;
LPSTR pszModule = USERINFO;
@@ -1332,7 +1332,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR ListView_GetItemRect(cd->nmcd.hdr.hwndFrom, cd->nmcd.dwItemSpec, &rc, LVIR_BOUNDS);
if (!PtrIsValid(pItem)) {
HFONT hBold, hFont;
- TCHAR szText[MAX_PATH];
+ wchar_t szText[MAX_PATH];
PSGetBoldFont(hDlg, hBold);
hFont = (HFONT)SelectObject(cd->nmcd.hdc, hBold);
@@ -1412,7 +1412,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR ProfileList_BeginLabelEdit(hList, ListView_GetSelectionMark(hList), 1);
break;
case BTN_DEL:
- if (IDYES == MsgBox(hDlg, MB_YESNO | MB_ICON_QUESTION, LPGENT("Question"), LPGENT("Delete an entry"), LPGENT("Do you really want to delete this entry?"))) {
+ if (IDYES == MsgBox(hDlg, MB_YESNO | MB_ICON_QUESTION, LPGENW("Question"), LPGENW("Delete an entry"), LPGENW("Do you really want to delete this entry?"))) {
int iItem = ListView_GetSelectionMark(hList);
pList = (LPLISTCTRL)GetUserData(hList);
diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp index 73a1dd982a..c47c9c5ac8 100644 --- a/plugins/UserInfoEx/src/svc_email.cpp +++ b/plugins/UserInfoEx/src/svc_email.cpp @@ -100,7 +100,7 @@ static INT_PTR MenuCommand(WPARAM wParam,LPARAM lParam) }
else {
result = 1;
- MsgBox((HWND)lParam, MB_OK, LPGENT("Send e-mail"), NULL, LPGENT("Memory allocation error!"));
+ MsgBox((HWND)lParam, MB_OK, LPGENW("Send e-mail"), NULL, LPGENW("Memory allocation error!"));
}
}
__except(GetExceptionCode()==EXCEPTION_ACCESS_VIOLATION ?
@@ -108,7 +108,7 @@ static INT_PTR MenuCommand(WPARAM wParam,LPARAM lParam) {
mir_free(val);
result = 1;
- MsgErr((HWND)lParam, LPGENT("Memory allocation error!"));
+ MsgErr((HWND)lParam, LPGENW("Memory allocation error!"));
}
return result;
}
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index 4833e52f12..b844322721 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -115,7 +115,7 @@ public: {
if (szText)
{
- TCHAR buf[MAXDATASIZE];
+ wchar_t buf[MAXDATASIZE];
va_list vl;
va_start(vl, szText);
@@ -144,11 +144,11 @@ public: if (szText)
{
INT_PTR cch = mir_tstrlen(szText);
- LPTSTR fmt = (LPTSTR) mir_alloc((cch + 1) * sizeof(TCHAR));
+ LPTSTR fmt = (LPTSTR) mir_alloc((cch + 1) * sizeof(wchar_t));
if (fmt)
{
- TCHAR buf[MAXDATASIZE];
+ wchar_t buf[MAXDATASIZE];
va_list vl;
mir_tstrcpy(fmt, szText);
@@ -165,13 +165,13 @@ public: // leading bbcode tag (e.g.: [b], [u], [i])
if ((s[1] == 'b' || s[1] == 'u' || s[1] == 'i') && s[2] == ']')
{
- memmove(s, s + 3, (e - s - 2) * sizeof(TCHAR));
+ memmove(s, s + 3, (e - s - 2) * sizeof(wchar_t));
e -= 3;
}
// ending bbcode tag (e.g.: [/b], [/u], [/i])
else if (s[1] == '/' && (s[2] == 'b' || s[2] == 'u' || s[2] == 'i') && s[3] == ']')
{
- memmove(s, s + 4, (e - s - 3) * sizeof(TCHAR));
+ memmove(s, s + 4, (e - s - 3) * sizeof(wchar_t));
e -= 4;
}
}
@@ -346,7 +346,7 @@ class CPopupUpdProgress : public CUpdProgress if (_szText)
{
INT_PTR cb = mir_tstrlen(_szText) + 8;
- LPTSTR pb = (LPTSTR) mir_alloc(cb * sizeof(TCHAR));
+ LPTSTR pb = (LPTSTR) mir_alloc(cb * sizeof(wchar_t));
if (pb)
{
@@ -602,7 +602,7 @@ class CContactUpdater : public CContactQueue // reset menu
if (hMenuItemRefresh)
- Menu_ModifyItem(hMenuItemRefresh, LPGENT("Refresh contact details"), IcoLib_GetIcon(ICO_BTN_UPDATE));
+ Menu_ModifyItem(hMenuItemRefresh, LPGENW("Refresh contact details"), IcoLib_GetIcon(ICO_BTN_UPDATE));
}
/**
@@ -713,7 +713,7 @@ public: // if there are contacts in the queue, change the main menu item to indicate it is meant for canceling.
if (hMenuItemRefresh && Size() > 0)
- Menu_ModifyItem(hMenuItemRefresh, LPGENT("Abort Refreshing Contact Details"), IcoLib_GetIcon(ICO_BTN_CANCEL));
+ Menu_ModifyItem(hMenuItemRefresh, LPGENW("Abort Refreshing Contact Details"), IcoLib_GetIcon(ICO_BTN_CANCEL));
}
/**
@@ -785,20 +785,20 @@ static INT_PTR RefreshService(WPARAM, LPARAM) {
ContactUpdater->RefreshAll();
}
- else if (IDYES == MsgBox(NULL, MB_YESNO|MB_ICON_QUESTION, LPGENT("Refresh contact details"), NULL,
- LPGENT("Do you want to cancel the current refresh procedure?")))
+ else if (IDYES == MsgBox(NULL, MB_YESNO|MB_ICON_QUESTION, LPGENW("Refresh contact details"), NULL,
+ LPGENW("Do you want to cancel the current refresh procedure?")))
{
ContactUpdater->Cancel();
}
}
else
{
- MsgErr(NULL, LPGENT("Miranda must be online for refreshing contact information!"));
+ MsgErr(NULL, LPGENW("Miranda must be online for refreshing contact information!"));
}
}
catch(...)
{
- MsgErr(NULL, LPGENT("The function caused an exception!"));
+ MsgErr(NULL, LPGENW("The function caused an exception!"));
}
return 0;
}
@@ -838,7 +838,7 @@ static int OnContactAdded(WPARAM hContact, LPARAM) }
catch(...)
{
- MsgErr(NULL, LPGENT("The function caused an exception!"));
+ MsgErr(NULL, LPGENW("The function caused an exception!"));
}
return 0;
}
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp index de7ee4ee19..700575c708 100644 --- a/plugins/UserInfoEx/src/svc_reminder.cpp +++ b/plugins/UserInfoEx/src/svc_reminder.cpp @@ -308,7 +308,7 @@ static void NotifyFlashCListIcon(MCONTACT hContact, const CEvent &evt) if (!gRemindOpts.bFlashCList || evt._wDaysLeft != 0)
return;
- TCHAR szMsg[MAX_PATH];
+ wchar_t szMsg[MAX_PATH];
CLISTEVENT cle = {};
cle.hContact = hContact;
@@ -431,7 +431,7 @@ static BYTE CheckAnniversaries(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE tszMsg.Append(L"\n...");
}
- NotifyWithPopup(hContact, CEvent::ANNIVERSARY, Diff, LPGENT("Anniversaries"), tszMsg);
+ NotifyWithPopup(hContact, CEvent::ANNIVERSARY, Diff, LPGENW("Anniversaries"), tszMsg);
}
return numAnniversaries != 0;
@@ -476,7 +476,7 @@ static bool CheckBirthday(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNoti }
if (bNotify) {
- TCHAR szMsg[MAXDATASIZE];
+ wchar_t szMsg[MAXDATASIZE];
WORD cchMsg = 0;
switch (Diff) {
diff --git a/plugins/UserInfoEx/src/svc_timezone_old.cpp b/plugins/UserInfoEx/src/svc_timezone_old.cpp index bd08054600..dfc50be0ed 100644 --- a/plugins/UserInfoEx/src/svc_timezone_old.cpp +++ b/plugins/UserInfoEx/src/svc_timezone_old.cpp @@ -176,7 +176,7 @@ public: hKeyTz;
DWORD i,
cbData;
- TCHAR szName[MAX_PATH],
+ wchar_t szName[MAX_PATH],
szDisplay[MAX_PATH];
CTimeZone *pTimeZone;
|