summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/buttonsbar.cpp6
-rw-r--r--plugins/TabSRMM/src/chat/chat.h2
-rw-r--r--plugins/TabSRMM/src/chat/log.cpp60
-rw-r--r--plugins/TabSRMM/src/chat/main.cpp6
-rw-r--r--plugins/TabSRMM/src/chat/options.cpp134
-rw-r--r--plugins/TabSRMM/src/chat/services.cpp12
-rw-r--r--plugins/TabSRMM/src/chat/tools.cpp12
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp36
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp8
-rw-r--r--plugins/TabSRMM/src/contactcache.h2
-rw-r--r--plugins/TabSRMM/src/container.cpp24
-rw-r--r--plugins/TabSRMM/src/containeroptions.cpp4
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp26
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp30
-rw-r--r--plugins/TabSRMM/src/globals.cpp16
-rw-r--r--plugins/TabSRMM/src/infopanel.cpp32
-rw-r--r--plugins/TabSRMM/src/mim.cpp16
-rw-r--r--plugins/TabSRMM/src/modplus.cpp8
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp12
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp110
-rw-r--r--plugins/TabSRMM/src/msglog.cpp24
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp14
-rw-r--r--plugins/TabSRMM/src/msgs.cpp24
-rw-r--r--plugins/TabSRMM/src/selectcontainer.cpp10
-rw-r--r--plugins/TabSRMM/src/sendlater.cpp8
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp10
-rw-r--r--plugins/TabSRMM/src/sidebar.cpp4
-rw-r--r--plugins/TabSRMM/src/srmm.cpp2
-rw-r--r--plugins/TabSRMM/src/tabctrl.cpp12
-rw-r--r--plugins/TabSRMM/src/taskbar.cpp16
-rw-r--r--plugins/TabSRMM/src/taskbar.h2
-rw-r--r--plugins/TabSRMM/src/templates.cpp38
-rw-r--r--plugins/TabSRMM/src/themeio.cpp8
-rw-r--r--plugins/TabSRMM/src/themes.cpp282
-rw-r--r--plugins/TabSRMM/src/trayicon.cpp6
-rw-r--r--plugins/TabSRMM/src/utils.cpp70
-rw-r--r--plugins/TabSRMM/src/utils.h2
37 files changed, 544 insertions, 544 deletions
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp
index 5f882b5faa..adb7c964c5 100644
--- a/plugins/TabSRMM/src/buttonsbar.cpp
+++ b/plugins/TabSRMM/src/buttonsbar.cpp
@@ -349,7 +349,7 @@ static void BB_RegisterSeparators()
}
}
-#define MIDDLE_SEPARATOR _T(">-------M-------<")
+#define MIDDLE_SEPARATOR L">-------M-------<"
static int SaveTree(HWND hToolBarTree)
{
@@ -1070,7 +1070,7 @@ void BB_InitDlgButtons(TWindowData *dat)
if (!cbd->m_bHidden && !cbd->m_bCanBeHidden)
dat->iButtonBarReallyNeeds += cbd->m_iButtonWidth + gap;
if (!cbd->m_bSeparator && !GetDlgItem(hdlg, cbd->m_dwButtonCID)) {
- hwndBtn = CreateWindowEx(0, _T("MButtonClass"), _T(""), WS_CHILD | WS_VISIBLE | WS_TABSTOP, rect.right - rwidth + gap, splitterY, cbd->m_iButtonWidth, DPISCALEY_S(22), hdlg, (HMENU)cbd->m_dwButtonCID, g_hInst, NULL);
+ hwndBtn = CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_VISIBLE | WS_TABSTOP, rect.right - rwidth + gap, splitterY, cbd->m_iButtonWidth, DPISCALEY_S(22), hdlg, (HMENU)cbd->m_dwButtonCID, g_hInst, NULL);
CustomizeButton(hwndBtn);
}
if (!cbd->m_bSeparator && hwndBtn)
@@ -1092,7 +1092,7 @@ void BB_InitDlgButtons(TWindowData *dat)
CustomButtonData *cbd = LButtonsList[i];
if (((dat->bType == SESSIONTYPE_IM && cbd->m_bIMButton) || (dat->bType == SESSIONTYPE_CHAT && cbd->m_bChatButton))) {
if (!cbd->m_bSeparator && !GetDlgItem(hdlg, cbd->m_dwButtonCID)) {
- hwndBtn = CreateWindowEx(0, _T("MButtonClass"), _T(""), WS_CHILD | WS_VISIBLE | WS_TABSTOP, 2 + lwidth, splitterY,
+ hwndBtn = CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 2 + lwidth, splitterY,
cbd->m_iButtonWidth, DPISCALEY_S(22), hdlg, (HMENU)cbd->m_dwButtonCID, g_hInst, NULL);
CustomizeButton(hwndBtn);
}
diff --git a/plugins/TabSRMM/src/chat/chat.h b/plugins/TabSRMM/src/chat/chat.h
index a9a6f92ff9..536f837528 100644
--- a/plugins/TabSRMM/src/chat/chat.h
+++ b/plugins/TabSRMM/src/chat/chat.h
@@ -160,6 +160,6 @@ BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce);
extern char szIndicators[];
-#define DEFLOGFILENAME _T("%miranda_logpath%\\%proto%\\%userid%.log")
+#define DEFLOGFILENAME L"%miranda_logpath%\\%proto%\\%userid%.log"
#endif
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp
index 33121fd580..a7894b3e37 100644
--- a/plugins/TabSRMM/src/chat/log.cpp
+++ b/plugins/TabSRMM/src/chat/log.cpp
@@ -115,7 +115,7 @@ static int Log_AppendIEView(LOGSTREAMDATA* streamData, BOOL simpleMode, TCHAR **
szTemp3[1] = line[2];
szTemp3[2] = '\0';
col = _ttoi(szTemp3);
- mir_sntprintf(szTemp, _T("%%%c#%02X%02X%02X"), c, GetRValue(mi->crColors[col]), GetGValue(mi->crColors[col]), GetBValue(mi->crColors[col]));
+ mir_sntprintf(szTemp, L"%%%c#%02X%02X%02X", c, GetRValue(mi->crColors[col]), GetGValue(mi->crColors[col]), GetBValue(mi->crColors[col]));
}
}
line += 2;
@@ -123,7 +123,7 @@ static int Log_AppendIEView(LOGSTREAMDATA* streamData, BOOL simpleMode, TCHAR **
case 'C':
case 'F':
if (!g_Settings.bStripFormat && !streamData->bStripFormat) {
- mir_sntprintf(szTemp, _T("%%%c"), *line);
+ mir_sntprintf(szTemp, L"%%%c", *line);
}
break;
case 'b':
@@ -134,7 +134,7 @@ static int Log_AppendIEView(LOGSTREAMDATA* streamData, BOOL simpleMode, TCHAR **
case 'I':
case 'r':
if (!streamData->bStripFormat) {
- mir_sntprintf(szTemp, _T("%%%c"), *line);
+ mir_sntprintf(szTemp, L"%%%c", *line);
}
break;
}
@@ -161,7 +161,7 @@ static int Log_AppendIEView(LOGSTREAMDATA* streamData, BOOL simpleMode, TCHAR **
static void AddEventTextToBufferIEView(TCHAR **buffer, int *bufferEnd, int *bufferAlloced, LOGSTREAMDATA *streamData)
{
if (streamData->lin->ptszText)
- Log_AppendIEView(streamData, FALSE, str, _T(": %s"), streamData->lin->ptszText);
+ Log_AppendIEView(streamData, FALSE, str, L": %s", streamData->lin->ptszText);
}
static void AddEventToBufferIEView(TCHAR **buffer, int *bufferEnd, int *bufferAlloced, LOGSTREAMDATA *streamData, TCHAR *pszNick)
@@ -178,14 +178,14 @@ static void AddEventToBufferIEView(TCHAR **buffer, int *bufferEnd, int *bufferAl
ptszText = ptszTemp = a2tcp(aText, streamData->dat->codePage);
mir_free(aText);
}
- Log_AppendIEView(streamData, FALSE, str, _T("%s"), ptszText);
+ Log_AppendIEView(streamData, FALSE, str, L"%s", ptszText);
mir_free(ptszTemp);
}
break;
case GC_EVENT_ACTION:
if (pszNick && streamData->lin->ptszText) {
- Log_AppendIEView(streamData, TRUE, str, _T("%s "), streamData->lin->ptszNick);
- Log_AppendIEView(streamData, FALSE, str, _T("%s"), streamData->lin->ptszText);
+ Log_AppendIEView(streamData, TRUE, str, L"%s ", streamData->lin->ptszNick);
+ Log_AppendIEView(streamData, FALSE, str, L"%s", streamData->lin->ptszText);
}
break;
case GC_EVENT_JOIN:
@@ -227,7 +227,7 @@ static void AddEventToBufferIEView(TCHAR **buffer, int *bufferEnd, int *bufferAl
break;
case GC_EVENT_TOPIC:
if (streamData->lin->ptszText)
- Log_AppendIEView(streamData, FALSE, str, TranslateT("The topic is '%s%s'"), streamData->lin->ptszText, _T("%r"));
+ Log_AppendIEView(streamData, FALSE, str, TranslateT("The topic is '%s%s'"), streamData->lin->ptszText, L"%r");
if (pszNick)
Log_AppendIEView(streamData, TRUE, str,
streamData->lin->ptszUserInfo ? TranslateT(" (set by %s on %s)") : TranslateT(" (set by %s)"),
@@ -235,7 +235,7 @@ static void AddEventToBufferIEView(TCHAR **buffer, int *bufferEnd, int *bufferAl
break;
case GC_EVENT_INFORMATION:
if (streamData->lin->ptszText)
- Log_AppendIEView(streamData, FALSE, str, (streamData->lin->bIsMe) ? _T("--> %s") : _T("%s"), streamData->lin->ptszText);
+ Log_AppendIEView(streamData, FALSE, str, (streamData->lin->bIsMe) ? L"--> %s" : L"%s", streamData->lin->ptszText);
break;
case GC_EVENT_ADDSTATUS:
if (pszNick && streamData->lin->ptszText && streamData->lin->ptszStatus)
@@ -532,17 +532,17 @@ static void AddEventToBuffer(CMStringA &str, LOGSTREAMDATA *streamData)
if (streamData->lin->ptszNick) {
if (g_Settings.bLogLimitNames && mir_tstrlen(streamData->lin->ptszNick) > 20) {
_tcsncpy_s(szTemp, 20, streamData->lin->ptszNick, _TRUNCATE);
- _tcsncpy_s(szTemp + 20, 4, _T("..."), _TRUNCATE);
+ _tcsncpy_s(szTemp + 20, 4, L"...", _TRUNCATE);
}
else _tcsncpy_s(szTemp, streamData->lin->ptszNick, _TRUNCATE);
if (g_Settings.bClickableNicks)
- mir_sntprintf(szTemp2, _T("~~++#%s#++~~"), szTemp);
+ mir_sntprintf(szTemp2, L"~~++#%s#++~~", szTemp);
else
_tcsncpy_s(szTemp2, szTemp, _TRUNCATE);
if (streamData->lin->ptszUserInfo && streamData->lin->iType != GC_EVENT_TOPIC)
- mir_sntprintf(szTemp, _T("%s (%s)"), szTemp2, streamData->lin->ptszUserInfo);
+ mir_sntprintf(szTemp, L"%s (%s)", szTemp2, streamData->lin->ptszUserInfo);
else
_tcsncpy_s(szTemp, szTemp2, _TRUNCATE);
pszNick = szTemp;
@@ -551,12 +551,12 @@ static void AddEventToBuffer(CMStringA &str, LOGSTREAMDATA *streamData)
switch (streamData->lin->iType) {
case GC_EVENT_MESSAGE:
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, str, _T("%s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, str, L"%s", streamData->lin->ptszText);
break;
case GC_EVENT_ACTION:
if (streamData->lin->ptszNick && streamData->lin->ptszText) {
- Log_AppendRTF(streamData, TRUE, str, _T("%s "), streamData->lin->ptszNick);
- Log_AppendRTF(streamData, FALSE, str, _T("%s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, TRUE, str, L"%s ", streamData->lin->ptszNick);
+ Log_AppendRTF(streamData, FALSE, str, L"%s", streamData->lin->ptszText);
}
break;
case GC_EVENT_JOIN:
@@ -572,13 +572,13 @@ static void AddEventToBuffer(CMStringA &str, LOGSTREAMDATA *streamData)
if (pszNick)
Log_AppendRTF(streamData, TRUE, str, TranslateT("%s has left"), pszNick);
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, str, _T(": %s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, str, L": %s", streamData->lin->ptszText);
break;
case GC_EVENT_QUIT:
if (pszNick)
Log_AppendRTF(streamData, TRUE, str, TranslateT("%s has disconnected"), pszNick);
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, str, _T(": %s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, str, L": %s", streamData->lin->ptszText);
break;
case GC_EVENT_NICK:
if (pszNick && streamData->lin->ptszText) {
@@ -594,17 +594,17 @@ static void AddEventToBuffer(CMStringA &str, LOGSTREAMDATA *streamData)
TranslateT("%s kicked %s"), streamData->lin->ptszStatus, pszNick);
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, str, _T(": %s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, str, L": %s", streamData->lin->ptszText);
break;
case GC_EVENT_NOTICE:
if (pszNick && streamData->lin->ptszText) {
Log_AppendRTF(streamData, TRUE, str, TranslateT("Notice from %s: "), pszNick);
- Log_AppendRTF(streamData, FALSE, str, _T("%s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, str, L"%s", streamData->lin->ptszText);
}
break;
case GC_EVENT_TOPIC:
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, str, TranslateT("The topic is '%s%s'"), streamData->lin->ptszText, _T("%r"));
+ Log_AppendRTF(streamData, FALSE, str, TranslateT("The topic is '%s%s'"), streamData->lin->ptszText, L"%r");
if (pszNick)
Log_AppendRTF(streamData, TRUE, str,
(streamData->lin->ptszUserInfo) ? TranslateT(" (set by %s on %s)") :
@@ -613,7 +613,7 @@ static void AddEventToBuffer(CMStringA &str, LOGSTREAMDATA *streamData)
break;
case GC_EVENT_INFORMATION:
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, str, (streamData->lin->bIsMe) ? _T("--> %s") : _T("%s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, str, (streamData->lin->bIsMe) ? L"--> %s" : L"%s", streamData->lin->ptszText);
break;
case GC_EVENT_ADDSTATUS:
if (pszNick && streamData->lin->ptszText && streamData->lin->ptszStatus)
@@ -776,7 +776,7 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData)
_tcsncpy_s(szOldTimeStamp, pci->MakeTimeStamp(g_Settings.pszTimeStamp, streamData->si->LastTime), _TRUNCATE);
if (!g_Settings.bShowTimeIfChanged || streamData->si->LastTime == 0 || mir_tstrcmp(szTimeStamp, szOldTimeStamp)) {
streamData->si->LastTime = lin->time;
- Log_AppendRTF(streamData, TRUE, str, _T("%s"), szTimeStamp);
+ Log_AppendRTF(streamData, TRUE, str, L"%s", szTimeStamp);
}
str.Append("\\tab ");
}
@@ -796,10 +796,10 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData)
str.Append(pszIndicator);
CMString pszTemp(lin->bIsMe ? g_Settings.pszOutgoingNick : g_Settings.pszIncomingNick);
- pszTemp.Replace(_T("%n"), _T("%s"));
+ pszTemp.Replace(L"%n", L"%s");
if (!lin->bIsMe) {
if (g_Settings.bClickableNicks)
- pszTemp.Replace(_T("%s"), _T("~~++#%s#++~~"));
+ pszTemp.Replace(L"%s", L"~~++#%s#++~~");
if (g_Settings.bColorizeNicksInLog && pszIndicator[0])
str.AppendFormat("\\cf%u ", OPTIONS_FONTCOUNT + streamData->crCount + crNickIndex);
@@ -935,10 +935,10 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, bool bRedra
memset(&cf2, 0, sizeof(CHARFORMAT2));
cf2.cbSize = sizeof(cf2);
- fi2.lpstrText = _T("#++~~");
+ fi2.lpstrText = L"#++~~";
fi.chrg.cpMin = bRedraw ? 0 : sel.cpMin;
fi.chrg.cpMax = -1;
- fi.lpstrText = _T("~~++#");
+ fi.lpstrText = L"~~++#";
while (SendMessage(hwndRich, EM_FINDTEXTEX, FR_DOWN, (LPARAM)&fi) > -1) {
fi2.chrg.cpMin = fi.chrgText.cpMin;
@@ -947,11 +947,11 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, bool bRedra
if (SendMessage(hwndRich, EM_FINDTEXTEX, FR_DOWN, (LPARAM)&fi2) > -1) {
SendMessage(hwndRich, EM_EXSETSEL, 0, (LPARAM)&fi.chrgText);
- SendMessage(hwndRich, EM_REPLACESEL, TRUE, (LPARAM)_T(""));
+ SendMessage(hwndRich, EM_REPLACESEL, TRUE, (LPARAM)L"");
fi2.chrgText.cpMin -= fi.chrgText.cpMax - fi.chrgText.cpMin;
fi2.chrgText.cpMax -= fi.chrgText.cpMax - fi.chrgText.cpMin;
SendMessage(hwndRich, EM_EXSETSEL, 0, (LPARAM)&fi2.chrgText);
- SendMessage(hwndRich, EM_REPLACESEL, TRUE, (LPARAM)_T(""));
+ SendMessage(hwndRich, EM_REPLACESEL, TRUE, (LPARAM)L"");
fi2.chrgText.cpMax = fi2.chrgText.cpMin;
fi2.chrgText.cpMin = fi.chrgText.cpMin;
@@ -985,7 +985,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, bool bRedra
// this uses hidden marks in the rich text to find the events which should be deleted
if (si->bTrimmed) {
TCHAR szPattern[50];
- mir_sntprintf(szPattern, _T("~-+%d+-~"), si->pLogEnd);
+ mir_sntprintf(szPattern, L"~-+%d+-~", si->pLogEnd);
FINDTEXTEX fi;
fi.lpstrText = szPattern;
@@ -996,7 +996,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, bool bRedra
rng.cpMin = 0;
rng.cpMax = 20;
SendMessage(hwndRich, EM_SETSEL, 0, fi.chrgText.cpMax + 1);
- SendMessage(hwndRich, EM_REPLACESEL, TRUE, (LPARAM)_T(""));
+ SendMessage(hwndRich, EM_REPLACESEL, TRUE, (LPARAM)L"");
}
si->bTrimmed = FALSE;
}
diff --git a/plugins/TabSRMM/src/chat/main.cpp b/plugins/TabSRMM/src/chat/main.cpp
index a158607a14..eee0f6823d 100644
--- a/plugins/TabSRMM/src/chat/main.cpp
+++ b/plugins/TabSRMM/src/chat/main.cpp
@@ -181,8 +181,8 @@ static void OnLoadSettings()
pci->LoadMsgDlgFont(5, &lf, NULL);
g_Settings.UserListFonts[CHAT_STATUS_OFFLINE] = CreateFontIndirect(&lf);
- int ih = GetTextPixelSize(_T("AQGglo"), g_Settings.UserListFonts[CHAT_STATUS_NORMAL], false);
- int ih2 = GetTextPixelSize(_T("AQGglo"), g_Settings.UserListFonts[CHAT_STATUS_AWAY], false);
+ int ih = GetTextPixelSize(L"AQGglo", g_Settings.UserListFonts[CHAT_STATUS_NORMAL], false);
+ int ih2 = GetTextPixelSize(L"AQGglo", g_Settings.UserListFonts[CHAT_STATUS_AWAY], false);
g_Settings.iNickListFontHeight = max(M.GetByte(CHAT_MODULE, "NicklistRowDist", 12), (ih > ih2 ? ih : ih2));
for (int i = 0; i < 5; i++) {
@@ -269,7 +269,7 @@ int Chat_Load()
{
CheckUpdate();
- CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENT("Message Sessions") _T("/") LPGENT("Group chats"), FONTMODE_ALTER };
+ CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENT("Message Sessions") L"/" LPGENT("Group chats"), FONTMODE_ALTER };
mir_getCI(&data);
saveCI = *pci;
pci->OnCreateModule = OnCreateModule;
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp
index c28cc51af0..36c9ec9d29 100644
--- a/plugins/TabSRMM/src/chat/options.cpp
+++ b/plugins/TabSRMM/src/chat/options.cpp
@@ -60,32 +60,32 @@ struct ColorOptionsList
static ColorOptionsList _clrs[] = {
{ 0, LPGENT("Message Sessions"), LPGENT("Input area background"), "inputbg", SRMSGDEFSET_BKGCOLOUR },
{ 1, LPGENT("Message Sessions"), LPGENT("Log background"), SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR },
- { 0, LPGENT("Message Sessions") _T("/") LPGENT("Single Messaging"), LPGENT("Outgoing background"), "outbg", SRMSGDEFSET_BKGOUTCOLOUR },
- { 1, LPGENT("Message Sessions") _T("/") LPGENT("Single Messaging"), LPGENT("Incoming background"), "inbg", SRMSGDEFSET_BKGINCOLOUR },
- { 2, LPGENT("Message Sessions") _T("/") LPGENT("Single Messaging"), LPGENT("Status background"), "statbg", SRMSGDEFSET_BKGCOLOUR },
- { 3, LPGENT("Message Sessions") _T("/") LPGENT("Single Messaging"), LPGENT("Incoming background(old)"), "oldinbg", SRMSGDEFSET_BKGINCOLOUR },
- { 4, LPGENT("Message Sessions") _T("/") LPGENT("Single Messaging"), LPGENT("Outgoing background(old)"), "oldoutbg", SRMSGDEFSET_BKGOUTCOLOUR },
- { 5, LPGENT("Message Sessions") _T("/") LPGENT("Single Messaging"), LPGENT("Horizontal Grid Lines"), "hgrid", RGB(224, 224, 224) },
- { 0, LPGENT("Message Sessions") _T("/") LPGENT("Info Panel"), LPGENT("Panel background low"), "ipfieldsbg", 0x62caff },
- { 1, LPGENT("Message Sessions") _T("/") LPGENT("Info Panel"), LPGENT("Panel background high"), "ipfieldsbgHigh", 0xf0f0f0 },
- { 0, LPGENT("Message Sessions") _T("/") LPGENT("Common colors"), LPGENT("Toolbar background high"), "tbBgHigh", 0 },
- { 1, LPGENT("Message Sessions") _T("/") LPGENT("Common colors"), LPGENT("Toolbar background low"), "tbBgLow", 0 },
- { 2, LPGENT("Message Sessions") _T("/") LPGENT("Common colors"), LPGENT("Window fill color"), "fillColor", 0 },
- { 3, LPGENT("Message Sessions") _T("/") LPGENT("Common colors"), LPGENT("Text area borders"), "cRichBorders", 0 },
- { 4, LPGENT("Message Sessions") _T("/") LPGENT("Common colors"), LPGENT("Aero glow effect"), "aeroGlow", RGB(40, 40, 255) },
- { 4, LPGENT("Message Sessions") _T("/") LPGENT("Common colors"), LPGENT("Generic text color (only when fill color is set)"), "genericTxtClr", 0xff000000 | COLOR_BTNTEXT },
+ { 0, LPGENT("Message Sessions") L"/" LPGENT("Single Messaging"), LPGENT("Outgoing background"), "outbg", SRMSGDEFSET_BKGOUTCOLOUR },
+ { 1, LPGENT("Message Sessions") L"/" LPGENT("Single Messaging"), LPGENT("Incoming background"), "inbg", SRMSGDEFSET_BKGINCOLOUR },
+ { 2, LPGENT("Message Sessions") L"/" LPGENT("Single Messaging"), LPGENT("Status background"), "statbg", SRMSGDEFSET_BKGCOLOUR },
+ { 3, LPGENT("Message Sessions") L"/" LPGENT("Single Messaging"), LPGENT("Incoming background(old)"), "oldinbg", SRMSGDEFSET_BKGINCOLOUR },
+ { 4, LPGENT("Message Sessions") L"/" LPGENT("Single Messaging"), LPGENT("Outgoing background(old)"), "oldoutbg", SRMSGDEFSET_BKGOUTCOLOUR },
+ { 5, LPGENT("Message Sessions") L"/" LPGENT("Single Messaging"), LPGENT("Horizontal Grid Lines"), "hgrid", RGB(224, 224, 224) },
+ { 0, LPGENT("Message Sessions") L"/" LPGENT("Info Panel"), LPGENT("Panel background low"), "ipfieldsbg", 0x62caff },
+ { 1, LPGENT("Message Sessions") L"/" LPGENT("Info Panel"), LPGENT("Panel background high"), "ipfieldsbgHigh", 0xf0f0f0 },
+ { 0, LPGENT("Message Sessions") L"/" LPGENT("Common colors"), LPGENT("Toolbar background high"), "tbBgHigh", 0 },
+ { 1, LPGENT("Message Sessions") L"/" LPGENT("Common colors"), LPGENT("Toolbar background low"), "tbBgLow", 0 },
+ { 2, LPGENT("Message Sessions") L"/" LPGENT("Common colors"), LPGENT("Window fill color"), "fillColor", 0 },
+ { 3, LPGENT("Message Sessions") L"/" LPGENT("Common colors"), LPGENT("Text area borders"), "cRichBorders", 0 },
+ { 4, LPGENT("Message Sessions") L"/" LPGENT("Common colors"), LPGENT("Aero glow effect"), "aeroGlow", RGB(40, 40, 255) },
+ { 4, LPGENT("Message Sessions") L"/" LPGENT("Common colors"), LPGENT("Generic text color (only when fill color is set)"), "genericTxtClr", 0xff000000 | COLOR_BTNTEXT },
};
static ColorOptionsList _tabclrs[] = {
- { 0, LPGENT("Message Sessions") _T("/") LPGENT("Tabs"), LPGENT("Normal text"), "tab_txt_normal", 0xff000000 | COLOR_BTNTEXT },
- { 1, LPGENT("Message Sessions") _T("/") LPGENT("Tabs"), LPGENT("Active text"), "tab_txt_active", 0xff000000 | COLOR_BTNTEXT },
- { 2, LPGENT("Message Sessions") _T("/") LPGENT("Tabs"), LPGENT("Hovered text"), "tab_txt_hottrack", 0xff000000 | COLOR_HOTLIGHT },
- { 3, LPGENT("Message Sessions") _T("/") LPGENT("Tabs"), LPGENT("Unread text"), "tab_txt_unread", 0xff000000 | COLOR_HOTLIGHT },
-
- { 4, LPGENT("Message Sessions") _T("/") LPGENT("Tabs"), LPGENT("Normal background"), "tab_bg_normal", 0xff000000 | COLOR_3DFACE },
- { 5, LPGENT("Message Sessions") _T("/") LPGENT("Tabs"), LPGENT("Active background"), "tab_bg_active", 0xff000000 | COLOR_3DFACE },
- { 6, LPGENT("Message Sessions") _T("/") LPGENT("Tabs"), LPGENT("Hovered background"), "tab_bg_hottrack", 0xff000000 | COLOR_3DFACE },
- { 7, LPGENT("Message Sessions") _T("/") LPGENT("Tabs"), LPGENT("Unread background"), "tab_bg_unread", 0xff000000 | COLOR_3DFACE }
+ { 0, LPGENT("Message Sessions") L"/" LPGENT("Tabs"), LPGENT("Normal text"), "tab_txt_normal", 0xff000000 | COLOR_BTNTEXT },
+ { 1, LPGENT("Message Sessions") L"/" LPGENT("Tabs"), LPGENT("Active text"), "tab_txt_active", 0xff000000 | COLOR_BTNTEXT },
+ { 2, LPGENT("Message Sessions") L"/" LPGENT("Tabs"), LPGENT("Hovered text"), "tab_txt_hottrack", 0xff000000 | COLOR_HOTLIGHT },
+ { 3, LPGENT("Message Sessions") L"/" LPGENT("Tabs"), LPGENT("Unread text"), "tab_txt_unread", 0xff000000 | COLOR_HOTLIGHT },
+
+ { 4, LPGENT("Message Sessions") L"/" LPGENT("Tabs"), LPGENT("Normal background"), "tab_bg_normal", 0xff000000 | COLOR_3DFACE },
+ { 5, LPGENT("Message Sessions") L"/" LPGENT("Tabs"), LPGENT("Active background"), "tab_bg_active", 0xff000000 | COLOR_3DFACE },
+ { 6, LPGENT("Message Sessions") L"/" LPGENT("Tabs"), LPGENT("Hovered background"), "tab_bg_hottrack", 0xff000000 | COLOR_3DFACE },
+ { 7, LPGENT("Message Sessions") L"/" LPGENT("Tabs"), LPGENT("Unread background"), "tab_bg_unread", 0xff000000 | COLOR_3DFACE }
};
extern LOGFONT lfDefault;
@@ -111,8 +111,8 @@ static FontOptionsList IM_fontOptionsList[] = {
{ LPGENT("* Status changes"), RGB(50, 50, 50), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
{ LPGENT("* Dividers"), RGB(50, 50, 50), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
{ LPGENT("* Error and warning messages"), RGB(50, 50, 50), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
- { LPGENT("* Symbols (incoming)"), RGB(50, 50, 50), _T("Webdings"), SYMBOL_CHARSET, 0, -12 },
- { LPGENT("* Symbols (outgoing)"), RGB(50, 50, 50), _T("Webdings"), SYMBOL_CHARSET, 0, -12 },
+ { LPGENT("* Symbols (incoming)"), RGB(50, 50, 50), L"Webdings", SYMBOL_CHARSET, 0, -12 },
+ { LPGENT("* Symbols (outgoing)"), RGB(50, 50, 50), L"Webdings", SYMBOL_CHARSET, 0, -12 },
};
static FontOptionsList IP_fontOptionsList[] = {
@@ -222,7 +222,7 @@ void LoadMsgDlgFont(int section, int i, LOGFONT *lf, COLORREF* colour, char *szM
mir_snprintf(str, "Font%d", i);
if ((i == 17 && !mir_strcmp(szMod, CHATFONT_MODULE)) || ((i == 20 || i == 21) && !mir_strcmp(szMod, FONTMODULE))) {
lf->lfCharSet = SYMBOL_CHARSET;
- _tcsncpy_s(lf->lfFaceName, _T("Webdings"), _TRUNCATE);
+ _tcsncpy_s(lf->lfFaceName, L"Webdings", _TRUNCATE);
}
else {
ptrT tszDefFace(db_get_tsa(NULL, szMod, str));
@@ -411,7 +411,7 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading2, branch2, _countof(branch2), 0x0000);
TCHAR* pszGroup = NULL;
- InitSetting(pszGroup, "AddToGroup", _T("Chat rooms"));
+ InitSetting(pszGroup, "AddToGroup", L"Chat rooms");
SetDlgItemText(hwndDlg, IDC_GROUP, pszGroup);
mir_free(pszGroup);
}
@@ -444,7 +444,7 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
GetDlgItemText(hwndDlg, IDC_GROUP, pszText, iLen + 1);
db_set_ts(NULL, CHAT_MODULE, "AddToGroup", pszText);
}
- else db_set_ts(NULL, CHAT_MODULE, "AddToGroup", _T(""));
+ else db_set_ts(NULL, CHAT_MODULE, "AddToGroup", L"");
mir_free(pszText);
@@ -509,8 +509,8 @@ void RegisterFontServiceFonts()
fid.deffontsettings.charset = lf.lfCharSet;
fid.flags = fid.flags & ~FIDF_CLASSMASK | (fid.deffontsettings.style&FONTF_BOLD ? FIDF_CLASSHEADER : FIDF_CLASSGENERAL);
_tcsncpy(fid.deffontsettings.szFace, lf.lfFaceName, LF_FACESIZE);
- _tcsncpy(fid.backgroundGroup, LPGENT("Message Sessions") _T("/") LPGENT("Single Messaging"), _countof(fid.backgroundGroup));
- _tcsncpy(fid.group, LPGENT("Message Sessions") _T("/") LPGENT("Single Messaging"), _countof(fid.group));
+ _tcsncpy(fid.backgroundGroup, LPGENT("Message Sessions") L"/" LPGENT("Single Messaging"), _countof(fid.backgroundGroup));
+ _tcsncpy(fid.group, LPGENT("Message Sessions") L"/" LPGENT("Single Messaging"), _countof(fid.group));
switch (i) {
case MSGFONTID_MYMSG:
case 1:
@@ -546,7 +546,7 @@ void RegisterFontServiceFonts()
_tcsncpy(fid.backgroundName, LPGENT("Log background"), _countof(fid.backgroundName));
break;
case 19:
- _tcsncpy(fid.backgroundName, _T(""), _countof(fid.backgroundName));
+ _tcsncpy(fid.backgroundName, L"", _countof(fid.backgroundName));
break;
default:
_tcsncpy(fid.backgroundName, LPGENT("Incoming background"), _countof(fid.backgroundName));
@@ -557,8 +557,8 @@ void RegisterFontServiceFonts()
fontOptionsList = IP_fontOptionsList;
fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS;
- _tcsncpy(fid.group, LPGENT("Message Sessions") _T("/") LPGENT("Info Panel"), _countof(fid.group));
- _tcsncpy(fid.backgroundGroup, LPGENT("Message Sessions") _T("/") LPGENT("Info Panel"), _countof(fid.backgroundGroup));
+ _tcsncpy(fid.group, LPGENT("Message Sessions") L"/" LPGENT("Info Panel"), _countof(fid.group));
+ _tcsncpy(fid.backgroundGroup, LPGENT("Message Sessions") L"/" LPGENT("Info Panel"), _countof(fid.backgroundGroup));
_tcsncpy(fid.backgroundName, LPGENT("Fields background"), _countof(fid.backgroundName));
for (int i = 0; i < IPFONTCOUNT; i++) {
LoadMsgDlgFont(FONTSECTION_IP, i + 100, &lf, &fontOptionsList[i].colour, FONTMODULE);
@@ -574,14 +574,14 @@ void RegisterFontServiceFonts()
fid.deffontsettings.charset = lf.lfCharSet;
_tcsncpy(fid.deffontsettings.szFace, lf.lfFaceName, LF_FACESIZE);
if (i == IPFONTCOUNT - 1) {
- _tcsncpy(fid.backgroundGroup, _T(""), _countof(fid.backgroundGroup));
- _tcsncpy(fid.backgroundName, _T(""), _countof(fid.backgroundName));
+ _tcsncpy(fid.backgroundGroup, L"", _countof(fid.backgroundGroup));
+ _tcsncpy(fid.backgroundName, L"", _countof(fid.backgroundName));
_tcsncpy(fid.group, LPGENT("Message Sessions"), _countof(fid.group));
}
FontRegisterT(&fid);
}
- _tcsncpy(cid.group, LPGENT("Message Sessions") _T("/") LPGENT("Group chats"), _countof(cid.group));
+ _tcsncpy(cid.group, LPGENT("Message Sessions") L"/" LPGENT("Group chats"), _countof(cid.group));
strncpy(cid.dbSettingsGroup, CHAT_MODULE, _countof(cid.dbSettingsGroup));
for (int i = 0; i <= 7; i++) {
mir_snprintf(szTemp, "NickColor%d", i);
@@ -692,36 +692,36 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
TCHAR tszTooltipText[2048];
mir_sntprintf(tszTooltipText,
- _T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n")
- _T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n")
- _T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s"),
+ L"%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n"
+ L"%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n"
+ L"%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s",
// contact vars
- _T("%nick%"), TranslateT("nick of current contact (if defined)"),
- _T("%proto%"), TranslateT("protocol name of current contact (if defined). Account name is used when protocol supports multiple accounts"),
- _T("%accountname%"), TranslateT("user-defined account name of current contact (if defined)."),
- _T("%userid%"), TranslateT("user ID of current contact (if defined). It is like UIN for ICQ, JID for Jabber, etc."),
+ L"%nick%", TranslateT("nick of current contact (if defined)"),
+ L"%proto%", TranslateT("protocol name of current contact (if defined). Account name is used when protocol supports multiple accounts"),
+ L"%accountname%", TranslateT("user-defined account name of current contact (if defined)."),
+ L"%userid%", TranslateT("user ID of current contact (if defined). It is like UIN for ICQ, JID for Jabber, etc."),
// global vars
- _T("%miranda_path%"), TranslateT("path to Miranda root folder"),
- _T("%miranda_profilesdir%"), TranslateT("path to folder containing Miranda profiles"),
- _T("%miranda_profilename%"), TranslateT("name of current Miranda profile (filename, without extension)"),
- _T("%miranda_userdata%"), TranslateT("will return parsed string %miranda_profilesdir%\\%miranda_profilename%"),
- _T("%miranda_logpath%"), TranslateT("will return parsed string %miranda_userdata%\\Logs"),
- _T("%appdata%"), TranslateT("same as environment variable %APPDATA% for currently logged-on Windows user"),
- _T("%username%"), TranslateT("username for currently logged-on Windows user"),
- _T("%mydocuments%"), TranslateT("\"My Documents\" folder for currently logged-on Windows user"),
- _T("%desktop%"), TranslateT("\"Desktop\" folder for currently logged-on Windows user"),
- _T("%xxxxxxx%"), TranslateT("any environment variable defined in current Windows session (like %systemroot%, %allusersprofile%, etc.)"),
+ L"%miranda_path%", TranslateT("path to Miranda root folder"),
+ L"%miranda_profilesdir%", TranslateT("path to folder containing Miranda profiles"),
+ L"%miranda_profilename%", TranslateT("name of current Miranda profile (filename, without extension)"),
+ L"%miranda_userdata%", TranslateT("will return parsed string %miranda_profilesdir%\\%miranda_profilename%"),
+ L"%miranda_logpath%", TranslateT("will return parsed string %miranda_userdata%\\Logs"),
+ L"%appdata%", TranslateT("same as environment variable %APPDATA% for currently logged-on Windows user"),
+ L"%username%", TranslateT("username for currently logged-on Windows user"),
+ L"%mydocuments%", TranslateT("\"My Documents\" folder for currently logged-on Windows user"),
+ L"%desktop%", TranslateT("\"Desktop\" folder for currently logged-on Windows user"),
+ L"%xxxxxxx%", TranslateT("any environment variable defined in current Windows session (like %systemroot%, %allusersprofile%, etc.)"),
// date/time vars
- _T("%d%"), TranslateT("day of month, 1-31"),
- _T("%dd%"), TranslateT("day of month, 01-31"),
- _T("%m%"), TranslateT("month number, 1-12"),
- _T("%mm%"), TranslateT("month number, 01-12"),
- _T("%mon%"), TranslateT("abbreviated month name"),
- _T("%month%"), TranslateT("full month name"),
- _T("%yy%"), TranslateT("year without century, 01-99"),
- _T("%yyyy%"), TranslateT("year with century, 1901-9999"),
- _T("%wday%"), TranslateT("abbreviated weekday name"),
- _T("%weekday%"), TranslateT("full weekday name"));
+ L"%d%", TranslateT("day of month, 1-31"),
+ L"%dd%", TranslateT("day of month, 01-31"),
+ L"%m%", TranslateT("month number, 1-12"),
+ L"%mm%", TranslateT("month number, 01-12"),
+ L"%mon%", TranslateT("abbreviated month name"),
+ L"%month%", TranslateT("full month name"),
+ L"%yy%", TranslateT("year without century, 01-99"),
+ L"%yyyy%", TranslateT("year with century, 1901-9999"),
+ L"%wday%", TranslateT("abbreviated weekday name"),
+ L"%weekday%", TranslateT("full weekday name"));
hPathTip = CreateToolTip(GetDlgItem(hwndDlg, IDC_LOGDIRECTORY), tszTooltipText, TranslateT("Variables"));
}
if (hPathTip)
@@ -757,12 +757,12 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
*p1 = 0;
TCHAR tszInitialDir[_MAX_DRIVE + _MAX_PATH + 10];
- mir_sntprintf(tszInitialDir, _T("%s%s"), M.getChatLogPath(), p);
+ mir_sntprintf(tszInitialDir, L"%s%s", M.getChatLogPath(), p);
if (!PathFileExists(tszInitialDir))
_tcsncpy_s(tszInitialDir, M.getChatLogPath(), _TRUNCATE);
TCHAR tszReturnName[MAX_PATH]; tszReturnName[0] = 0;
- mir_sntprintf(tszTemp, _T("%s%c*.*%c%c"), TranslateT("All files"), 0, 0, 0);
+ mir_sntprintf(tszTemp, L"%s%c*.*%c%c", TranslateT("All files"), 0, 0, 0);
OPENFILENAME ofn = { 0 };
ofn.lpstrInitialDir = tszInitialDir;
@@ -772,7 +772,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
ofn.nMaxFile = MAX_PATH;
ofn.nMaxFileTitle = MAX_PATH;
ofn.Flags = OFN_HIDEREADONLY | OFN_DONTADDTORECENT;
- ofn.lpstrDefExt = _T("log");
+ ofn.lpstrDefExt = L"log";
GetOpenFileName(&ofn);
}
break;
@@ -795,7 +795,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
if (idList) {
const TCHAR *szUserDir = M.getUserDir();
SHGetPathFromIDList(idList, tszDirectory);
- mir_tstrcat(tszDirectory, _T("\\"));
+ mir_tstrcat(tszDirectory, L"\\");
TCHAR tszTemp[MAX_PATH];
PathToRelativeT(tszDirectory, tszTemp, szUserDir);
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp
index 0215f305f7..d892fc66aa 100644
--- a/plugins/TabSRMM/src/chat/services.cpp
+++ b/plugins/TabSRMM/src/chat/services.cpp
@@ -34,10 +34,10 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT
if (M.FindWindow(hContact) != 0)
return 0;
- if (hContact != 0 && M.GetByte("limittabs", 0) && !_tcsncmp(pContainer->szName, _T("default"), 6)) {
- if ((pContainer = FindMatchingContainer(_T("default"))) == NULL) {
+ if (hContact != 0 && M.GetByte("limittabs", 0) && !_tcsncmp(pContainer->szName, L"default", 6)) {
+ if ((pContainer = FindMatchingContainer(L"default")) == NULL) {
TCHAR szName[CONTAINER_NAMELEN + 1];
- mir_sntprintf(szName, _T("default"));
+ mir_sntprintf(szName, L"default");
if ((pContainer = CreateContainer(szName, CNT_CREATEFLAG_CLONED, hContact)) == NULL)
return 0;
}
@@ -59,7 +59,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT
else
_tcsncpy_s(newcontactname, contactName, _TRUNCATE);
}
- else _tcsncpy_s(newcontactname, _T("_U_"), _TRUNCATE);
+ else _tcsncpy_s(newcontactname, L"_U_", _TRUNCATE);
newData.item.pszText = newcontactname;
newData.item.mask = TCIF_TEXT | TCIF_IMAGE | TCIF_PARAM;
@@ -167,8 +167,8 @@ void ShowRoom(SESSION_INFO *si, WPARAM, BOOL)
TContainerData *pContainer = si->pContainer;
if (pContainer == NULL) {
GetContainerNameForContact(si->hContact, szName, CONTAINER_NAMELEN);
- if (!g_Settings.bOpenInDefault && !mir_tstrcmp(szName, _T("default")))
- _tcsncpy(szName, _T("Chat Rooms"), CONTAINER_NAMELEN);
+ if (!g_Settings.bOpenInDefault && !mir_tstrcmp(szName, L"default"))
+ _tcsncpy(szName, L"Chat Rooms", CONTAINER_NAMELEN);
szName[CONTAINER_NAMELEN] = 0;
pContainer = FindContainerByName(szName);
}
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp
index febc897b1b..98a3b8f603 100644
--- a/plugins/TabSRMM/src/chat/tools.cpp
+++ b/plugins/TabSRMM/src/chat/tools.cpp
@@ -113,7 +113,7 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoNa
pd.lchIcon = LoadIconEx("window");
PROTOACCOUNT *pa = Proto_GetAccount(pszProtoName);
- mir_sntprintf(pd.lptzContactName, _T("%s - %s"), (pa == NULL) ? _A2T(pszProtoName) : pa->tszAccountName, pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_sntprintf(pd.lptzContactName, L"%s - %s", (pa == NULL) ? _A2T(pszProtoName) : pa->tszAccountName, pcli->pfnGetContactDisplayName(hContact, 0));
_tcsncpy_s(pd.lptzText, TranslateTS(szBuf), _TRUNCATE);
pd.iSeconds = g_Settings.iPopupTimeout;
@@ -146,10 +146,10 @@ BOOL DoPopup(SESSION_INFO *si, GCEVENT* gce)
TCHAR *bbStart, *bbEnd;
if (g_Settings.bBBCodeInPopups) {
- bbStart = _T("[b]");
- bbEnd = _T("[/b]");
+ bbStart = L"[b]";
+ bbEnd = L"[/b]";
}
- else bbStart = bbEnd = _T("");
+ else bbStart = bbEnd = L"";
if (nen_options.iMUCDisable) // no popups at all. Period
return 0;
@@ -478,7 +478,7 @@ TCHAR* my_strstri(const TCHAR* s1, const TCHAR* s2)
{
int i, j, k;
- _tsetlocale(LC_ALL, _T(""));
+ _tsetlocale(LC_ALL, L"");
for (i = 0; s1[i]; i++)
for (j = i, k = 0; _totlower(s1[j]) == _totlower(s2[k]); j++, k++)
if (!s2[k + 1])
@@ -546,7 +546,7 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO
_tcsncpy_s(szTemp, TranslateT("&Message"), _TRUNCATE);
if (mir_tstrlen(szTemp) > 40)
- _tcsncpy_s(szTemp + 40, 4, _T("..."), _TRUNCATE);
+ _tcsncpy_s(szTemp + 40, 4, L"...", _TRUNCATE);
ModifyMenu(*hMenu, ID_MESS, MF_STRING | MF_BYCOMMAND, ID_MESS, szTemp);
gcmi.Type = MENU_ON_NICKLIST;
}
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index 71bdd2811b..c633d50ee9 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -141,7 +141,7 @@ bool IsStringValidLink(TCHAR *pszText)
if (_totlower(pszText[0]) == 'w' && _totlower(pszText[1]) == 'w' && _totlower(pszText[2]) == 'w' && pszText[3] == '.' && _istalnum(pszText[4]))
return true;
- return _tcsstr(pszText, _T("://")) != NULL;
+ return _tcsstr(pszText, L"://") != NULL;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -471,7 +471,7 @@ LBL_SkipEnd:
int topicStart = start;
while (topicStart > 0 && (pszText[topicStart - 1] == ' ' || pszText[topicStart - 1] == 13 || pszText[topicStart - 1] == VK_TAB))
topicStart--;
- if (topicStart > 5 && _tcsstr(&pszText[topicStart - 6], _T("/topic")) == &pszText[topicStart - 6])
+ if (topicStart > 5 && _tcsstr(&pszText[topicStart - 6], L"/topic") == &pszText[topicStart - 6])
isTopic = TRUE;
}
if (dat->szSearchQuery == NULL) {
@@ -843,7 +843,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
if (lpPrevCmd)
SendMessage(hwnd, EM_SETTEXTEX, (WPARAM)&ste, (LPARAM)lpPrevCmd);
else
- SetWindowText(hwnd, _T(""));
+ SetWindowText(hwnd, L"");
GETTEXTLENGTHEX gtl = { 0 };
gtl.flags = GTL_PRECISE;
@@ -1321,7 +1321,7 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, SESSION_INFO *pa
}
if (tszBuf[0] == 0)
- mir_sntprintf(tszBuf, _T("%s: %s\r\n%s: %s\r\n%s: %s"),
+ mir_sntprintf(tszBuf, L"%s: %s\r\n%s: %s\r\n%s: %s",
TranslateT("Nickname"), ui1->pszNick,
TranslateT("Unique ID"), ui1->pszUID,
TranslateT("Status"), pci->TM_WordToString(parentdat->pStatuses, ui1->Status));
@@ -1671,7 +1671,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
}
}
if (tszBuf[0] == 0)
- mir_sntprintf(tszBuf, _T("<b>%s:</b>\t%s\n<b>%s:</b>\t%s\n<b>%s:</b>\t%s"),
+ mir_sntprintf(tszBuf, L"<b>%s:</b>\t%s\n<b>%s:</b>\t%s\n<b>%s:</b>\t%s",
TranslateT("Nick"), ui1->pszNick,
TranslateT("Unique ID"), ui1->pszUID,
TranslateT("Status"), pci->TM_WordToString(parentdat->pStatuses, ui1->Status));
@@ -1813,7 +1813,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
GetMYUIN(dat);
GetMyNick(dat);
- CustomizeButton(CreateWindowEx(0, _T("MButtonClass"), _T(""), WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 0, 6, DPISCALEY_S(20),
+ CustomizeButton(CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 0, 6, DPISCALEY_S(20),
hwndDlg, (HMENU)IDC_CHAT_TOGGLESIDEBAR, g_hInst, NULL));
SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETASTHEMEDBTN, 1, 0);
SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
@@ -1905,7 +1905,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
hIcon = Skin_LoadProtoIcon(si->pszModule, (dat->wStatus <= ID_STATUS_OFFLINE) ? ID_STATUS_OFFLINE : dat->wStatus);
mir_sntprintf(szTemp,
(si->nUsersInNicklist == 1) ? TranslateT("%s: chat room (%u user%s)") : TranslateT("%s: chat room (%u users%s)"),
- szNick, si->nUsersInNicklist, si->bFilterEnabled ? TranslateT(", event filter active") : _T(""));
+ szNick, si->nUsersInNicklist, si->bFilterEnabled ? TranslateT(", event filter active") : L"");
break;
case GCW_PRIVMESS:
hIcon = Skin_LoadProtoIcon(si->pszModule, (dat->wStatus <= ID_STATUS_OFFLINE) ? ID_STATUS_OFFLINE : dat->wStatus);
@@ -1915,7 +1915,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
mir_sntprintf(szTemp, TranslateT("%s: message session (%u users)"), szNick, si->nUsersInNicklist);
break;
case GCW_SERVER:
- mir_sntprintf(szTemp, _T("%s: Server"), szNick);
+ mir_sntprintf(szTemp, L"%s: Server", szNick);
hIcon = LoadIconEx("window");
break;
}
@@ -1988,7 +1988,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
}
else {
if (si->ptszStatusbarText)
- mir_sntprintf(szFinalStatusBarText, _T("%s %s"), mi->ptszModDispName, si->ptszStatusbarText);
+ mir_sntprintf(szFinalStatusBarText, L"%s %s", mi->ptszModDispName, si->ptszStatusbarText);
else
_tcsncpy_s(szFinalStatusBarText, mi->ptszModDispName, _TRUNCATE);
}
@@ -2094,7 +2094,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
case GC_ACKMESSAGE:
SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_SETREADONLY, FALSE, 0);
- SetDlgItemText(hwndDlg, IDC_CHAT_MESSAGE, _T(""));
+ SetDlgItemText(hwndDlg, IDC_CHAT_MESSAGE, L"");
return TRUE;
case DM_TYPING:
@@ -2263,7 +2263,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
return TRUE;
case WINDOW_CLEARLOG:
- SetDlgItemText(hwndDlg, IDC_CHAT_LOG, _T(""));
+ SetDlgItemText(hwndDlg, IDC_CHAT_LOG, L"");
return TRUE;
case SESSION_TERMINATE:
@@ -2564,14 +2564,14 @@ LABEL_SHOWWINDOW:
case ID_SEARCH_GOOGLE:
if (pszWord[0])
- Utils_OpenUrlT(CMString(FORMAT, _T("http://www.google.com/search?q=%s"), pszWord));
+ Utils_OpenUrlT(CMString(FORMAT, L"http://www.google.com/search?q=%s", pszWord));
PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0);
break;
case ID_SEARCH_WIKIPEDIA:
if (pszWord[0])
- Utils_OpenUrlT(CMString(FORMAT, _T("http://en.wikipedia.org/wiki/%s"), pszWord));
+ Utils_OpenUrlT(CMString(FORMAT, L"http://en.wikipedia.org/wiki/%s", pszWord));
PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0);
break;
@@ -2684,7 +2684,7 @@ LABEL_SHOWWINDOW:
CHARRANGE chr;
SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_EXGETSEL, 0, (LPARAM)&chr);
- TCHAR tszAplTmpl[] = _T("%s:");
+ TCHAR tszAplTmpl[] = L"%s:";
size_t bufSize = mir_tstrlen(tr.lpstrText) + mir_tstrlen(tszAplTmpl) + 3;
TCHAR *tszTmp = (TCHAR*)mir_alloc(bufSize * sizeof(TCHAR)), *tszAppeal = tszTmp;
@@ -2791,9 +2791,9 @@ LABEL_SHOWWINDOW:
int start = LOWORD(lResult);
CMString tszName;
if (start == 0)
- tszName.Format(_T("%s: "), ui->pszNick);
+ tszName.Format(L"%s: ", ui->pszNick);
else
- tszName.Format(_T("%s "), ui->pszNick);
+ tszName.Format(L"%s ", ui->pszNick);
SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_REPLACESEL, FALSE, (LPARAM)tszName.GetString());
PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0);
@@ -2830,13 +2830,13 @@ LABEL_SHOWWINDOW:
DoRtfToTags(si->dat, ptszText, mi->nColorCount, mi->crColors);
ptszText.Trim();
- ptszText.Replace(_T("%"), _T("%%"));
+ ptszText.Replace(L"%", L"%%");
if (mi->bAckMsg) {
Utils::enableDlgControl(hwndDlg, IDC_CHAT_MESSAGE, false);
SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_SETREADONLY, TRUE, 0);
}
- else SetDlgItemText(hwndDlg, IDC_CHAT_MESSAGE, _T(""));
+ else SetDlgItemText(hwndDlg, IDC_CHAT_MESSAGE, L"");
Utils::enableDlgControl(hwndDlg, IDOK, false);
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index 62781bbc5b..9f7ccd8adc 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -120,7 +120,7 @@ bool CContactCache::updateNick()
TCHAR *tszNick = pcli->pfnGetContactDisplayName(getActiveContact(), 0);
if (tszNick && mir_tstrcmp(m_szNick, tszNick))
fChanged = true;
- _tcsncpy_s(m_szNick, (tszNick ? tszNick : _T("<undef>")), _TRUNCATE);
+ _tcsncpy_s(m_szNick, (tszNick ? tszNick : L"<undef>"), _TRUNCATE);
}
return fChanged;
}
@@ -343,18 +343,18 @@ void CContactCache::inputHistoryEvent(WPARAM wParam)
}
if (m_iHistoryCurrent == m_iHistoryTop) {
if (m_history[m_iHistorySize].szText != NULL) { // replace the temp buffer
- ::SetWindowText(hwndEdit, _T(""));
+ ::SetWindowText(hwndEdit, L"");
::SendMessage(hwndEdit, EM_SETTEXTEX, (WPARAM)&stx, (LPARAM)m_history[m_iHistorySize].szText);
::SendMessage(hwndEdit, EM_SETSEL, -1, -1);
}
}
else {
if (m_history[m_iHistoryCurrent].szText != NULL) {
- ::SetWindowText(hwndEdit, _T(""));
+ ::SetWindowText(hwndEdit, L"");
::SendMessage(hwndEdit, EM_SETTEXTEX, (WPARAM)&stx, (LPARAM)m_history[m_iHistoryCurrent].szText);
::SendMessage(hwndEdit, EM_SETSEL, -1, -1);
}
- else ::SetWindowText(hwndEdit, _T(""));
+ else ::SetWindowText(hwndEdit, L"");
}
::SendMessage(m_hwnd, WM_COMMAND, MAKEWPARAM(::GetDlgCtrlID(hwndEdit), EN_CHANGE), (LPARAM)hwndEdit);
m_dat->dwFlags &= ~MWF_NEEDHISTORYSAVE;
diff --git a/plugins/TabSRMM/src/contactcache.h b/plugins/TabSRMM/src/contactcache.h
index 9f7913b297..4be30f678b 100644
--- a/plugins/TabSRMM/src/contactcache.h
+++ b/plugins/TabSRMM/src/contactcache.h
@@ -29,7 +29,7 @@
#ifndef __CONTACTCACHE_H
#define __CONTACTCACHE_H
-#define C_INVALID_ACCOUNT _T("<account error>")
+#define C_INVALID_ACCOUNT L"<account error>"
#define HISTORY_INITIAL_ALLOCSIZE 300
struct TInputHistory {
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index 0fe93c40d7..57edcf6d1f 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -508,11 +508,11 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam,
HMENU hSysmenu = GetSystemMenu(hwndDlg, FALSE);
int iMenuItems = GetMenuItemCount(hSysmenu);
- InsertMenu(hSysmenu, iMenuItems++ - 2, MF_BYPOSITION | MF_SEPARATOR, 0, _T(""));
+ InsertMenu(hSysmenu, iMenuItems++ - 2, MF_BYPOSITION | MF_SEPARATOR, 0, L"");
InsertMenu(hSysmenu, iMenuItems++ - 2, MF_BYPOSITION | MF_STRING, IDM_STAYONTOP, TranslateT("Stay on top"));
if (!CSkin::m_frameSkins)
InsertMenu(hSysmenu, iMenuItems++ - 2, MF_BYPOSITION | MF_STRING, IDM_NOTITLE, TranslateT("Hide title bar"));
- InsertMenu(hSysmenu, iMenuItems++ - 2, MF_BYPOSITION | MF_SEPARATOR, 0, _T(""));
+ InsertMenu(hSysmenu, iMenuItems++ - 2, MF_BYPOSITION | MF_SEPARATOR, 0, L"");
InsertMenu(hSysmenu, iMenuItems++ - 2, MF_BYPOSITION | MF_STRING, IDM_MOREOPTIONS, TranslateT("Container options..."));
SetWindowText(hwndDlg, TranslateT("Message session..."));
SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)PluginConfig.g_iconContainer);
@@ -1428,7 +1428,7 @@ panel_found:
}
}
else if (pContainer->hwndStatus == 0) {
- pContainer->hwndStatus = CreateWindowEx(0, _T("TSStatusBarClass"), NULL, SBT_TOOLTIPS | WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, hwndDlg, NULL, g_hInst, NULL);
+ pContainer->hwndStatus = CreateWindowEx(0, L"TSStatusBarClass", NULL, SBT_TOOLTIPS | WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, hwndDlg, NULL, g_hInst, NULL);
if (sBarHeight && bSkinned)
SendMessage(pContainer->hwndStatus, SB_SETMINHEIGHT, sBarHeight, 0);
@@ -1759,7 +1759,7 @@ TContainerData* TSAPI CreateContainer(const TCHAR *name, int iTemp, MCONTACT hCo
_tcsncpy(pContainer->szName, name, CONTAINER_NAMELEN + 1);
AppendToContainerList(pContainer);
- if (M.GetByte("limittabs", 0) && !mir_tstrcmp(name, _T("default")))
+ if (M.GetByte("limittabs", 0) && !mir_tstrcmp(name, L"default"))
iTemp |= CNT_CREATEFLAG_CLONED;
// save container name to the db
@@ -1785,7 +1785,7 @@ TContainerData* TSAPI CreateContainer(const TCHAR *name, int iTemp, MCONTACT hCo
pContainer->iContainerIndex = i;
iFound = TRUE;
}
- else if (!_tcsncmp(tszName, _T("**mir_free**"), CONTAINER_NAMELEN))
+ else if (!_tcsncmp(tszName, L"**mir_free**", CONTAINER_NAMELEN))
iFirstFree = i;
} while (++i && iFound == FALSE);
}
@@ -1880,7 +1880,7 @@ int TSAPI CutContactName(const TCHAR *oldname, TCHAR *newname, size_t size)
_tcsncpy_s(newname, size, oldname, _TRUNCATE);
else {
TCHAR fmt[30];
- mir_sntprintf(fmt, _T("%%%d.%ds..."), PluginConfig.m_iTabNameLimit, PluginConfig.m_iTabNameLimit);
+ mir_sntprintf(fmt, L"%%%d.%ds...", PluginConfig.m_iTabNameLimit, PluginConfig.m_iTabNameLimit);
mir_sntprintf(newname, size, fmt, oldname);
}
return 0;
@@ -2010,7 +2010,7 @@ int TSAPI GetContainerNameForContact(MCONTACT hContact, TCHAR *szName, int iName
{
// single window mode using cloned (temporary) containers
if (M.GetByte("singlewinmode", 0)) {
- _tcsncpy_s(szName, iNameLen, _T("Message Session"), _TRUNCATE);
+ _tcsncpy_s(szName, iNameLen, L"Message Session", _TRUNCATE);
return 0;
}
@@ -2018,7 +2018,7 @@ int TSAPI GetContainerNameForContact(MCONTACT hContact, TCHAR *szName, int iName
if (M.GetByte("useclistgroups", 0)) {
ptrT tszGroup(db_get_tsa(hContact, "CList", "Group"));
if (tszGroup == NULL) {
- _tcsncpy_s(szName, iNameLen, _T("default"), _TRUNCATE);
+ _tcsncpy_s(szName, iNameLen, L"default", _TRUNCATE);
return 0;
}
@@ -2028,7 +2028,7 @@ int TSAPI GetContainerNameForContact(MCONTACT hContact, TCHAR *szName, int iName
ptrT tszContainerName(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
if (tszContainerName == NULL) {
- _tcsncpy_s(szName, iNameLen, _T("default"), _TRUNCATE);
+ _tcsncpy_s(szName, iNameLen, L"default", _TRUNCATE);
return 0;
}
@@ -2044,7 +2044,7 @@ void TSAPI DeleteContainer(int iIndex)
if (tszContainerName == NULL)
return;
- db_set_ts(NULL, CONTAINER_KEY, szIndex, _T("**mir_free**"));
+ db_set_ts(NULL, CONTAINER_KEY, szIndex, L"**mir_free**");
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
ptrT tszValue(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
@@ -2109,8 +2109,8 @@ HMENU TSAPI BuildContainerMenu()
if (tszName == NULL)
break;
- if (_tcsncmp(tszName, _T("**mir_free**"), CONTAINER_NAMELEN))
- AppendMenu(hMenu, MF_STRING, IDM_CONTAINERMENU + i, !mir_tstrcmp(tszName, _T("default")) ? TranslateT("Default container") : tszName);
+ if (_tcsncmp(tszName, L"**mir_free**", CONTAINER_NAMELEN))
+ AppendMenu(hMenu, MF_STRING, IDM_CONTAINERMENU + i, !mir_tstrcmp(tszName, L"default") ? TranslateT("Default container") : tszName);
i++;
}
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp
index 3ada2917fa..edc4d321be 100644
--- a/plugins/TabSRMM/src/containeroptions.cpp
+++ b/plugins/TabSRMM/src/containeroptions.cpp
@@ -127,7 +127,7 @@ static void ShowPage(HWND hwndDlg, int iPage, BOOL fShow)
if (o_pages[iPage].szDesc != NULL)
SetDlgItemText(hwndDlg, IDC_DESC, TranslateTS(o_pages[iPage].szDesc));
else
- SetDlgItemText(hwndDlg, IDC_DESC, _T(""));
+ SetDlgItemText(hwndDlg, IDC_DESC, L"");
}
Utils::showDlgControl(hwndDlg, IDC_O_EXPLAINGLOBALNOTIFY, (iPage == 3 && nen_options.bWindowCheck) ? SW_SHOW : SW_HIDE);
@@ -153,7 +153,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
pContainer->hWndOptions = hwndDlg;
SetWindowText(hwndDlg, TranslateT("Container options"));
TCHAR szNewTitle[128];
- mir_sntprintf(szNewTitle, _T("%s"), !mir_tstrcmp(pContainer->szName, _T("default")) ?
+ mir_sntprintf(szNewTitle, L"%s", !mir_tstrcmp(pContainer->szName, L"default") ?
TranslateT("Default container") : pContainer->szName);
SetDlgItemText(hwndDlg, IDC_HEADERBAR, szNewTitle);
Utils::enableDlgControl(hwndDlg, IDC_O_HIDETITLE, !CSkin::m_frameSkins);
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index ebf4e0812f..629c9a6d11 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -433,7 +433,7 @@ static TCHAR* ShortenPreview(DBEVENTINFO* dbe)
}
if (fAddEllipsis) {
buf = (TCHAR*)mir_realloc(buf, (mir_tstrlen(buf) + 5) * sizeof(TCHAR));
- mir_tstrcat(buf, _T("..."));
+ mir_tstrcat(buf, L"...");
}
return buf;
}
@@ -468,13 +468,13 @@ static TCHAR* GetPreviewT(WORD eventType, DBEVENTINFO* dbe)
if (szDescr && Utils::safe_strlen(szDescr, dbe->cbBlob - sizeof(DWORD) - namelength - 1) > 0) {
ptrT tszDescr(DbGetEventStringT(dbe, szDescr));
if (tszFileName && tszDescr) {
- mir_sntprintf(buf, _T("%s: %s (%s)"), TranslateT("Incoming file"), tszFileName, tszDescr);
+ mir_sntprintf(buf, L"%s: %s (%s)", TranslateT("Incoming file"), tszFileName, tszDescr);
return mir_tstrdup(buf);
}
}
if (tszFileName) {
- mir_sntprintf(buf, _T("%s: %s (%s)"), TranslateT("Incoming file"), tszFileName, TranslateT("No description given"));
+ mir_sntprintf(buf, L"%s: %s (%s)", TranslateT("Incoming file"), tszFileName, TranslateT("No description given"));
return mir_tstrdup(buf);
}
}
@@ -500,7 +500,7 @@ static int PopupUpdateT(MCONTACT hContact, MEVENT hEvent)
TCHAR szHeader[256];
if (pdata->pluginOptions->bShowHeaders)
- mir_sntprintf(szHeader, _T("%s %d\n"), TranslateT("New messages: "), pdata->nrMerged + 1);
+ mir_sntprintf(szHeader, L"%s %d\n", TranslateT("New messages: "), pdata->nrMerged + 1);
else
szHeader[0] = 0;
@@ -512,15 +512,15 @@ static int PopupUpdateT(MCONTACT hContact, MEVENT hEvent)
db_event_get(hEvent, &dbe);
TCHAR timestamp[MAX_DATASIZE];
- _tcsftime(timestamp, MAX_DATASIZE, _T("%Y.%m.%d %H:%M"), _localtime32((__time32_t *)&dbe.timestamp));
- mir_sntprintf(pdata->eventData[pdata->nrMerged].tszText, _T("\n\n%s\n"), timestamp);
+ _tcsftime(timestamp, MAX_DATASIZE, L"%Y.%m.%d %H:%M", _localtime32((__time32_t *)&dbe.timestamp));
+ mir_sntprintf(pdata->eventData[pdata->nrMerged].tszText, L"\n\n%s\n", timestamp);
TCHAR *szPreview = GetPreviewT(dbe.eventType, &dbe);
if (szPreview) {
mir_tstrncat(pdata->eventData[pdata->nrMerged].tszText, szPreview, _countof(pdata->eventData[pdata->nrMerged].tszText) - mir_tstrlen(pdata->eventData[pdata->nrMerged].tszText));
mir_free(szPreview);
}
- else mir_tstrncat(pdata->eventData[pdata->nrMerged].tszText, _T(" "), _countof(pdata->eventData[pdata->nrMerged].tszText) - mir_tstrlen(pdata->eventData[pdata->nrMerged].tszText));
+ else mir_tstrncat(pdata->eventData[pdata->nrMerged].tszText, L" ", _countof(pdata->eventData[pdata->nrMerged].tszText) - mir_tstrlen(pdata->eventData[pdata->nrMerged].tszText));
pdata->eventData[pdata->nrMerged].tszText[MAX_SECONDLINE - 1] = 0;
@@ -622,7 +622,7 @@ static int PopupShowT(NEN_OPTIONS *pluginOptions, MCONTACT hContact, MEVENT hEve
_tcsncpy_s(pud.lptzText, szPreview, _TRUNCATE);
mir_free(szPreview);
}
- else _tcsncpy(pud.lptzText, _T(" "), MAX_SECONDLINE);
+ else _tcsncpy(pud.lptzText, L" ", MAX_SECONDLINE);
pdata->eventData = (EVENT_DATAT *)mir_alloc(NR_MERGED * sizeof(EVENT_DATAT));
pdata->eventData[0].hEvent = hEvent;
@@ -670,8 +670,8 @@ void TSAPI UpdateTrayMenuState(TWindowData *dat, BOOL bForced)
PluginConfig.m_UnreadInTray -= (mii.dwItemData & 0x0000ffff);
if (mii.dwItemData > 0 || bForced) {
TCHAR szMenuEntry[80];
- mir_sntprintf(szMenuEntry, _T("%s: %s (%s) [%d]"), tszProto,
- dat->cache->getNick(), dat->szStatus[0] ? dat->szStatus : _T("(undef)"), mii.dwItemData & 0x0000ffff);
+ mir_sntprintf(szMenuEntry, L"%s: %s (%s) [%d]", tszProto,
+ dat->cache->getNick(), dat->szStatus[0] ? dat->szStatus : L"(undef)", mii.dwItemData & 0x0000ffff);
if (!bForced)
mii.dwItemData = 0;
@@ -712,7 +712,7 @@ int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szPro
if (fromEvent == 2) // from chat...
mii.dwItemData |= 0x10000000;
DeleteMenu(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, MF_BYCOMMAND);
- mir_sntprintf(szMenuEntry, _T("%s: %s (%s) [%d]"), tszFinalProto, szNick, szMyStatus, mii.dwItemData & 0x0000ffff);
+ mir_sntprintf(szMenuEntry, L"%s: %s (%s) [%d]", tszFinalProto, szNick, szMyStatus, mii.dwItemData & 0x0000ffff);
AppendMenu(PluginConfig.g_hMenuTrayUnread, MF_BYCOMMAND | MF_STRING, (UINT_PTR)hContact, szMenuEntry);
PluginConfig.m_UnreadInTray++;
if (PluginConfig.m_UnreadInTray)
@@ -722,7 +722,7 @@ int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szPro
else {
szNick = pcli->pfnGetContactDisplayName(hContact, 0);
if (CheckMenuItem(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, MF_BYCOMMAND | MF_UNCHECKED) == -1) {
- mir_sntprintf(szMenuEntry, _T("%s: %s (%s) [%d]"), tszFinalProto, szNick, szMyStatus, fromEvent ? 1 : 0);
+ mir_sntprintf(szMenuEntry, L"%s: %s (%s) [%d]", tszFinalProto, szNick, szMyStatus, fromEvent ? 1 : 0);
AppendMenu(PluginConfig.g_hMenuTrayUnread, MF_BYCOMMAND | MF_STRING, (UINT_PTR)hContact, szMenuEntry);
mii.dwItemData = fromEvent ? 1 : 0;
PluginConfig.m_UnreadInTray += (mii.dwItemData & 0x0000ffff);
@@ -740,7 +740,7 @@ int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szPro
mii.fMask |= MIIM_STRING;
if (fromEvent == 2)
mii.dwItemData |= 0x10000000;
- mir_sntprintf(szMenuEntry, _T("%s: %s (%s) [%d]"), tszFinalProto, szNick, szMyStatus, mii.dwItemData & 0x0000ffff);
+ mir_sntprintf(szMenuEntry, L"%s: %s (%s) [%d]", tszFinalProto, szNick, szMyStatus, mii.dwItemData & 0x0000ffff);
mii.cch = (int)mir_tstrlen(szMenuEntry) + 1;
mii.dwTypeData = (LPTSTR)szMenuEntry;
}
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 8faac1dc06..5f63d6c7e5 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -44,13 +44,13 @@ void TSAPI DM_SaveLogAsRTF(const TWindowData *dat)
}
else if (dat) {
TCHAR szFilter[MAX_PATH], szFilename[MAX_PATH];
- mir_sntprintf(szFilter, _T("%s%c*.rtf%c%c"), TranslateT("Rich Edit file"), 0, 0, 0);
- mir_sntprintf(szFilename, _T("%s.rtf"), dat->cache->getNick());
+ mir_sntprintf(szFilter, L"%s%c*.rtf%c%c", TranslateT("Rich Edit file"), 0, 0, 0);
+ mir_sntprintf(szFilename, L"%s.rtf", dat->cache->getNick());
Utils::sanitizeFilename(szFilename);
TCHAR szInitialDir[MAX_PATH + 2];
- mir_sntprintf(szInitialDir, _T("%s%s\\"), M.getDataPath(), _T("\\Saved message logs"));
+ mir_sntprintf(szInitialDir, L"%s%s\\", M.getDataPath(), L"\\Saved message logs");
CreateDirectoryTreeT(szInitialDir);
OPENFILENAME ofn = { 0 };
@@ -61,7 +61,7 @@ void TSAPI DM_SaveLogAsRTF(const TWindowData *dat)
ofn.lpstrInitialDir = szInitialDir;
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_HIDEREADONLY;
- ofn.lpstrDefExt = _T("rtf");
+ ofn.lpstrDefExt = L"rtf";
if (GetSaveFileName(&ofn)) {
EDITSTREAM stream = { 0 };
stream.dwCookie = (DWORD_PTR)szFilename;
@@ -538,7 +538,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer,
TCHAR *buf = (TCHAR*)mir_alloc((iLen + 2) * sizeof(TCHAR));
GetDlgItemText(hwndDlg, IDC_MESSAGE, buf, iLen + 1);
db_set_ts(dat->hContact, "UserInfo", "MyNotes", buf);
- SetDlgItemText(hwndDlg, IDC_MESSAGE, _T(""));
+ SetDlgItemText(hwndDlg, IDC_MESSAGE, L"");
if (!dat->bIsAutosizingInput) {
dat->splitterY = dat->iSplitterSaved;
@@ -613,7 +613,7 @@ static INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
CallService(MS_SYSTEM_GETFILEVERSION, 0, (LPARAM)&v);
TCHAR tStr[80];
- mir_sntprintf(tStr, _T("%s %d.%d.%d.%d [build %d]"),
+ mir_sntprintf(tStr, L"%s %d.%d.%d.%d [build %d]",
TranslateT("Version"), __MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM, v[3]);
SetDlgItemText(hwndDlg, IDC_HEADERBAR, tStr);
}
@@ -792,7 +792,7 @@ void TSAPI DM_InitRichEdit(TWindowData *dat)
if (!fIsChat && GetWindowTextLength(hwndEdit) > 0)
szStreamOut = Message_GetFromStream(hwndEdit);
- SetWindowText(hwndEdit, _T(""));
+ SetWindowText(hwndEdit, L"");
SendMessage(hwndLog, EM_SETBKGNDCOLOR, 0, colour);
SendMessage(hwndEdit, EM_SETBKGNDCOLOR, 0, dat->inputbg);
@@ -862,7 +862,7 @@ void TSAPI DM_InitRichEdit(TWindowData *dat)
pf2.dxOffset = dat->pContainer->theme.left_indent + 30;
if (!fIsChat) {
- SetWindowText(hwndLog, _T(""));
+ SetWindowText(hwndLog, L"");
SendMessage(hwndLog, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
SendMessage(hwndLog, EM_SETLANGOPTIONS, 0, (LPARAM)SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETLANGOPTIONS, 0, 0) & ~IMF_AUTOKEYBOARD);
// set the scrollbars etc to RTL/LTR (only for manual RTL mode)
@@ -1004,7 +1004,7 @@ void TSAPI DM_LoadLocale(TWindowData *dat)
if (!PluginConfig.m_bDontUseDefaultKbd) {
TCHAR szBuf[20];
GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_ILANGUAGE, szBuf, 20);
- mir_sntprintf(szKLName, _T("0000%s"), szBuf);
+ mir_sntprintf(szKLName, L"0000%s", szBuf);
db_set_ts(dat->hContact, SRMSGMOD_T, "locale", szKLName);
}
else {
@@ -1053,13 +1053,13 @@ void TSAPI DM_UpdateLastMessage(const TWindowData *dat)
SendMessage(dat->pContainer->hwndStatus, SB_SETICON, 0, 0);
if (dat->pContainer->dwFlags & CNT_UINSTATUSBAR)
- mir_sntprintf(szBuf, _T("UID: %s"), dat->cache->getUIN());
+ mir_sntprintf(szBuf, L"UID: %s", dat->cache->getUIN());
else if (dat->lastMessage) {
TCHAR date[64], time[64];
- TimeZone_PrintTimeStamp(NULL, dat->lastMessage, _T("d"), date, _countof(date), 0);
+ TimeZone_PrintTimeStamp(NULL, dat->lastMessage, L"d", date, _countof(date), 0);
if (dat->pContainer->dwFlags & CNT_UINSTATUSBAR && mir_tstrlen(date) > 6)
date[mir_tstrlen(date) - 5] = 0;
- TimeZone_PrintTimeStamp(NULL, dat->lastMessage, _T("t"), time, _countof(time), 0);
+ TimeZone_PrintTimeStamp(NULL, dat->lastMessage, L"t", time, _countof(time), 0);
mir_sntprintf(szBuf, TranslateT("Last received: %s at %s"), date, time);
}
else szBuf[0] = 0;
@@ -1744,11 +1744,11 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM, LPARAM lParam)
if (mir_tstrlen(newcontactname) != 0) {
if (PluginConfig.m_bStatusOnTabs)
- mir_sntprintf(newtitle, _T("%s (%s)"), newcontactname, dat->szStatus);
+ mir_sntprintf(newtitle, L"%s (%s)", newcontactname, dat->szStatus);
else
_tcsncpy_s(newtitle, newcontactname, _TRUNCATE);
}
- else _tcsncpy_s(newtitle, _T("Forward"), _TRUNCATE);
+ else _tcsncpy_s(newtitle, L"Forward", _TRUNCATE);
item.mask |= TCIF_TEXT;
}
@@ -1767,7 +1767,7 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM, LPARAM lParam)
SendDlgItemMessage(hwndDlg, IDC_NAME, BUTTONADDTOOLTIP, (WPARAM)fulluin, BATF_TCHAR);
}
}
- else _tcsncpy_s(newtitle, _T("Message Session"), _TRUNCATE);
+ else _tcsncpy_s(newtitle, L"Message Session", _TRUNCATE);
if (dat->idle != dwOldIdle || lParam != 0) {
if (item.mask & TCIF_TEXT) {
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index e3ea4f20e9..688a365f04 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -35,9 +35,9 @@ bool g_bShutdown = false;
CGlobals PluginConfig;
-static TContainerSettings _cnt_default = { false, CNT_FLAGS_DEFAULT, CNT_FLAGSEX_DEFAULT, 255, CInfoPanel::DEGRADE_THRESHOLD, 60, _T("%n (%s)"), 1, 0 };
+static TContainerSettings _cnt_default = { false, CNT_FLAGS_DEFAULT, CNT_FLAGSEX_DEFAULT, 255, CInfoPanel::DEGRADE_THRESHOLD, 60, L"%n (%s)", 1, 0 };
-TCHAR* CGlobals::m_default_container_name = _T("default");
+TCHAR* CGlobals::m_default_container_name = L"default";
extern HANDLE hHookButtonPressedEvt;
extern HANDLE hHookToolBarLoadedEvt;
@@ -304,7 +304,7 @@ int CGlobals::ModulesLoaded(WPARAM, LPARAM)
if (M.GetByte("avatarmode", -1) == -1)
db_set_b(0, SRMSGMOD_T, "avatarmode", 2);
- PluginConfig.g_hwndHotkeyHandler = CreateWindowEx(0, _T("TSHK"), _T(""), WS_POPUP,
+ PluginConfig.g_hwndHotkeyHandler = CreateWindowEx(0, L"TSHK", L"", WS_POPUP,
0, 0, 40, 40, 0, 0, g_hInst, NULL);
::CreateTrayMenus(TRUE);
@@ -502,11 +502,11 @@ int CGlobals::PreshutdownSendRecv(WPARAM, LPARAM)
::NEN_WriteOptions(&nen_options);
::DestroyWindow(PluginConfig.g_hwndHotkeyHandler);
- ::UnregisterClass(_T("TSStatusBarClass"), g_hInst);
- ::UnregisterClass(_T("SideBarClass"), g_hInst);
- ::UnregisterClass(_T("TSTabCtrlClass"), g_hInst);
- ::UnregisterClass(_T("RichEditTipClass"), g_hInst);
- ::UnregisterClass(_T("TSHK"), g_hInst);
+ ::UnregisterClass(L"TSStatusBarClass", g_hInst);
+ ::UnregisterClass(L"SideBarClass", g_hInst);
+ ::UnregisterClass(L"TSTabCtrlClass", g_hInst);
+ ::UnregisterClass(L"RichEditTipClass", g_hInst);
+ ::UnregisterClass(L"TSHK", g_hInst);
return 0;
}
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp
index eaa4785467..8d92bde883 100644
--- a/plugins/TabSRMM/src/infopanel.cpp
+++ b/plugins/TabSRMM/src/infopanel.cpp
@@ -30,12 +30,12 @@
TCHAR *xStatusDescr[] =
{
- _T("Angry"), _T("Duck"), _T("Tired"), _T("Party"), _T("Beer"), _T("Thinking"), _T("Eating"),
- _T("TV"), _T("Friends"), _T("Coffee"), _T("Music"), _T("Business"), _T("Camera"), _T("Funny"),
- _T("Phone"), _T("Games"), _T("College"), _T("Shopping"), _T("Sick"), _T("Sleeping"),
- _T("Surfing"), _T("@Internet"), _T("Engineering"), _T("Typing"), _T("Eating... yummy"),
- _T("Having fun"), _T("Chit chatting"), _T("Crashing"), _T("Going to toilet"), _T("<undef>"),
- _T("<undef>"), _T("<undef>")
+ L"Angry", L"Duck", L"Tired", L"Party", L"Beer", L"Thinking", L"Eating",
+ L"TV", L"Friends", L"Coffee", L"Music", L"Business", L"Camera", L"Funny",
+ L"Phone", L"Games", L"College", L"Shopping", L"Sick", L"Sleeping",
+ L"Surfing", L"@Internet", L"Engineering", L"Typing", L"Eating... yummy",
+ L"Having fun", L"Chit chatting", L"Crashing", L"Going to toilet", L"<undef>",
+ L"<undef>", L"<undef>"
};
TInfoPanelConfig CInfoPanel::m_ipConfig = { 0 };
@@ -422,7 +422,7 @@ void CInfoPanel::RenderIPNickname(const HDC hdc, RECT &rcItem)
if (szStatusMsg) {
SIZE sStatusMsg, sMask;
::GetTextExtentPoint32(hdc, szTextToShow, (int)mir_tstrlen(szTextToShow), &m_szNick);
- ::GetTextExtentPoint32(hdc, _T("A"), 1, &sMask);
+ ::GetTextExtentPoint32(hdc, L"A", 1, &sMask);
::GetTextExtentPoint32(hdc, szStatusMsg, (int)mir_tstrlen(szStatusMsg), &sStatusMsg);
DWORD dtFlagsNick = DT_SINGLELINE | DT_WORD_ELLIPSIS | DT_NOPREFIX;
@@ -543,7 +543,7 @@ void CInfoPanel::RenderIPStatus(const HDC hdc, RECT& rcItem)
TCHAR szResult[80]; szResult[0] = 0;
if (m_dat->hTimeZone) {
- TimeZone_PrintDateTime(m_dat->hTimeZone, _T("t"), szResult, _countof(szResult), 0);
+ TimeZone_PrintDateTime(m_dat->hTimeZone, L"t", szResult, _countof(szResult), 0);
GetTextExtentPoint32(hdc, szResult, (int)mir_tstrlen(szResult), &sTime);
}
@@ -670,7 +670,7 @@ void CInfoPanel::Chat_RenderIPSecondLine(const HDC hdc, RECT& rcItem)
SIZE szTitle;
TCHAR szPrefix[100];
- mir_sntprintf(szPrefix, TranslateT("Topic is: %s"), _T(""));
+ mir_sntprintf(szPrefix, TranslateT("Topic is: %s"), L"");
::GetTextExtentPoint32(hdc, szPrefix, (int)mir_tstrlen(szPrefix), &szTitle);
mapRealRect(rcItem, m_rcUIN, szTitle);
if (m_hoverFlags & HOVER_UIN)
@@ -899,8 +899,8 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
if (tszXStatusName) {
str.Append(TranslateT("\\par\\par\\ul\\b Extended status information:\\ul0\\b0 \\par "));
- str.AppendFormat(_T("%s%s%s"), tszXStatusName, m_dat->cache->getXStatusMsg() ? _T(" / ") : _T(""),
- m_dat->cache->getXStatusMsg() ? m_dat->cache->getXStatusMsg() : _T(""));
+ str.AppendFormat(L"%s%s%s", tszXStatusName, m_dat->cache->getXStatusMsg() ? L" / " : L"",
+ m_dat->cache->getXStatusMsg() ? m_dat->cache->getXStatusMsg() : L"");
if (dbv.ptszVal)
mir_free(dbv.ptszVal);
@@ -917,7 +917,7 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam)
str.AppendChar('}');
// convert line breaks to rtf
- str.Replace(_T("\n"), _T("\\line "));
+ str.Replace(L"\n", L"\\line ");
POINT pt;
RECT rc = { 0, 0, 400, 600 };
@@ -1311,10 +1311,10 @@ void CInfoPanel::dismissConfig(bool fForced)
CTip::CTip(const HWND hwndParent, const MCONTACT hContact, const TCHAR *pszText, const CInfoPanel* panel)
{
- m_hwnd = ::CreateWindowEx(WS_EX_TOOLWINDOW, _T("RichEditTipClass"), _T(""), (M.isAero() ? WS_THICKFRAME : WS_BORDER) | WS_POPUPWINDOW | WS_TABSTOP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
+ m_hwnd = ::CreateWindowEx(WS_EX_TOOLWINDOW, L"RichEditTipClass", L"", (M.isAero() ? WS_THICKFRAME : WS_BORDER) | WS_POPUPWINDOW | WS_TABSTOP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
0, 0, 40, 40, 0, 0, g_hInst, this);
- m_hRich = ::CreateWindowEx(0, _T("RICHEDIT50W"), _T(""), WS_CHILD | ES_MULTILINE | ES_AUTOVSCROLL | ES_NOHIDESEL | ES_READONLY | WS_VSCROLL | WS_TABSTOP,
+ m_hRich = ::CreateWindowEx(0, L"RICHEDIT50W", L"", WS_CHILD | ES_MULTILINE | ES_AUTOVSCROLL | ES_NOHIDESEL | ES_READONLY | WS_VSCROLL | WS_TABSTOP,
0, 0, 40, 40, m_hwnd, reinterpret_cast<HMENU>(1000), g_hInst, NULL);
::SendMessage(m_hRich, EM_AUTOURLDETECT, TRUE, 0);
@@ -1416,7 +1416,7 @@ void CTip::registerClass()
{
WNDCLASSEX wc = { 0 };
wc.cbSize = sizeof(wc);
- wc.lpszClassName = _T("RichEditTipClass");
+ wc.lpszClassName = L"RichEditTipClass";
wc.lpfnWndProc = CTip::WndProcStub;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.cbWndExtra = sizeof(CTip *);
@@ -1503,7 +1503,7 @@ INT_PTR CALLBACK CTip::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
LONG cy = rc.bottom;
HANDLE hTheme = 0;
- mir_sntprintf(szTitle, m_szTitle ? _T("%s (%s)") : _T("%s%s"), c->getNick(), m_szTitle ? m_szTitle : _T(""));
+ mir_sntprintf(szTitle, m_szTitle ? L"%s (%s)" : L"%s%s", c->getNick(), m_szTitle ? m_szTitle : L"");
if (m_panel) {
HDC hdcMem = ::CreateCompatibleDC(hdc);
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index 0e2f691201..193be84d7b 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -47,7 +47,7 @@ DURT CMimAPI::m_pfnDwmUnregisterThumbnail = 0;
DSIT CMimAPI::m_pfnDwmSetIconicThumbnail = 0;
DSILP CMimAPI::m_pfnDwmSetIconicLivePreviewBitmap = 0;
bool CMimAPI::m_shutDown = 0;
-TCHAR CMimAPI::m_userDir[] = _T("\0");
+TCHAR CMimAPI::m_userDir[] = L"\0";
bool CMimAPI::m_haveBufferedPaint = false;
@@ -138,7 +138,7 @@ const TCHAR* CMimAPI::getUserDir()
if (ServiceExists(MS_FOLDERS_REGISTER_PATH))
_tcsncpy_s(m_userDir, L"%miranda_userdata%", _TRUNCATE);
else
- _tcsncpy_s(m_userDir, VARST(_T("%miranda_userdata%")), _TRUNCATE);
+ _tcsncpy_s(m_userDir, VARST(L"%miranda_userdata%"), _TRUNCATE);
Utils::ensureTralingBackslash(m_userDir);
}
@@ -149,14 +149,14 @@ void CMimAPI::InitPaths()
{
const TCHAR *szUserdataDir = getUserDir();
- mir_sntprintf(m_szProfilePath, _T("%stabSRMM"), szUserdataDir);
+ mir_sntprintf(m_szProfilePath, L"%stabSRMM", szUserdataDir);
if (ServiceExists(MS_FOLDERS_REGISTER_PATH)) {
- _tcsncpy_s(m_szChatLogsPath, _T("%miranda_logpath%"), _TRUNCATE);
- _tcsncpy_s(m_szSkinsPath, _T("%miranda_path%\\Skins\\TabSRMM"), _TRUNCATE);
+ _tcsncpy_s(m_szChatLogsPath, L"%miranda_logpath%", _TRUNCATE);
+ _tcsncpy_s(m_szSkinsPath, L"%miranda_path%\\Skins\\TabSRMM", _TRUNCATE);
}
else {
- _tcsncpy_s(m_szChatLogsPath, VARST(_T("%miranda_logpath%")), _TRUNCATE);
- _tcsncpy_s(m_szSkinsPath, VARST(_T("%miranda_path%\\Skins\\TabSRMM")), _TRUNCATE);
+ _tcsncpy_s(m_szChatLogsPath, VARST(L"%miranda_logpath%"), _TRUNCATE);
+ _tcsncpy_s(m_szSkinsPath, VARST(L"%miranda_path%\\Skins\\TabSRMM"), _TRUNCATE);
}
Utils::ensureTralingBackslash(m_szChatLogsPath);
@@ -164,7 +164,7 @@ void CMimAPI::InitPaths()
Utils::ensureTralingBackslash(m_szSkinsPath);
- mir_sntprintf(m_szSavedAvatarsPath, _T("%s\\Saved Contact Pictures"), m_szProfilePath);
+ mir_sntprintf(m_szSavedAvatarsPath, L"%s\\Saved Contact Pictures", m_szProfilePath);
}
bool CMimAPI::getAeroState()
diff --git a/plugins/TabSRMM/src/modplus.cpp b/plugins/TabSRMM/src/modplus.cpp
index 85c849d16b..907f802484 100644
--- a/plugins/TabSRMM/src/modplus.cpp
+++ b/plugins/TabSRMM/src/modplus.cpp
@@ -74,7 +74,7 @@ static int CustomButtonPressed(WPARAM wParam, LPARAM lParam)
bbd.pszModuleName = "Tabmodplus";
CallService(MS_BB_GETBUTTONSTATE, wParam, (LPARAM)&bbd);
- TCHAR *pszText = _T("");
+ TCHAR *pszText = L"";
CHARRANGE cr;
cr.cpMin = cr.cpMax = 0;
SendDlgItemMessage(cbcd->hwndFrom, IDC_MESSAGE, EM_EXGETSEL, 0, (LPARAM)&cr);
@@ -128,7 +128,7 @@ static int CustomButtonPressed(WPARAM wParam, LPARAM lParam)
bufSize = textlenght + 12;
pszFormatedText = (TCHAR*)_alloca(bufSize*sizeof(TCHAR));
- mir_sntprintf(pszFormatedText, bufSize, _T("[img]%s[/img]"), pszText);
+ mir_sntprintf(pszFormatedText, bufSize, L"[img]%s[/img]", pszText);
bbd.ptszTooltip = 0;
bbd.hIcon = 0;
@@ -137,14 +137,14 @@ static int CustomButtonPressed(WPARAM wParam, LPARAM lParam)
break;
case 3:
- pszFormatedText = _T("[img]");
+ pszFormatedText = L"[img]";
bbd.ptszTooltip = LPGENT("Insert [img] tag / surround selected text with [img][/img]");
CallService(MS_BB_SETBUTTONSTATE, wParam, (LPARAM)&bbd);
break;
case 4:
- pszFormatedText = _T("[/img]");
+ pszFormatedText = L"[/img]";
bbd.ptszTooltip = LPGENT("Insert [img] tag / surround selected text with [img][/img]");
CallService(MS_BB_SETBUTTONSTATE, wParam, (LPARAM)&bbd);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 45bdb71c22..83be1cc69e 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -570,7 +570,7 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar
SendMessage(hwndParent, WM_COMMAND, MAKELONG(IDC_FONTUNDERLINE, IDC_MESSAGE), 0);
return 0;
case 0x0b:
- SetWindowText(hwnd, _T(""));
+ SetWindowText(hwnd, L"");
return 0;
}
}
@@ -1199,9 +1199,9 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
GetMYUIN(dat);
GetClientIcon(dat);
- CustomizeButton(CreateWindowEx(0, _T("MButtonClass"), _T(""), WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 0, 6, DPISCALEY_S(20),
+ CustomizeButton(CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 0, 6, DPISCALEY_S(20),
hwndDlg, (HMENU)IDC_TOGGLESIDEBAR, g_hInst, NULL));
- dat->hwndPanelPicParent = CreateWindowEx(WS_EX_TOPMOST, _T("Static"), _T(""), SS_OWNERDRAW | WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, hwndDlg, (HMENU)6000, NULL, NULL);
+ dat->hwndPanelPicParent = CreateWindowEx(WS_EX_TOPMOST, L"Static", L"", SS_OWNERDRAW | WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, hwndDlg, (HMENU)6000, NULL, NULL);
mir_subclassWindow(dat->hwndPanelPicParent, CInfoPanel::avatarParentSubclass);
dat->bShowUIElements = (m_pContainer->dwFlags & CNT_HIDETOOLBAR) == 0;
@@ -1375,7 +1375,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
SendMessage(hwndContainer, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
{
WNDCLASS wndClass = { 0 };
- GetClassInfo(g_hInst, _T("RICHEDIT50W"), &wndClass);
+ GetClassInfo(g_hInst, L"RICHEDIT50W", &wndClass);
mir_subclassWindowFull(GetDlgItem(hwndDlg, IDC_LOG), MessageLogSubclassProc, wndClass.lpfnWndProc);
}
@@ -2361,7 +2361,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
dat->iCurrentQueueError = -1;
sendQueue->showErrorControls(dat, FALSE);
if (wParam != MSGERROR_CANCEL || (wParam == MSGERROR_CANCEL && lParam == 0))
- SetDlgItemText(hwndDlg, IDC_MESSAGE, _T(""));
+ SetDlgItemText(hwndDlg, IDC_MESSAGE, L"");
sendQueue->checkQueue(dat);
int iNextFailed = sendQueue->findNextFailed(dat);
if (iNextFailed >= 0)
@@ -2390,7 +2390,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
job->iStatus = SendQueue::SQ_INPROGRESS;
dat->iCurrentQueueError = -1;
sendQueue->showErrorControls(dat, FALSE);
- SetDlgItemText(hwndDlg, IDC_MESSAGE, _T(""));
+ SetDlgItemText(hwndDlg, IDC_MESSAGE, L"");
sendQueue->checkQueue(dat);
int iNextFailed = sendQueue->findNextFailed(dat);
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 2756aeef53..d50f9b4374 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -111,7 +111,7 @@ static UINT_PTR CALLBACK OpenFileSubclass(HWND hwnd, UINT msg, WPARAM, LPARAM lP
case WM_NOTIFY:
OPENFILENAMEA *ofn = (OPENFILENAMEA *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
HWND hwndParent = GetParent(hwnd);
- HWND hwndLv = FindWindowEx(hwndParent, NULL, _T("SHELLDLL_DefView"), NULL);
+ HWND hwndLv = FindWindowEx(hwndParent, NULL, L"SHELLDLL_DefView", NULL);
if (hwndLv != NULL && *((DWORD *)(ofn->lCustData))) {
SendMessage(hwndLv, WM_COMMAND, SHVIEW_THUMBNAIL, 0);
@@ -135,12 +135,12 @@ static void SaveAvatarToFile(TWindowData *dat, HBITMAP hbm, int isOwnPic)
DWORD setView = 1;
TCHAR szTimestamp[100];
- mir_sntprintf(szTimestamp, _T("%04u %02u %02u_%02u%02u"), lt->tm_year + 1900, lt->tm_mon, lt->tm_mday, lt->tm_hour, lt->tm_min);
+ mir_sntprintf(szTimestamp, L"%04u %02u %02u_%02u%02u", lt->tm_year + 1900, lt->tm_mon, lt->tm_mday, lt->tm_hour, lt->tm_min);
TCHAR *szProto = mir_a2t(dat->cache->getActiveProto());
TCHAR szFinalPath[MAX_PATH];
- mir_sntprintf(szFinalPath, _T("%s\\%s"), M.getSavedAvatarPath(), szProto);
+ mir_sntprintf(szFinalPath, L"%s\\%s", M.getSavedAvatarPath(), szProto);
mir_free(szProto);
if (CreateDirectory(szFinalPath, 0) == 0) {
@@ -153,20 +153,20 @@ static void SaveAvatarToFile(TWindowData *dat, HBITMAP hbm, int isOwnPic)
TCHAR szBaseName[MAX_PATH];
if (isOwnPic)
- mir_sntprintf(szBaseName, _T("My Avatar_%s"), szTimestamp);
+ mir_sntprintf(szBaseName, L"My Avatar_%s", szTimestamp);
else
- mir_sntprintf(szBaseName, _T("%s_%s"), dat->cache->getNick(), szTimestamp);
+ mir_sntprintf(szBaseName, L"%s_%s", dat->cache->getNick(), szTimestamp);
- mir_sntprintf(szFinalFilename, _T("%s.png"), szBaseName);
+ mir_sntprintf(szFinalFilename, L"%s.png", szBaseName);
// do not allow / or \ or % in the filename
Utils::sanitizeFilename(szFinalFilename);
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s%c*.bmp;*.png;*.jpg;*.gif%c%c"), TranslateT("Image files"), 0, 0, 0);
+ mir_sntprintf(filter, L"%s%c*.bmp;*.png;*.jpg;*.gif%c%c", TranslateT("Image files"), 0, 0, 0);
OPENFILENAME ofn = { 0 };
- ofn.lpstrDefExt = _T("png");
+ ofn.lpstrDefExt = L"png";
ofn.lpstrFilter = filter;
ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER | OFN_ENABLESIZING | OFN_ENABLEHOOK;
ofn.lpfnHook = OpenFileSubclass;
@@ -443,15 +443,15 @@ void TSAPI UpdateReadChars(const TWindowData *dat)
TCHAR szBuf[20]; szBuf[0] = 0;
if (dat->fInsertMode)
- mir_tstrcat(szBuf, _T("O"));
+ mir_tstrcat(szBuf, L"O");
if (fCaps)
- mir_tstrcat(szBuf, _T("C"));
+ mir_tstrcat(szBuf, L"C");
if (fNum)
- mir_tstrcat(szBuf, _T("N"));
+ mir_tstrcat(szBuf, L"N");
if (dat->fInsertMode || fCaps || fNum)
- mir_tstrcat(szBuf, _T(" | "));
+ mir_tstrcat(szBuf, L" | ");
- mir_sntprintf(buf, _T("%s%s %d/%d"), szBuf, dat->lcID, dat->iOpenJobs, len);
+ mir_sntprintf(buf, L"%s%s %d/%d", szBuf, dat->lcID, dat->iOpenJobs, len);
SendMessage(dat->pContainer->hwndStatus, SB_SETTEXT, 1, (LPARAM)buf);
if (PluginConfig.m_visualMessageSizeIndicator)
InvalidateRect(dat->pContainer->hwndStatus, NULL, FALSE);
@@ -555,7 +555,7 @@ bool TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat)
if (!bOwnAvatarMode) {
dat->bShowAvatar = (dat->hOwnPic && dat->hOwnPic != PluginConfig.g_hbmUnknown);
if (!dat->hwndContactPic)
- dat->hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, _T(""), WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(hwndDlg, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
+ dat->hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, L"", WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(hwndDlg, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
}
switch (bAvatarMode) {
@@ -572,7 +572,7 @@ bool TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat)
}
if (!dat->hwndPanelPic) {
- dat->hwndPanelPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, _T(""), WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, dat->hwndPanelPicParent, (HMENU)7000, NULL, NULL);
+ dat->hwndPanelPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, L"", WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, dat->hwndPanelPicParent, (HMENU)7000, NULL, NULL);
if (dat->hwndPanelPic)
SendMessage(dat->hwndPanelPic, AVATAR_SETAEROCOMPATDRAWING, 0, TRUE);
}
@@ -598,7 +598,7 @@ bool TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat)
dat->bShowAvatar = true;
LBL_Check:
if (!dat->hwndContactPic)
- dat->hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, _T(""), WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(hwndDlg, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
+ dat->hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, L"", WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(hwndDlg, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
break;
case 2: // globally OFF
dat->bShowAvatar = false;
@@ -832,23 +832,23 @@ char* TSAPI Message_GetFromStream(HWND hwndRtf, DWORD dwPassedFlags)
return pszText; // pszText contains the text
}
-static TCHAR tszRtfBreaks[] = _T(" \\\n\r");
+static TCHAR tszRtfBreaks[] = L" \\\n\r";
static void CreateColorMap(CMString &Text, int iCount, COLORREF *pSrc, int *pDst)
{
const TCHAR *pszText = Text;
int iIndex = 1;
- static const TCHAR *lpszFmt = _T("\\red%[^ \x5b\\]\\green%[^ \x5b\\]\\blue%[^ \x5b;];");
+ static const TCHAR *lpszFmt = L"\\red%[^ \x5b\\]\\green%[^ \x5b\\]\\blue%[^ \x5b;];";
TCHAR szRed[10], szGreen[10], szBlue[10];
- const TCHAR *p1 = _tcsstr(pszText, _T("\\colortbl"));
+ const TCHAR *p1 = _tcsstr(pszText, L"\\colortbl");
if (!p1)
return;
const TCHAR *pEnd = _tcschr(p1, '}');
- const TCHAR *p2 = _tcsstr(p1, _T("\\red"));
+ const TCHAR *p2 = _tcsstr(p1, L"\\red");
for (int i = 0; i < iCount; i++)
pDst[i] = -1;
@@ -864,7 +864,7 @@ static void CreateColorMap(CMString &Text, int iCount, COLORREF *pSrc, int *pDst
p1 = p2;
p1++;
- p2 = _tcsstr(p1, _T("\\red"));
+ p2 = _tcsstr(p1, L"\\red");
}
}
@@ -895,9 +895,9 @@ BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMString &pszText, int iNumColors
CreateColorMap(pszText, iNumColors, pColors, pIndex);
// scan the file for rtf commands and remove or parse them
- int idx = pszText.Find(_T("\\pard"));
+ int idx = pszText.Find(L"\\pard");
if (idx == -1) {
- if ((idx = pszText.Find(_T("\\ltrpar"))) == -1)
+ if ((idx = pszText.Find(L"\\ltrpar")) == -1)
return FALSE;
idx += 7;
}
@@ -919,71 +919,71 @@ BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMString &pszText, int iNumColors
p += 2; break;
}
- if (!_tcsncmp(p, _T("\\cf"), 3)) { // foreground color
+ if (!_tcsncmp(p, L"\\cf", 3)) { // foreground color
int iCol = _ttoi(p + 3);
int iInd = GetRtfIndex(iCol, iNumColors, pIndex);
if (iCol && dat->bType != SESSIONTYPE_CHAT)
- res.AppendFormat((iInd > 0) ? (bInsideColor ? _T("[/color][color=%s]") : _T("[color=%s]")) : (bInsideColor ? _T("[/color]") : _T("")), Utils::rtf_ctable[iInd - 1].szName);
+ res.AppendFormat((iInd > 0) ? (bInsideColor ? L"[/color][color=%s]" : L"[color=%s]") : (bInsideColor ? L"[/color]" : L""), Utils::rtf_ctable[iInd - 1].szName);
bInsideColor = iInd > 0;
}
- else if (!_tcsncmp(p, _T("\\highlight"), 10)) { //background color
+ else if (!_tcsncmp(p, L"\\highlight", 10)) { //background color
TCHAR szTemp[20];
int iCol = _ttoi(p + 10);
- mir_sntprintf(szTemp, _T("%d"), iCol);
+ mir_sntprintf(szTemp, L"%d", iCol);
}
- else if (!_tcsncmp(p, _T("\\line"), 5)) { // soft line break;
+ else if (!_tcsncmp(p, L"\\line", 5)) { // soft line break;
res.AppendChar('\n');
}
- else if (!_tcsncmp(p, _T("\\endash"), 7)) {
+ else if (!_tcsncmp(p, L"\\endash", 7)) {
res.AppendChar(0x2013);
}
- else if (!_tcsncmp(p, _T("\\emdash"), 7)) {
+ else if (!_tcsncmp(p, L"\\emdash", 7)) {
res.AppendChar(0x2014);
}
- else if (!_tcsncmp(p, _T("\\bullet"), 7)) {
+ else if (!_tcsncmp(p, L"\\bullet", 7)) {
res.AppendChar(0x2022);
}
- else if (!_tcsncmp(p, _T("\\ldblquote"), 10)) {
+ else if (!_tcsncmp(p, L"\\ldblquote", 10)) {
res.AppendChar(0x201C);
}
- else if (!_tcsncmp(p, _T("\\rdblquote"), 10)) {
+ else if (!_tcsncmp(p, L"\\rdblquote", 10)) {
res.AppendChar(0x201D);
}
- else if (!_tcsncmp(p, _T("\\lquote"), 7)) {
+ else if (!_tcsncmp(p, L"\\lquote", 7)) {
res.AppendChar(0x2018);
}
- else if (!_tcsncmp(p, _T("\\rquote"), 7)) {
+ else if (!_tcsncmp(p, L"\\rquote", 7)) {
res.AppendChar(0x2019);
}
- else if (!_tcsncmp(p, _T("\\b"), 2)) { //bold
+ else if (!_tcsncmp(p, L"\\b", 2)) { //bold
if (!(lf.lfWeight == FW_BOLD)) // only allow bold if the font itself isn't a bold one, otherwise just strip it..
if (dat->SendFormat)
- res.Append((p[2] != '0') ? _T("[b]") : _T("[/b]"));
+ res.Append((p[2] != '0') ? L"[b]" : L"[/b]");
}
- else if (!_tcsncmp(p, _T("\\i"), 2)) { // italics
+ else if (!_tcsncmp(p, L"\\i", 2)) { // italics
if (!lf.lfItalic && dat->SendFormat)
- res.Append((p[2] != '0') ? _T("[i]") : _T("[/i]"));
+ res.Append((p[2] != '0') ? L"[i]" : L"[/i]");
}
- else if (!_tcsncmp(p, _T("\\strike"), 7)) { // strike-out
+ else if (!_tcsncmp(p, L"\\strike", 7)) { // strike-out
if (!lf.lfStrikeOut && dat->SendFormat)
- res.Append((p[7] != '0') ? _T("[s]") : _T("[/s]"));
+ res.Append((p[7] != '0') ? L"[s]" : L"[/s]");
}
- else if (!_tcsncmp(p, _T("\\ul"), 3)) { // underlined
+ else if (!_tcsncmp(p, L"\\ul", 3)) { // underlined
if (!lf.lfUnderline && dat->SendFormat) {
if (p[3] == 0 || _tcschr(tszRtfBreaks, p[3])) {
- res.Append(_T("[u]"));
+ res.Append(L"[u]");
bInsideUl = true;
}
- else if (!_tcsnccmp(p + 3, _T("none"), 4)) {
+ else if (!_tcsnccmp(p + 3, L"none", 4)) {
if (bInsideUl)
- res.Append(_T("[/u]"));
+ res.Append(L"[/u]");
bInsideUl = false;
}
}
}
- else if (!_tcsncmp(p, _T("\\tab"), 4)) { // tab
+ else if (!_tcsncmp(p, L"\\tab", 4)) { // tab
res.AppendChar('\t');
}
else if (p[1] == '\'') { // special character
@@ -1023,9 +1023,9 @@ BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMString &pszText, int iNumColors
}
if (bInsideColor && dat->bType != SESSIONTYPE_CHAT)
- res.Append(_T("[/color]"));
+ res.Append(L"[/color]");
if (bInsideUl)
- res.Append(_T("[/u]"));
+ res.Append(L"[/u]");
pszText = res;
return TRUE;
@@ -1271,8 +1271,8 @@ void TSAPI GetLocaleID(TWindowData *dat, const TCHAR *szKLName)
TCHAR szKey[20];
DWORD dwLID = _tcstoul(szKLName, &stopped, 16);
- mir_sntprintf(szKey, _T("%04.04x"), LOWORD(dwLID));
- if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_CLASSES_ROOT, _T("MIME\\Database\\Rfc1766"), 0, KEY_READ, &hKey)) {
+ mir_sntprintf(szKey, L"%04.04x", LOWORD(dwLID));
+ if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_CLASSES_ROOT, L"MIME\\Database\\Rfc1766", 0, KEY_READ, &hKey)) {
DWORD dwLength = 255;
if (ERROR_SUCCESS == RegQueryValueEx(hKey, szKey, 0, 0, (unsigned char *)szLI, &dwLength)) {
TCHAR* p;
@@ -1741,7 +1741,7 @@ void TSAPI GetMyNick(TWindowData *dat)
else
_tcsncpy_s(dat->szMyNickname, tszNick, _TRUNCATE);
}
- else _tcsncpy_s(dat->szMyNickname, _T("<undef>"), _TRUNCATE); // same here
+ else _tcsncpy_s(dat->szMyNickname, L"<undef>", _TRUNCATE); // same here
}
HICON TSAPI MY_GetContactIcon(const TWindowData *dat, LPCSTR szSetting)
@@ -1785,14 +1785,14 @@ void TSAPI ClearLog(TWindowData *dat)
CallService(MS_HPP_EG_EVENT, 0, (LPARAM)&event);
}
}
- SetDlgItemText(dat->hwnd, IDC_LOG, _T(""));
+ SetDlgItemText(dat->hwnd, IDC_LOG, L"");
dat->hDbEventFirst = NULL;
}
else if (dat && dat->bType == SESSIONTYPE_CHAT && dat->si) {
SESSION_INFO *si = dat->si;
SESSION_INFO* s = pci->SM_FindSession(si->ptszID, si->pszModule);
if (s) {
- SetDlgItemText(dat->hwnd, IDC_CHAT_LOG, _T(""));
+ SetDlgItemText(dat->hwnd, IDC_CHAT_LOG, L"");
pci->LM_RemoveAll(&s->pLog, &s->pLogEnd);
s->iEventCount = 0;
s->LastTime = 0;
@@ -1917,7 +1917,7 @@ void TSAPI SendHBitmapAsFile(const TWindowData *dat, HBITMAP hbmp)
if (filename[0] == 0) { // prompting to save
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s%c*.jpg%c%c"), TranslateT("JPEG-compressed images"), 0, 0, 0);
+ mir_sntprintf(filter, L"%s%c*.jpg%c%c", TranslateT("JPEG-compressed images"), 0, 0, 0);
OPENFILENAME dlg;
dlg.lStructSize = sizeof(dlg);
@@ -1926,7 +1926,7 @@ void TSAPI SendHBitmapAsFile(const TWindowData *dat, HBITMAP hbmp)
dlg.lpstrFile = filename;
dlg.nMaxFile = MAX_PATH;
dlg.Flags = OFN_NOREADONLYRETURN | OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST;
- dlg.lpstrDefExt = _T("jpg");
+ dlg.lpstrDefExt = L"jpg";
if (!GetSaveFileName(&dlg))
return;
}
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index 7280b095f6..52d7273605 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -154,10 +154,10 @@ void TSAPI CacheLogFonts()
HFONT hOldFont = (HFONT)SelectObject(hdc, CInfoPanel::m_ipConfig.hFonts[IPFONTID_NICK]);
SIZE sz;
- GetTextExtentPoint32(hdc, _T("WMA"), 3, &sz);
+ GetTextExtentPoint32(hdc, L"WMA", 3, &sz);
CInfoPanel::m_ipConfig.height1 = sz.cy;
SelectObject(hdc, CInfoPanel::m_ipConfig.hFonts[IPFONTID_UIN]);
- GetTextExtentPoint32(hdc, _T("WMA"), 3, &sz);
+ GetTextExtentPoint32(hdc, L"WMA", 3, &sz);
CInfoPanel::m_ipConfig.height2 = sz.cy;
SelectObject(hdc, hOldFont);
@@ -358,13 +358,13 @@ static TCHAR* Template_MakeRelativeDate(HANDLE hTimeZone, time_t check, TCHAR co
mir_tstrcpy(szResult, szYesterday);
else {
if (code == 'D' || code == 'R')
- szFormat = _T("D");
+ szFormat = L"D";
else if (code == 'T')
- szFormat = _T("s");
+ szFormat = L"s";
else if (code == 't')
- szFormat = _T("t");
+ szFormat = L"t";
else
- szFormat = _T("d");
+ szFormat = L"d";
TimeZone_PrintTimeStamp(hTimeZone, check, szFormat, szResult, _countof(szResult), 0);
}
@@ -831,7 +831,7 @@ static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact,
ptrT tszDescr(DbGetEventStringT(&dbei, szDescr));
TCHAR buf[1000];
- mir_sntprintf(buf, _T("%s (%s)"), tszFileName, tszDescr);
+ mir_sntprintf(buf, L"%s (%s)", tszFileName, tszDescr);
AppendUnicodeToBuffer(str, buf, 0);
}
else AppendUnicodeToBuffer(str, tszFileName, 0);
@@ -1044,7 +1044,7 @@ static void ReplaceIcons(HWND hwndDlg, TWindowData *dat, LONG startAt, int fAppe
FINDTEXTEX fi;
fi.chrg.cpMin = startAt;
if (dat->clr_added) {
- fi.lpstrText = _T("##col##");
+ fi.lpstrText = L"##col##";
fi.chrg.cpMax = -1;
CHARFORMAT2 cf2;
memset(&cf2, 0, sizeof(cf2));
@@ -1061,7 +1061,7 @@ static void ReplaceIcons(HWND hwndDlg, TWindowData *dat, LONG startAt, int fAppe
cr.cpMin = fi.chrgText.cpMin;
cr.cpMax = cr.cpMin + 18;
SendMessage(hwndrtf, EM_EXSETSEL, 0, (LPARAM)&cr);
- SendMessage(hwndrtf, EM_REPLACESEL, FALSE, (LPARAM)_T(""));
+ SendMessage(hwndrtf, EM_REPLACESEL, FALSE, (LPARAM)L"");
UINT length = (unsigned int)_ttol(&trbuffer[7]);
int index = _ttol(&trbuffer[14]);
if (length > 0 && length < 20000 && index >= RTF_CTABLE_DEFSIZE && index < Utils::rtf_ctable_size) {
@@ -1078,7 +1078,7 @@ static void ReplaceIcons(HWND hwndDlg, TWindowData *dat, LONG startAt, int fAppe
if (dat->dwFlags & MWF_LOG_SHOWICONS) {
BYTE bIconIndex = 0;
char bDirection = 0;
- fi.lpstrText = _T("#~#");
+ fi.lpstrText = L"#~#";
fi.chrg.cpMax = -1;
CHARFORMAT2 cf2;
@@ -1263,7 +1263,7 @@ void TSAPI StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAp
SendMessage(hwndrtf, EM_EXSETSEL, 0, (LPARAM)&sel);
}
else {
- SetWindowText(hwndrtf, _T(""));
+ SetWindowText(hwndrtf, L"");
sel.cpMin = 0;
sel.cpMax = GetWindowTextLength(hwndrtf);
SendMessage(hwndrtf, EM_EXSETSEL, 0, (LPARAM)&sel);
@@ -1291,7 +1291,7 @@ void TSAPI StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAp
sel.cpMax = SendMessage(hwndrtf, EM_GETTEXTLENGTHEX, (WPARAM)&gtxl, 0);
sel.cpMin = sel.cpMax - 1;
SendMessage(hwndrtf, EM_EXSETSEL, 0, (LPARAM)&sel);
- SendMessage(hwndrtf, EM_REPLACESEL, FALSE, (LPARAM)_T(""));
+ SendMessage(hwndrtf, EM_REPLACESEL, FALSE, (LPARAM)L"");
dat->isAutoRTL |= 2;
}
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index 58b62f635d..9cb53d4b0c 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -97,12 +97,12 @@ static int TSAPI ScanSkinDir(const TCHAR* tszFolder, HWND hwndCombobox)
{
bool fValid = false;
TCHAR tszMask[MAX_PATH];
- mir_sntprintf(tszMask, _T("%s*.*"), tszFolder);
+ mir_sntprintf(tszMask, L"%s*.*", tszFolder);
WIN32_FIND_DATA fd = { 0 };
HANDLE h = FindFirstFile(tszMask, &fd);
while (h != INVALID_HANDLE_VALUE) {
- if (mir_tstrlen(fd.cFileName) >= 5 && !_tcsnicmp(fd.cFileName + mir_tstrlen(fd.cFileName) - 4, _T(".tsk"), 4)) {
+ if (mir_tstrlen(fd.cFileName) >= 5 && !_tcsnicmp(fd.cFileName + mir_tstrlen(fd.cFileName) - 4, L".tsk", 4)) {
fValid = true;
break;
}
@@ -117,10 +117,10 @@ static int TSAPI ScanSkinDir(const TCHAR* tszFolder, HWND hwndCombobox)
LRESULT lr;
TCHAR szBuf[255];
- mir_sntprintf(tszFinalName, _T("%s%s"), tszFolder, fd.cFileName);
+ mir_sntprintf(tszFinalName, L"%s%s", tszFolder, fd.cFileName);
- GetPrivateProfileString(_T("Global"), _T("Name"), _T("None"), szBuf, _countof(szBuf), tszFinalName);
- if (!mir_tstrcmp(szBuf, _T("None"))) {
+ GetPrivateProfileString(L"Global", L"Name", L"None", szBuf, _countof(szBuf), tszFinalName);
+ if (!mir_tstrcmp(szBuf, L"None")) {
fd.cFileName[mir_tstrlen(fd.cFileName) - 4] = 0;
_tcsncpy_s(szBuf, fd.cFileName, _TRUNCATE);
}
@@ -153,7 +153,7 @@ static int TSAPI RescanSkins(HWND hwndCombobox)
_tcsncpy_s(tszSkinRoot, M.getSkinPath(), _TRUNCATE);
SetDlgItemText(GetParent(hwndCombobox), IDC_SKINROOTFOLDER, tszSkinRoot);
- mir_sntprintf(tszFindMask, _T("%s*.*"), tszSkinRoot);
+ mir_sntprintf(tszFindMask, L"%s*.*", tszSkinRoot);
SendMessage(hwndCombobox, CB_RESETCONTENT, 0, 0);
SendMessage(hwndCombobox, CB_INSERTSTRING, -1, (LPARAM)TranslateT("<no skin>"));
@@ -163,7 +163,7 @@ static int TSAPI RescanSkins(HWND hwndCombobox)
while (h != INVALID_HANDLE_VALUE) {
if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY && fd.cFileName[0] != '.') {
TCHAR tszSubDir[MAX_PATH];
- mir_sntprintf(tszSubDir, _T("%s%s\\"), tszSkinRoot, fd.cFileName);
+ mir_sntprintf(tszSubDir, L"%s%s\\", tszSkinRoot, fd.cFileName);
ScanSkinDir(tszSubDir, hwndCombobox);
}
if (FindNextFile(h, &fd) == 0)
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 8adcaadc52..657c3643ec 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -468,14 +468,14 @@ int TSAPI ActivateExistingTab(TContainerData *pContainer, HWND hwndChild)
HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, int isSend, const char *pszInitialText, BOOL bActivateTab, BOOL bPopupContainer, BOOL bWantPopup, MEVENT hdbEvent)
{
if (M.FindWindow(hContact) != 0) {
- _DebugPopup(hContact, _T("Warning: trying to create duplicate window"));
+ _DebugPopup(hContact, L"Warning: trying to create duplicate window");
return 0;
}
// if we have a max # of tabs/container set and want to open something in the default container...
- if (hContact != 0 && M.GetByte("limittabs", 0) && !_tcsncmp(pContainer->szName, _T("default"), 6))
- if ((pContainer = FindMatchingContainer(_T("default"))) == NULL)
- if ((pContainer = CreateContainer(_T("default"), CNT_CREATEFLAG_CLONED, hContact)) == NULL)
+ if (hContact != 0 && M.GetByte("limittabs", 0) && !_tcsncmp(pContainer->szName, L"default", 6))
+ if ((pContainer = FindMatchingContainer(L"default")) == NULL)
+ if ((pContainer = CreateContainer(L"default", CNT_CREATEFLAG_CLONED, hContact)) == NULL)
return 0;
TNewWindowData newData = { 0 };
@@ -499,14 +499,14 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact,
Utils::DoubleAmpersands(newcontactname, _countof(newcontactname));
}
- else _tcsncpy_s(newcontactname, _T("_U_"), _TRUNCATE);
+ else _tcsncpy_s(newcontactname, L"_U_", _TRUNCATE);
TCHAR *szStatus = pcli->pfnGetStatusModeDescription(szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(newData.hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
if (M.GetByte("tabstatus", 1))
- mir_sntprintf(tabtitle, _T("%s (%s) "), newcontactname, szStatus);
+ mir_sntprintf(tabtitle, L"%s (%s) ", newcontactname, szStatus);
else
- mir_sntprintf(tabtitle, _T("%s "), newcontactname);
+ mir_sntprintf(tabtitle, L"%s ", newcontactname);
newData.item.pszText = tabtitle;
newData.item.mask = TCIF_TEXT | TCIF_IMAGE | TCIF_PARAM;
@@ -621,10 +621,10 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact,
TContainerData* TSAPI FindMatchingContainer(const TCHAR *szName)
{
int iMaxTabs = M.GetDword("maxtabs", 0);
- if (iMaxTabs > 0 && M.GetByte("limittabs", 0) && !_tcsncmp(szName, _T("default"), 6)) {
+ if (iMaxTabs > 0 && M.GetByte("limittabs", 0) && !_tcsncmp(szName, L"default", 6)) {
// search a "default" with less than iMaxTabs opened...
for (TContainerData *p = pFirstContainer; p; p = p->pNext)
- if (!_tcsncmp(p->szName, _T("default"), 6) && p->iChilds < iMaxTabs)
+ if (!_tcsncmp(p->szName, L"default", 6) && p->iChilds < iMaxTabs)
return p;
return NULL;
@@ -801,7 +801,7 @@ static int TSAPI SetupIconLibConfig()
int j = 2, version = 0;
TCHAR szFilename[MAX_PATH];
- _tcsncpy(szFilename, _T("icons\\tabsrmm_icons.dll"), MAX_PATH);
+ _tcsncpy(szFilename, L"icons\\tabsrmm_icons.dll", MAX_PATH);
g_hIconDLL = LoadLibrary(szFilename);
if (g_hIconDLL == 0) {
CWarning::show(CWarning::WARN_ICONPACKMISSING, CWarning::CWF_NOALLOWHIDE | MB_ICONERROR | MB_OK);
@@ -838,7 +838,7 @@ static int TSAPI SetupIconLibConfig()
sid.iDefaultIndex = -IDI_CLOCK;
IcoLib_AddIcon(&sid);
- _tcsncpy(szFilename, _T("plugins\\tabsrmm.dll"), MAX_PATH);
+ _tcsncpy(szFilename, L"plugins\\tabsrmm.dll", MAX_PATH);
sid.pszName = "tabSRMM_overlay_disabled";
sid.description.a = LPGEN("Feature disabled (used as overlay)");
@@ -1069,7 +1069,7 @@ STDMETHODIMP CREOleCallback::GetInPlaceContext(LPOLEINPLACEFRAME*, LPOLEINPLACEU
STDMETHODIMP CREOleCallback::GetNewStorage(LPSTORAGE *lplpstg)
{
TCHAR sztName[64];
- mir_sntprintf(sztName, _T("s%u"), nextStgId++);
+ mir_sntprintf(sztName, L"s%u", nextStgId++);
if (pictStg == NULL)
return STG_E_MEDIUMFULL;
return pictStg->CreateStorage(sztName, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, 0, lplpstg);
diff --git a/plugins/TabSRMM/src/selectcontainer.cpp b/plugins/TabSRMM/src/selectcontainer.cpp
index 7ac23266b2..b743ef8868 100644
--- a/plugins/TabSRMM/src/selectcontainer.cpp
+++ b/plugins/TabSRMM/src/selectcontainer.cpp
@@ -86,7 +86,7 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
if ((iItem = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_GETCURSEL, 0, 0)) != LB_ERR) {
SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_GETTEXT, (WPARAM)iItem, (LPARAM)szName);
- if (!_tcsncmp(szName, _T("default"), CONTAINER_NAMELEN) || !_tcsncmp(szName, TranslateT("Default container"), CONTAINER_NAMELEN))
+ if (!_tcsncmp(szName, L"default", CONTAINER_NAMELEN) || !_tcsncmp(szName, TranslateT("Default container"), CONTAINER_NAMELEN))
MessageBox(hwndDlg, TranslateT("You cannot delete the default container"), TranslateT("Error"), MB_OK | MB_ICONERROR);
else {
int iIndex = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_GETITEMDATA, (WPARAM)iItem, 0);
@@ -120,7 +120,7 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
}
if ((iItem = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_GETCURSEL, 0, 0)) != LB_ERR) {
SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_GETTEXT, (WPARAM)iItem, (LPARAM)szName);
- if (!_tcsncmp(szName, _T("default"), CONTAINER_NAMELEN) || !_tcsncmp(szName, TranslateT("Default container"), CONTAINER_NAMELEN))
+ if (!_tcsncmp(szName, L"default", CONTAINER_NAMELEN) || !_tcsncmp(szName, TranslateT("Default container"), CONTAINER_NAMELEN))
MessageBox(hwndDlg, TranslateT("You cannot rename the default container"), TranslateT("Error"), MB_OK | MB_ICONERROR);
else {
int iIndex = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_GETITEMDATA, (WPARAM)iItem, 0);
@@ -182,8 +182,8 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
if (db_get_ts(NULL, szKey, szValue, &dbv))
break; // end of list
if (dbv.type == DBVT_ASCIIZ || dbv.type == DBVT_WCHAR) {
- if (_tcsncmp(dbv.ptszVal, _T("**mir_free**"), CONTAINER_NAMELEN)) {
- iItemNew = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_ADDSTRING, 0, (LPARAM)(!mir_tstrcmp(dbv.ptszVal, _T("default")) ?
+ if (_tcsncmp(dbv.ptszVal, L"**mir_free**", CONTAINER_NAMELEN)) {
+ iItemNew = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_ADDSTRING, 0, (LPARAM)(!mir_tstrcmp(dbv.ptszVal, L"default") ?
TranslateT("Default container") : dbv.ptszVal));
if (iItemNew != LB_ERR)
SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_SETITEMDATA, (WPARAM)iItemNew, (LPARAM)iCounter);
@@ -200,7 +200,7 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
if (pContainer) {
LRESULT iItem;
- iItem = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_FINDSTRING, (WPARAM)-1, (LPARAM)(!mir_tstrcmp(pContainer->szName, _T("default")) ?
+ iItem = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_FINDSTRING, (WPARAM)-1, (LPARAM)(!mir_tstrcmp(pContainer->szName, L"default") ?
TranslateT("Default container") : pContainer->szName));
if (iItem != LB_ERR)
SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_SETCURSEL, (WPARAM)iItem, 0);
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp
index 068c0baab7..1c74331fa1 100644
--- a/plugins/TabSRMM/src/sendlater.cpp
+++ b/plugins/TabSRMM/src/sendlater.cpp
@@ -495,7 +495,7 @@ LRESULT CSendLater::qMgrAddFilter(const MCONTACT hContact, const TCHAR* tszNick)
// filters by m_hFilter (contact handle)
void CSendLater::qMgrFillList(bool fClear)
{
- TCHAR *formatTime = _T("%Y.%m.%d - %H:%M");
+ TCHAR *formatTime = L"%Y.%m.%d - %H:%M";
if (fClear) {
::SendMessage(m_hwndList, LVM_DELETEALLITEMS, 0, 0);
@@ -523,7 +523,7 @@ void CSendLater::qMgrFillList(bool fClear)
lvItem.mask = LVIF_TEXT | LVIF_PARAM;
TCHAR tszBuf[255];
- mir_sntprintf(tszBuf, _T("%s [%s]"), tszNick, c->getRealAccount());
+ mir_sntprintf(tszBuf, L"%s [%s]", tszNick, c->getRealAccount());
lvItem.pszText = tszBuf;
lvItem.cchTextMax = _countof(tszBuf);
lvItem.iItem = uIndex++;
@@ -575,14 +575,14 @@ void CSendLater::qMgrFillList(bool fClear)
bCode = p->bCode;
TCHAR tszStatus[20];
- mir_sntprintf(tszStatus, _T("X/%s[%c] (%d)"), tszStatusText, bCode, p->iSendCount);
+ mir_sntprintf(tszStatus, L"X/%s[%c] (%d)", tszStatusText, bCode, p->iSendCount);
tszStatus[0] = p->szId[0];
lvItem.pszText = tszStatus;
lvItem.iSubItem = 3;
::SendMessage(m_hwndList, LVM_SETITEM, 0, LPARAM(&lvItem));
if (p->lastSent == 0)
- _tcsncpy_s(tszTimestamp, _T("Never"), _TRUNCATE);
+ _tcsncpy_s(tszTimestamp, L"Never", _TRUNCATE);
else {
_tcsftime(tszTimestamp, 30, formatTime, _localtime32((__time32_t *)&p->lastSent));
tszTimestamp[29] = 0;
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index 616f1e76c9..d04b2e621b 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -69,7 +69,7 @@ int SendQueue::addTo(TWindowData *dat, size_t iLen, int dwFlags)
int iFound = NR_SENDJOBS;
if (m_currentIndex >= NR_SENDJOBS) {
- _DebugPopup(dat->hContact, _T("Send queue full"));
+ _DebugPopup(dat->hContact, L"Send queue full");
return 0;
}
@@ -90,7 +90,7 @@ int SendQueue::addTo(TWindowData *dat, size_t iLen, int dwFlags)
}
entry_found:
if (iFound == NR_SENDJOBS) {
- _DebugPopup(dat->hContact, _T("Send queue full"));
+ _DebugPopup(dat->hContact, L"Send queue full");
return 0;
}
@@ -104,7 +104,7 @@ entry_found:
HWND hwndDlg = dat->hwnd;
dat->cache->saveHistory(0, 0);
- ::SetDlgItemText(hwndDlg, IDC_MESSAGE, _T(""));
+ ::SetDlgItemText(hwndDlg, IDC_MESSAGE, L"");
::SetFocus(GetDlgItem(hwndDlg, IDC_MESSAGE));
UpdateSaveAndSendButton(dat);
@@ -682,11 +682,11 @@ int SendQueue::doSendLater(int iJobIndex, TWindowData *dat, MCONTACT hContact, b
if (fIsSendLater) {
time_t now = time(0);
TCHAR tszTimestamp[30];
- _tcsftime(tszTimestamp, _countof(tszTimestamp), _T("%Y.%m.%d - %H:%M"), _localtime32((__time32_t *)&now));
+ _tcsftime(tszTimestamp, _countof(tszTimestamp), L"%Y.%m.%d - %H:%M", _localtime32((__time32_t *)&now));
mir_snprintf(szKeyName, "S%d", now);
mir_sntprintf(tszHeader, TranslateT("\n(Sent delayed. Original timestamp %s)"), tszTimestamp);
}
- else mir_sntprintf(tszHeader, _T("M%d|"), time(0));
+ else mir_sntprintf(tszHeader, L"M%d|", time(0));
T2Utf utf_header(tszHeader);
size_t required = mir_strlen(utf_header) + mir_strlen(job->szSendBuffer) + 10;
diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp
index 36e1066195..dfce840e74 100644
--- a/plugins/TabSRMM/src/sidebar.cpp
+++ b/plugins/TabSRMM/src/sidebar.cpp
@@ -94,7 +94,7 @@ void CSideBarButton::_create()
m_isTopAligned = true;
m_sz.cx = m_sz.cy = 0;
- m_hwnd = ::CreateWindowEx(0, _T("MButtonClass"), _T(""), WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
+ m_hwnd = ::CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
0, 0, 40, 40, m_sideBar->getScrollWnd(), reinterpret_cast<HMENU>(m_id), g_hInst, NULL);
if (m_hwnd) {
CustomizeButton(m_hwnd);
@@ -390,7 +390,7 @@ void CSideBar::Init()
if (m_pContainer->dwFlags & CNT_SIDEBAR) {
if (m_hwndScrollWnd == 0)
- m_hwndScrollWnd = ::CreateWindowEx(0, _T("TS_SideBarClass"), _T(""), WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE | WS_CHILD,
+ m_hwndScrollWnd = ::CreateWindowEx(0, L"TS_SideBarClass", L"", WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE | WS_CHILD,
0, 0, m_width, 40, m_pContainer->hwnd, reinterpret_cast<HMENU>(5000), g_hInst, this);
m_isActive = true;
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp
index bf773cd2ea..9250052093 100644
--- a/plugins/TabSRMM/src/srmm.cpp
+++ b/plugins/TabSRMM/src/srmm.cpp
@@ -68,7 +68,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRMM,
extern "C" int __declspec(dllexport) Load(void)
{
if (WinVerMajor() < 5) {
- MessageBox(0, TranslateT("This version of TabSRMM requires Windows 2000 or later."), _T("tabSRMM"), MB_OK | MB_ICONERROR);
+ MessageBox(0, TranslateT("This version of TabSRMM requires Windows 2000 or later."), L"tabSRMM", MB_OK | MB_ICONERROR);
return 1;
}
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp
index 2016d88fbb..99247998db 100644
--- a/plugins/TabSRMM/src/tabctrl.cpp
+++ b/plugins/TabSRMM/src/tabctrl.cpp
@@ -943,7 +943,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara
{
WNDCLASSEX wcl = { 0 };
wcl.cbSize = sizeof(wcl);
- GetClassInfoEx(g_hInst, _T("SysTabControl32"), &wcl);
+ GetClassInfoEx(g_hInst, L"SysTabControl32", &wcl);
OldTabControlClassProc = wcl.lpfnWndProc;
tabdat = (TabControlData*)mir_calloc(sizeof(TabControlData));
@@ -979,7 +979,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara
// it is sufficient to search it once. So this message is called, whenever
// a new tab is inserted
HWND hwndChild;
- if ((hwndChild = FindWindowEx(hwnd, 0, _T("msctls_updown32"), NULL)) != 0)
+ if ((hwndChild = FindWindowEx(hwnd, 0, L"msctls_updown32", NULL)) != 0)
DestroyWindow(hwndChild);
return 0;
@@ -1466,28 +1466,28 @@ int TSAPI RegisterTabCtrlClass(void)
WNDCLASSEX wc = { 0 };
wc.cbSize = sizeof(wc);
- wc.lpszClassName = _T("TSTabCtrlClass");
+ wc.lpszClassName = L"TSTabCtrlClass";
wc.lpfnWndProc = TabControlSubclassProc;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.cbWndExtra = sizeof(TabControlData*);
wc.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_PARENTDC;
RegisterClassEx(&wc);
- wc.lpszClassName = _T("TSStatusBarClass");
+ wc.lpszClassName = L"TSStatusBarClass";
wc.lpfnWndProc = StatusBarSubclassProc;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.cbWndExtra = sizeof(void*);
wc.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_PARENTDC;
RegisterClassEx(&wc);
- wc.lpszClassName = _T("TS_SideBarClass");
+ wc.lpszClassName = L"TS_SideBarClass";
wc.lpfnWndProc = CSideBar::wndProcStub;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.cbWndExtra = sizeof(void*);
wc.style = CS_GLOBALCLASS;// | CS_DBLCLKS; // | CS_PARENTDC;
RegisterClassEx(&wc);
- wc.lpszClassName = _T("TSHK");
+ wc.lpszClassName = L"TSHK";
wc.lpfnWndProc = HotkeyHandlerDlgProc;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.cbWndExtra = sizeof(void*);
diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp
index 1b2bb855d2..0ac8a44021 100644
--- a/plugins/TabSRMM/src/taskbar.cpp
+++ b/plugins/TabSRMM/src/taskbar.cpp
@@ -97,14 +97,14 @@ bool CTaskbarInteract::haveLargeIcons()
* always returns S_OK, but the icon is simply ignored when using small taskbar icons.
* also, figure out the button grouping mode.
*/
- if (::RegOpenKey(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced"), &hKey) == ERROR_SUCCESS) {
- ::RegQueryValueEx(hKey, _T("TaskbarSmallIcons"), 0, &dwType, (LPBYTE)&val, &size);
+ if (::RegOpenKey(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", &hKey) == ERROR_SUCCESS) {
+ ::RegQueryValueEx(hKey, L"TaskbarSmallIcons", 0, &dwType, (LPBYTE)&val, &size);
size = 4;
dwType = REG_DWORD;
/*
* this is the "grouping mode" setting for the task bar. 0 = always combine, no labels
*/
- ::RegQueryValueEx(hKey, _T("TaskbarGlomLevel"), 0, &dwType, (LPBYTE)&valGrouping, &size);
+ ::RegQueryValueEx(hKey, L"TaskbarGlomLevel", 0, &dwType, (LPBYTE)&valGrouping, &size);
::RegCloseKey(hKey);
}
m_fHaveLargeicons = (val ? false : true); // small icons in use, revert to default icon feedback
@@ -230,11 +230,11 @@ CProxyWindow::CProxyWindow(TWindowData *dat)
m_hBigIcon = 0;
m_thumb = 0;
- m_hwndProxy = ::CreateWindowEx(/*WS_EX_TOOLWINDOW | */WS_EX_NOACTIVATE, PROXYCLASSNAME, _T(""),
+ m_hwndProxy = ::CreateWindowEx(/*WS_EX_TOOLWINDOW | */WS_EX_NOACTIVATE, PROXYCLASSNAME, L"",
WS_POPUP | WS_BORDER | WS_SYSMENU | WS_CAPTION, -32000, -32000, 10, 10, NULL, NULL, g_hInst, (LPVOID)this);
#if defined(__LOGDEBUG_)
- _DebugTraceW(_T("create proxy object for: %s"), m_dat->cache->getNick());
+ _DebugTraceW(L"create proxy object for: %s", m_dat->cache->getNick());
#endif
Win7Taskbar->registerTab(m_hwndProxy, m_dat->pContainer->hwnd);
if (CMimAPI::m_pfnDwmSetWindowAttribute) {
@@ -252,7 +252,7 @@ CProxyWindow::~CProxyWindow()
::DestroyWindow(m_hwndProxy);
#if defined(__LOGDEBUG_)
- _DebugTraceW(_T("destroy proxy object for: %s"), m_dat->cache->getNick());
+ _DebugTraceW(L"destroy proxy object for: %s", m_dat->cache->getNick());
#endif
if (m_thumb) {
delete m_thumb;
@@ -621,7 +621,7 @@ void CThumbBase::renderBase()
m_hOldFont = 0;
#if defined(__LOGDEBUG_)
- _DebugTraceW(_T("refresh base (background) with %d, %d"), m_width, m_height);
+ _DebugTraceW(L"refresh base (background) with %d, %d", m_width, m_height);
#endif
m_rc.right = m_width;
@@ -733,7 +733,7 @@ CThumbBase::~CThumbBase()
m_isValid = false;
}
#if defined(__LOGDEBUG_)
- _DebugTraceW(_T("destroy CThumbBase"));
+ _DebugTraceW(L"destroy CThumbBase");
#endif
}
diff --git a/plugins/TabSRMM/src/taskbar.h b/plugins/TabSRMM/src/taskbar.h
index e4068e2ebf..8a66d5a8ba 100644
--- a/plugins/TabSRMM/src/taskbar.h
+++ b/plugins/TabSRMM/src/taskbar.h
@@ -33,7 +33,7 @@
#ifndef __TASKBAR_H
#define __TASKBAR_H
-#define PROXYCLASSNAME _T("TabSRMM_DWMProxy")
+#define PROXYCLASSNAME L"TabSRMM_DWMProxy"
extern HINSTANCE g_hInst;
class CProxyWindow;
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp
index bdc20bb45e..64f4d77917 100644
--- a/plugins/TabSRMM/src/templates.cpp
+++ b/plugins/TabSRMM/src/templates.cpp
@@ -45,26 +45,26 @@ char *TemplateNames[] = {
};
TTemplateSet LTR_Default = { TRUE,
-_T("%I %S %N %?&D%\\&E%\\!, %\\T%\\!: %?n%?S %?T%?|%M"),
-_T("%I %S %N %?&D%\\&E%\\!, %\\T%\\!: %?n%?S %?T%?|%M"),
-_T("%I %S %N %?&D%\\&E%\\!, %\\T%\\!: %?n%?S %?T%?|%M"),
-_T("%I %S %N %?&D%\\&E%\\!, %\\T%\\!: %?n%?S %?T%?|%M"),
-_T("%S %T%|%M"),
-_T("%S %T%|%M"),
-_T("%I %S %&D, %&T, %N %M%! "),
-_T("%I%S %D, %T, %e%l%M"),
+L"%I %S %N %?&D%\\&E%\\!, %\\T%\\!: %?n%?S %?T%?|%M",
+L"%I %S %N %?&D%\\&E%\\!, %\\T%\\!: %?n%?S %?T%?|%M",
+L"%I %S %N %?&D%\\&E%\\!, %\\T%\\!: %?n%?S %?T%?|%M",
+L"%I %S %N %?&D%\\&E%\\!, %\\T%\\!: %?n%?S %?T%?|%M",
+L"%S %T%|%M",
+L"%S %T%|%M",
+L"%I %S %&D, %&T, %N %M%! ",
+L"%I%S %D, %T, %e%l%M",
"Default LTR"
};
TTemplateSet RTL_Default = { TRUE,
-_T("%I %S %N %D%n%S %T%|%M"),
-_T("%I %S %N %D%n%S %T%|%M"),
-_T("%I %S %N %D%n%S %T%|%M"),
-_T("%I %S %N %D%n%S %T%|%M"),
-_T("%S %T%|%M"),
-_T("%S %T%|%M"),
-_T("%I%S %D, %T, %N %M%! "),
-_T("%I%S %D, %T, %e%l%M"),
+L"%I %S %N %D%n%S %T%|%M",
+L"%I %S %N %D%n%S %T%|%M",
+L"%I %S %N %D%n%S %T%|%M",
+L"%I %S %N %D%n%S %T%|%M",
+L"%S %T%|%M",
+L"%S %T%|%M",
+L"%I%S %D, %T, %N %M%! ",
+L"%I%S %D, %T, %e%l%M",
"Default RTL"
};
@@ -345,7 +345,7 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP
dbei.eventType = (iIndex == 6) ? EVENTTYPE_STATUSCHANGE : EVENTTYPE_MESSAGE;
dbei.eventType = (iIndex == 7) ? EVENTTYPE_ERRMSG : dbei.eventType;
if (dbei.eventType == EVENTTYPE_ERRMSG)
- dbei.szModule = (char *)_T("Sample error message");
+ dbei.szModule = (char *)L"Sample error message";
dbei.cbSize = sizeof(dbei);
dbei.pBlob = (iIndex == 6) ? (BYTE *)"is now offline (was online)" : (BYTE *)"The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.";
dbei.cbBlob = (int)mir_strlen((char *)dbei.pBlob) + 1;
@@ -353,11 +353,11 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP
dbei.flags |= (teInfo->rtl ? DBEF_RTL : 0);
dat->lastEventTime = (iIndex == 4 || iIndex == 5) ? time(NULL) - 1 : 0;
dat->iLastEventType = MAKELONG(dbei.flags, dbei.eventType);
- SetDlgItemText(hwndDlg, IDC_PREVIEW, _T(""));
+ SetDlgItemText(hwndDlg, IDC_PREVIEW, L"");
dat->dwFlags = MWF_LOG_ALL;
dat->dwFlags = (teInfo->rtl ? dat->dwFlags | MWF_LOG_RTL : dat->dwFlags & ~MWF_LOG_RTL);
dat->dwFlags = (iIndex == 0 || iIndex == 1) ? dat->dwFlags & ~MWF_LOG_GROUPMODE : dat->dwFlags | MWF_LOG_GROUPMODE;
- mir_sntprintf(dat->szMyNickname, _T("My Nickname"));
+ mir_sntprintf(dat->szMyNickname, L"My Nickname");
StreamInEvents(hwndDlg, 0, 1, 0, &dbei);
SendDlgItemMessage(hwndDlg, IDC_PREVIEW, EM_SETSEL, -1, -1);
if (teInfo->changed)
diff --git a/plugins/TabSRMM/src/themeio.cpp b/plugins/TabSRMM/src/themeio.cpp
index 84a0ddad47..204a1fa8f2 100644
--- a/plugins/TabSRMM/src/themeio.cpp
+++ b/plugins/TabSRMM/src/themeio.cpp
@@ -168,8 +168,8 @@ static struct _tagFontBlocks {
int TSAPI CheckThemeVersion(const TCHAR *szIniFilename)
{
- int cookie = GetPrivateProfileInt(_T("TabSRMM Theme"), _T("Cookie"), 0, szIniFilename);
- int version = GetPrivateProfileInt(_T("TabSRMM Theme"), _T("Version"), 0, szIniFilename);
+ int cookie = GetPrivateProfileInt(L"TabSRMM Theme", L"Cookie", 0, szIniFilename);
+ int version = GetPrivateProfileInt(L"TabSRMM Theme", L"Version", 0, szIniFilename);
if (version >= CURRENT_THEME_VERSION && cookie == THEME_COOKIE)
return 1;
@@ -425,7 +425,7 @@ const TCHAR* TSAPI GetThemeFileName(int iMode)
szFilename[0] = 0;
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s%c*.tabsrmm%c%c"), TranslateT("TabSRMM themes"), 0, 0, 0);
+ mir_sntprintf(filter, L"%s%c*.tabsrmm%c%c", TranslateT("TabSRMM themes"), 0, 0, 0);
ofn.lpstrFilter = filter;
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
ofn.hwndOwner = 0;
@@ -434,7 +434,7 @@ const TCHAR* TSAPI GetThemeFileName(int iMode)
ofn.nMaxFile = MAX_PATH;
ofn.nMaxFileTitle = MAX_PATH;
ofn.Flags = OFN_HIDEREADONLY | OFN_DONTADDTORECENT;
- ofn.lpstrDefExt = _T("tabsrmm");
+ ofn.lpstrDefExt = L"tabsrmm";
if (!iMode) {
if (GetOpenFileName(&ofn))
return szFilename;
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp
index aea865c799..48c0a11bce 100644
--- a/plugins/TabSRMM/src/themes.cpp
+++ b/plugins/TabSRMM/src/themes.cpp
@@ -30,10 +30,10 @@
#include "stdafx.h"
static SKINDESC my_default_skin[] = {
- IDR_SKIN_AERO, _T("tabskin_aero.png"),
- IDR_SKIN_AERO_GLOW, _T("tabskin_aero_glow.png"),
- IDR_SKIN_AERO_SWITCHBAR, _T("tabskin_aero_button.png"),
- IDR_SKIN_LOGO, _T("unknown.png")
+ IDR_SKIN_AERO, L"tabskin_aero.png",
+ IDR_SKIN_AERO_GLOW, L"tabskin_aero_glow.png",
+ IDR_SKIN_AERO_SWITCHBAR, L"tabskin_aero_button.png",
+ IDR_SKIN_LOGO, L"unknown.png"
};
CSkin* Skin = 0;
@@ -190,103 +190,103 @@ AeroEffect CSkin::m_aeroEffects[AERO_EFFECT_LAST] = {
// definition of the availbale skin items
CSkinItem SkinItems[] = {
- { _T("Container"), "TSKIN_Container", ID_EXTBKCONTAINER,
+ { L"Container", "TSKIN_Container", ID_EXTBKCONTAINER,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Toolbar"), "TSKIN_Container", ID_EXTBKBUTTONBAR,
+ }, { L"Toolbar", "TSKIN_Container", ID_EXTBKBUTTONBAR,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("{-}Buttonpressed"), "TSKIN_BUTTONSPRESSED", ID_EXTBKBUTTONSPRESSED,
+ }, { L"{-}Buttonpressed", "TSKIN_BUTTONSPRESSED", ID_EXTBKBUTTONSPRESSED,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Buttonnotpressed"), "TSKIN_BUTTONSNPRESSED", ID_EXTBKBUTTONSNPRESSED,
+ }, { L"Buttonnotpressed", "TSKIN_BUTTONSNPRESSED", ID_EXTBKBUTTONSNPRESSED,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Buttonmouseover"), "TSKIN_BUTTONSMOUSEOVER", ID_EXTBKBUTTONSMOUSEOVER,
+ }, { L"Buttonmouseover", "TSKIN_BUTTONSMOUSEOVER", ID_EXTBKBUTTONSMOUSEOVER,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Infopanelfield"), "TSKIN_INFOPANELFIELD", ID_EXTBKINFOPANEL,
+ }, { L"Infopanelfield", "TSKIN_INFOPANELFIELD", ID_EXTBKINFOPANEL,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Titlebutton"), "TSKIN_TITLEBUTTON", ID_EXTBKTITLEBUTTON,
+ }, { L"Titlebutton", "TSKIN_TITLEBUTTON", ID_EXTBKTITLEBUTTON,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Titlebuttonmouseover"), "TSKIN_TITLEBUTTONHOVER", ID_EXTBKTITLEBUTTONMOUSEOVER,
+ }, { L"Titlebuttonmouseover", "TSKIN_TITLEBUTTONHOVER", ID_EXTBKTITLEBUTTONMOUSEOVER,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Titlebuttonpressed"), "TSKIN_TITLEBUTTONPRESSED", ID_EXTBKTITLEBUTTONPRESSED,
+ }, { L"Titlebuttonpressed", "TSKIN_TITLEBUTTONPRESSED", ID_EXTBKTITLEBUTTONPRESSED,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Tabpage"), "TSKIN_TABPAGE", ID_EXTBKTABPAGE,
+ }, { L"Tabpage", "TSKIN_TABPAGE", ID_EXTBKTABPAGE,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Tabitem"), "TSKIN_TABITEM", ID_EXTBKTABITEM,
+ }, { L"Tabitem", "TSKIN_TABITEM", ID_EXTBKTABITEM,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Tabitem_active"), "TSKIN_TABITEMACTIVE", ID_EXTBKTABITEMACTIVE,
+ }, { L"Tabitem_active", "TSKIN_TABITEMACTIVE", ID_EXTBKTABITEMACTIVE,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Tabitem_bottom"), "TSKIN_TABITEMBOTTOM", ID_EXTBKTABITEMBOTTOM,
+ }, { L"Tabitem_bottom", "TSKIN_TABITEMBOTTOM", ID_EXTBKTABITEMBOTTOM,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Tabitem_active_bottom"), "TSKIN_TABITEMACTIVEBOTTOM", ID_EXTBKTABITEMACTIVEBOTTOM,
+ }, { L"Tabitem_active_bottom", "TSKIN_TABITEMACTIVEBOTTOM", ID_EXTBKTABITEMACTIVEBOTTOM,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Frame"), "TSKIN_FRAME", ID_EXTBKFRAME,
+ }, { L"Frame", "TSKIN_FRAME", ID_EXTBKFRAME,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("MessageLog"), "TSKIN_MLOG", ID_EXTBKHISTORY,
+ }, { L"MessageLog", "TSKIN_MLOG", ID_EXTBKHISTORY,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("InputArea"), "TSKIN_INPUT", ID_EXTBKINPUTAREA,
+ }, { L"InputArea", "TSKIN_INPUT", ID_EXTBKINPUTAREA,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("FrameInactive"), "TSKIN_FRAMEINACTIVE", ID_EXTBKFRAMEINACTIVE,
+ }, { L"FrameInactive", "TSKIN_FRAMEINACTIVE", ID_EXTBKFRAMEINACTIVE,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Tabitem_hottrack"), "TSKIN_TABITEMHOTTRACK", ID_EXTBKTABITEMHOTTRACK,
+ }, { L"Tabitem_hottrack", "TSKIN_TABITEMHOTTRACK", ID_EXTBKTABITEMHOTTRACK,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Tabitem_hottrack_bottom"), "TSKIN_TABITEMHOTTRACKBOTTOM", ID_EXTBKTABITEMHOTTRACKBOTTOM,
+ }, { L"Tabitem_hottrack_bottom", "TSKIN_TABITEMHOTTRACKBOTTOM", ID_EXTBKTABITEMHOTTRACKBOTTOM,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Statusbarpanel"), "TSKIN_STATUSBARPANEL", ID_EXTBKSTATUSBARPANEL,
+ }, { L"Statusbarpanel", "TSKIN_STATUSBARPANEL", ID_EXTBKSTATUSBARPANEL,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Statusbar"), "TSKIN_STATUSBAR", ID_EXTBKSTATUSBAR,
+ }, { L"Statusbar", "TSKIN_STATUSBAR", ID_EXTBKSTATUSBAR,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Userlist"), "TSKIN_USERLIST", ID_EXTBKUSERLIST,
+ }, { L"Userlist", "TSKIN_USERLIST", ID_EXTBKUSERLIST,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("InfoPanelBackground"), "TSKIN_INFOPANELBG", ID_EXTBKINFOPANELBG,
+ }, { L"InfoPanelBackground", "TSKIN_INFOPANELBG", ID_EXTBKINFOPANELBG,
8, CLCDEFAULT_CORNER,
0xf0f0f0, 0x42b1ff, 1, CLCDEFAULT_TEXTCOLOR, 40, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE, 0, 0
- }, { _T("Sidebar Background"), "TSKIN_SIDEBARBG", ID_EXTBKSIDEBARBG,
+ }, { L"Sidebar Background", "TSKIN_SIDEBARBG", ID_EXTBKSIDEBARBG,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
0xb2e1ff, 0xb2e1ff, 1, CLCDEFAULT_TEXTCOLOR, 40, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE, 0, 0
@@ -294,7 +294,7 @@ CSkinItem SkinItems[] = {
};
static CSkinItem _defInfoPanel = {
- _T("InfoPanelBackground"), "TSKIN_INFOPANELBG", ID_EXTBKINFOPANELBG,
+ L"InfoPanelBackground", "TSKIN_INFOPANELBG", ID_EXTBKINFOPANELBG,
8, CLCDEFAULT_CORNER,
0xf0f0f0, 0x62caff, 0, CLCDEFAULT_TEXTCOLOR, 255, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE, 0, 0
@@ -724,7 +724,7 @@ void __fastcall CImageItem::Render(const HDC hdc, const RECT *rc, bool fIgnoreGl
}
static CSkinItem StatusItem_Default = {
- _T("Container"), "EXBK_Offline", ID_EXTBKCONTAINER,
+ L"Container", "EXBK_Offline", ID_EXTBKCONTAINER,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
@@ -737,16 +737,16 @@ static struct
unsigned int size;
int defaultval;
} _tagSettings[] = {
- _T("Global"), _T("SbarHeight"), "S_sbarheight", 1, 22,
- _T("ClientArea"), _T("Left"), "S_tborder_outer_left", 1, 0,
- _T("ClientArea"), _T("Right"), "S_tborder_outer_right", 1, 0,
- _T("ClientArea"), _T("Top"), "S_tborder_outer_top", 1, 0,
- _T("ClientArea"), _T("Bottom"), "S_tborder_outer_bottom", 1, 0,
- _T("ClientArea"), _T("Inner"), "S_tborder", 1, 0,
- _T("Global"), _T("TabTextNormal"), "S_tab_txt_normal", 5, 0,
- _T("Global"), _T("TabTextActive"), "S_tab_txt_active", 5, 0,
- _T("Global"), _T("TabTextUnread"), "S_tab_txt_unread", 5, 0,
- _T("Global"), _T("TabTextHottrack"), "S_tab_txt_hottrack", 5, 0,
+ L"Global", L"SbarHeight", "S_sbarheight", 1, 22,
+ L"ClientArea", L"Left", "S_tborder_outer_left", 1, 0,
+ L"ClientArea", L"Right", "S_tborder_outer_right", 1, 0,
+ L"ClientArea", L"Top", "S_tborder_outer_top", 1, 0,
+ L"ClientArea", L"Bottom", "S_tborder_outer_bottom", 1, 0,
+ L"ClientArea", L"Inner", "S_tborder", 1, 0,
+ L"Global", L"TabTextNormal", "S_tab_txt_normal", 5, 0,
+ L"Global", L"TabTextActive", "S_tab_txt_active", 5, 0,
+ L"Global", L"TabTextUnread", "S_tab_txt_unread", 5, 0,
+ L"Global", L"TabTextHottrack", "S_tab_txt_hottrack", 5, 0,
NULL, NULL, NULL, 0, 0
};
@@ -801,9 +801,9 @@ TCHAR* CImageItem::Read(const TCHAR *szFilename)
TCHAR szDrive[MAX_PATH], szPath[MAX_PATH];
TCHAR *szFinalName = 0;
- GetPrivateProfileString(m_szName, _T("Glyph"), _T("None"), buffer, 500, szFilename);
- if (mir_tstrcmp(buffer, _T("None"))) {
- _stscanf(buffer, _T("%d,%d,%d,%d"), &m_glyphMetrics[0], &m_glyphMetrics[1],
+ GetPrivateProfileString(m_szName, L"Glyph", L"None", buffer, 500, szFilename);
+ if (mir_tstrcmp(buffer, L"None")) {
+ _stscanf(buffer, L"%d,%d,%d,%d", &m_glyphMetrics[0], &m_glyphMetrics[1],
&m_glyphMetrics[2], &m_glyphMetrics[3]);
if (m_glyphMetrics[2] > m_glyphMetrics[0] && m_glyphMetrics[3] > m_glyphMetrics[1]) {
m_dwFlags |= IMAGE_GLYPH;
@@ -812,25 +812,25 @@ TCHAR* CImageItem::Read(const TCHAR *szFilename)
}
}
- GetPrivateProfileString(m_szName, _T("Image"), _T("None"), buffer, 500, szFilename);
- if (mir_tstrcmp(buffer, _T("None")) || m_dwFlags & IMAGE_GLYPH) {
+ GetPrivateProfileString(m_szName, L"Image", L"None", buffer, 500, szFilename);
+ if (mir_tstrcmp(buffer, L"None") || m_dwFlags & IMAGE_GLYPH) {
szFinalName = new TCHAR[MAX_PATH];
//strncpy(m_szName, &m_szName[1], sizeof(m_szName));
//m_szName[sizeof(m_szName) - 1] = 0;
_tsplitpath(szFilename, szDrive, szPath, NULL, NULL);
- mir_sntprintf(szFinalName, MAX_PATH, _T("%s\\%s%s"), szDrive, szPath, buffer);
+ mir_sntprintf(szFinalName, MAX_PATH, L"%s\\%s%s", szDrive, szPath, buffer);
if (!PathFileExists(szFinalName)) {
delete[] szFinalName;
szFinalName = 0;
}
- m_alpha = GetPrivateProfileInt(m_szName, _T("Alpha"), 100, szFilename);
+ m_alpha = GetPrivateProfileInt(m_szName, L"Alpha", 100, szFilename);
m_alpha = min(m_alpha, 100);
m_alpha = (BYTE)((FLOAT)(((FLOAT)m_alpha) / 100) * 255);
m_bf.SourceConstantAlpha = m_alpha;
- m_bLeft = GetPrivateProfileInt(m_szName, _T("Left"), 0, szFilename);
- m_bRight = GetPrivateProfileInt(m_szName, _T("Right"), 0, szFilename);
- m_bTop = GetPrivateProfileInt(m_szName, _T("Top"), 0, szFilename);
- m_bBottom = GetPrivateProfileInt(m_szName, _T("Bottom"), 0, szFilename);
+ m_bLeft = GetPrivateProfileInt(m_szName, L"Left", 0, szFilename);
+ m_bRight = GetPrivateProfileInt(m_szName, L"Right", 0, szFilename);
+ m_bTop = GetPrivateProfileInt(m_szName, L"Top", 0, szFilename);
+ m_bBottom = GetPrivateProfileInt(m_szName, L"Bottom", 0, szFilename);
if (m_dwFlags & IMAGE_GLYPH) {
m_width = m_glyphMetrics[2];
m_height = m_glyphMetrics[3];
@@ -851,22 +851,22 @@ TCHAR* CImageItem::Read(const TCHAR *szFilename)
return(szFinalName);
}
}
- GetPrivateProfileString(m_szName, _T("Fillcolor"), _T("None"), buffer, 500, szFilename);
- if (mir_tstrcmp(buffer, _T("None"))) {
+ GetPrivateProfileString(m_szName, L"Fillcolor", L"None", buffer, 500, szFilename);
+ if (mir_tstrcmp(buffer, L"None")) {
COLORREF fillColor = CSkin::HexStringToLong(buffer);
m_fillBrush = CreateSolidBrush(fillColor);
m_dwFlags |= IMAGE_FILLSOLID;
}
else
m_fillBrush = 0;
- GetPrivateProfileString(m_szName, _T("Colorkey"), _T("None"), buffer, 500, szFilename);
- if (mir_tstrcmp(buffer, _T("None"))) {
+ GetPrivateProfileString(m_szName, L"Colorkey", L"None", buffer, 500, szFilename);
+ if (mir_tstrcmp(buffer, L"None")) {
CSkin::m_ContainerColorKey = CSkin::HexStringToLong(buffer);
if (CSkin::m_ContainerColorKeyBrush)
DeleteObject(CSkin::m_ContainerColorKeyBrush);
CSkin::m_ContainerColorKeyBrush = CreateSolidBrush(CSkin::m_ContainerColorKey);
}
- GetPrivateProfileString(m_szName, _T("Stretch"), _T("None"), buffer, 500, szFilename);
+ GetPrivateProfileString(m_szName, L"Stretch", L"None", buffer, 500, szFilename);
if (buffer[0] == 'B' || buffer[0] == 'b')
m_bStretch = IMAGE_STRETCH_B;
else if (buffer[0] == 'h' || buffer[0] == 'H')
@@ -874,7 +874,7 @@ TCHAR* CImageItem::Read(const TCHAR *szFilename)
else if (buffer[0] == 'w' || buffer[0] == 'W')
m_bStretch = IMAGE_STRETCH_H;
m_hbm = 0;
- if (GetPrivateProfileInt(m_szName, _T("Perpixel"), 0, szFilename))
+ if (GetPrivateProfileInt(m_szName, L"Perpixel", 0, szFilename))
m_dwFlags |= IMAGE_PERPIXEL_ALPHA;
return(szFinalName);
@@ -1201,14 +1201,14 @@ void CSkin::LoadIcon(const TCHAR *szSection, const TCHAR *name, HICON &hIcon)
DestroyIcon(hIcon);
TCHAR buffer[512];
- GetPrivateProfileString(szSection, name, _T("none"), buffer, 250, m_tszFileName);
+ GetPrivateProfileString(szSection, name, L"none", buffer, 250, m_tszFileName);
buffer[500] = 0;
- if (mir_tstrcmpi(buffer, _T("none"))) {
+ if (mir_tstrcmpi(buffer, L"none")) {
TCHAR szDrive[MAX_PATH], szDir[MAX_PATH], szImagePath[MAX_PATH];
_tsplitpath(m_tszFileName, szDrive, szDir, NULL, NULL);
- mir_sntprintf(szImagePath, _T("%s\\%s\\%s"), szDrive, szDir, buffer);
+ mir_sntprintf(szImagePath, L"%s\\%s\\%s", szDrive, szDir, buffer);
hIcon = (HICON)LoadImage(0, szImagePath, IMAGE_ICON, 16, 16, LR_LOADFROMFILE);
}
else hIcon = NULL;
@@ -1233,54 +1233,54 @@ void CSkin::ReadItem(const int id, const TCHAR *szItem)
CSkinItem *this_item = &m_SkinItems[id];
- this_item->ALPHA = (int)GetPrivateProfileInt(szItem, _T("Alpha"), defaults->ALPHA, m_tszFileName);
+ this_item->ALPHA = (int)GetPrivateProfileInt(szItem, L"Alpha", defaults->ALPHA, m_tszFileName);
this_item->ALPHA = min(this_item->ALPHA, 100);
clr = RGB(GetBValue(defaults->COLOR), GetGValue(defaults->COLOR), GetRValue(defaults->COLOR));
- mir_sntprintf(def_color, _T("%6.6x"), clr);
- GetPrivateProfileString(szItem, _T("Color1"), def_color, buffer, 400, m_tszFileName);
+ mir_sntprintf(def_color, L"%6.6x", clr);
+ GetPrivateProfileString(szItem, L"Color1", def_color, buffer, 400, m_tszFileName);
this_item->COLOR = HexStringToLong(buffer);
clr = RGB(GetBValue(defaults->COLOR2), GetGValue(defaults->COLOR2), GetRValue(defaults->COLOR2));
- mir_sntprintf(def_color, _T("%6.6x"), clr);
- GetPrivateProfileString(szItem, _T("Color2"), def_color, buffer, 400, m_tszFileName);
+ mir_sntprintf(def_color, L"%6.6x", clr);
+ GetPrivateProfileString(szItem, L"Color2", def_color, buffer, 400, m_tszFileName);
this_item->COLOR2 = HexStringToLong(buffer);
- this_item->COLOR2_TRANSPARENT = (BYTE)GetPrivateProfileInt(szItem, _T("COLOR2_TRANSPARENT"), defaults->COLOR2_TRANSPARENT, m_tszFileName);
+ this_item->COLOR2_TRANSPARENT = (BYTE)GetPrivateProfileInt(szItem, L"COLOR2_TRANSPARENT", defaults->COLOR2_TRANSPARENT, m_tszFileName);
this_item->CORNER = defaults->CORNER & CORNER_ACTIVE ? defaults->CORNER : 0;
- GetPrivateProfileString(szItem, _T("Corner"), _T("None"), buffer, 400, m_tszFileName);
- if (_tcsstr(buffer, _T("tl")))
+ GetPrivateProfileString(szItem, L"Corner", L"None", buffer, 400, m_tszFileName);
+ if (_tcsstr(buffer, L"tl"))
this_item->CORNER |= CORNER_TL;
- if (_tcsstr(buffer, _T("tr")))
+ if (_tcsstr(buffer, L"tr"))
this_item->CORNER |= CORNER_TR;
- if (_tcsstr(buffer, _T("bl")))
+ if (_tcsstr(buffer, L"bl"))
this_item->CORNER |= CORNER_BL;
- if (_tcsstr(buffer, _T("br")))
+ if (_tcsstr(buffer, L"br"))
this_item->CORNER |= CORNER_BR;
if (this_item->CORNER)
this_item->CORNER |= CORNER_ACTIVE;
this_item->GRADIENT = defaults->GRADIENT & GRADIENT_ACTIVE ? defaults->GRADIENT : 0;
- GetPrivateProfileString(szItem, _T("Gradient"), _T("None"), buffer, 400, m_tszFileName);
- if (_tcsstr(buffer, _T("left")))
+ GetPrivateProfileString(szItem, L"Gradient", L"None", buffer, 400, m_tszFileName);
+ if (_tcsstr(buffer, L"left"))
this_item->GRADIENT = GRADIENT_RL;
- else if (_tcsstr(buffer, _T("right")))
+ else if (_tcsstr(buffer, L"right"))
this_item->GRADIENT = GRADIENT_LR;
- else if (_tcsstr(buffer, _T("up")))
+ else if (_tcsstr(buffer, L"up"))
this_item->GRADIENT = GRADIENT_BT;
- else if (_tcsstr(buffer, _T("down")))
+ else if (_tcsstr(buffer, L"down"))
this_item->GRADIENT = GRADIENT_TB;
if (this_item->GRADIENT)
this_item->GRADIENT |= GRADIENT_ACTIVE;
- this_item->MARGIN_LEFT = GetPrivateProfileInt(szItem, _T("Left"), defaults->MARGIN_LEFT, m_tszFileName);
- this_item->MARGIN_RIGHT = GetPrivateProfileInt(szItem, _T("Right"), defaults->MARGIN_RIGHT, m_tszFileName);
- this_item->MARGIN_TOP = GetPrivateProfileInt(szItem, _T("Top"), defaults->MARGIN_TOP, m_tszFileName);
- this_item->MARGIN_BOTTOM = GetPrivateProfileInt(szItem, _T("Bottom"), defaults->MARGIN_BOTTOM, m_tszFileName);
- this_item->BORDERSTYLE = GetPrivateProfileInt(szItem, _T("Radius"), defaults->BORDERSTYLE, m_tszFileName);
+ this_item->MARGIN_LEFT = GetPrivateProfileInt(szItem, L"Left", defaults->MARGIN_LEFT, m_tszFileName);
+ this_item->MARGIN_RIGHT = GetPrivateProfileInt(szItem, L"Right", defaults->MARGIN_RIGHT, m_tszFileName);
+ this_item->MARGIN_TOP = GetPrivateProfileInt(szItem, L"Top", defaults->MARGIN_TOP, m_tszFileName);
+ this_item->MARGIN_BOTTOM = GetPrivateProfileInt(szItem, L"Bottom", defaults->MARGIN_BOTTOM, m_tszFileName);
+ this_item->BORDERSTYLE = GetPrivateProfileInt(szItem, L"Radius", defaults->BORDERSTYLE, m_tszFileName);
- GetPrivateProfileString(szItem, _T("Textcolor"), _T("ffffffff"), buffer, 400, m_tszFileName);
+ GetPrivateProfileString(szItem, L"Textcolor", L"ffffffff", buffer, 400, m_tszFileName);
this_item->TEXTCOLOR = HexStringToLong(buffer);
this_item->IGNORED = 0;
}
@@ -1299,7 +1299,7 @@ void CSkin::ReadImageItem(const TCHAR *itemname)
TCHAR *szImageFileName = tmpItem.Read(m_tszFileName);
- if (!mir_tstrcmpi(itemname, _T("$glyphs")) && szImageFileName != 0) { // the glyph item MUST have a valid image
+ if (!mir_tstrcmpi(itemname, L"$glyphs") && szImageFileName != 0) { // the glyph item MUST have a valid image
tmpItem.Create(szImageFileName);
if (tmpItem.getHbm()) {
m_glyphItem = tmpItem;
@@ -1312,9 +1312,9 @@ void CSkin::ReadImageItem(const TCHAR *itemname)
// handle the assignments of image items to skin items
for (int n = 0;; n++) {
- mir_sntprintf(szItemNr, _T("Item%d"), n);
- GetPrivateProfileString(itemname, szItemNr, _T("None"), buffer, 500, m_tszFileName);
- if (!mir_tstrcmp(buffer, _T("None")))
+ mir_sntprintf(szItemNr, L"Item%d", n);
+ GetPrivateProfileString(itemname, szItemNr, L"None", buffer, 500, m_tszFileName);
+ if (!mir_tstrcmp(buffer, L"None"))
break;
for (int i = 0; i <= ID_EXTBK_LAST; i++) {
if (!mir_tstrcmpi(SkinItems[i].szName[0] == '{' ? &SkinItems[i].szName[3] : SkinItems[i].szName, buffer)) {
@@ -1372,7 +1372,7 @@ void CSkin::Load(void)
UINT data;
TCHAR buffer[500];
- if (!(GetPrivateProfileInt(_T("Global"), _T("Version"), 0, m_tszFileName) >= 1 && GetPrivateProfileInt(_T("Global"), _T("Signature"), 0, m_tszFileName) == 101))
+ if (!(GetPrivateProfileInt(L"Global", L"Version", 0, m_tszFileName) >= 1 && GetPrivateProfileInt(L"Global", L"Signature", 0, m_tszFileName) == 101))
return;
i = 0;
@@ -1391,7 +1391,7 @@ void CSkin::Load(void)
db_set_w(NULL, SRMSGMOD_T, _tagSettings[i].szSetting, (WORD)data);
break;
case 5:
- GetPrivateProfileString(_tagSettings[i].szIniKey, _tagSettings[i].szIniName, _T("000000"),
+ GetPrivateProfileString(_tagSettings[i].szIniKey, _tagSettings[i].szIniName, L"000000",
buffer, 10, m_tszFileName);
db_set_dw(0, SRMSGMOD_T, _tagSettings[i].szSetting, HexStringToLong(buffer));
break;
@@ -1426,84 +1426,84 @@ void CSkin::Load(void)
M.getAeroState(); // refresh aero state (set to false when a skin is successfully loaded and active)
}
- GetPrivateProfileString(_T("Avatars"), _T("BorderColor"), _T("000000"), buffer, 20, m_tszFileName);
+ GetPrivateProfileString(L"Avatars", L"BorderColor", L"000000", buffer, 20, m_tszFileName);
m_avatarBorderClr = (COLORREF)HexStringToLong(buffer);
- GetPrivateProfileString(_T("Global"), _T("SideBarBG"), _T("None"), buffer, 20, m_tszFileName);
- if (mir_tstrcmp(buffer, _T("None")))
+ GetPrivateProfileString(L"Global", L"SideBarBG", L"None", buffer, 20, m_tszFileName);
+ if (mir_tstrcmp(buffer, L"None"))
m_sideBarContainerBG = (COLORREF)HexStringToLong(buffer);
else
m_sideBarContainerBG = SkinItems[ID_EXTBKSIDEBARBG].COLOR;
- m_bAvatarBorderType = GetPrivateProfileInt(_T("Avatars"), _T("BorderType"), 1, m_tszFileName);
+ m_bAvatarBorderType = GetPrivateProfileInt(L"Avatars", L"BorderType", 1, m_tszFileName);
- LoadIcon(_T("Global"), _T("CloseGlyph"), CSkin::m_closeIcon);
- LoadIcon(_T("Global"), _T("MaximizeGlyph"), CSkin::m_maxIcon);
- LoadIcon(_T("Global"), _T("MinimizeGlyph"), CSkin::m_minIcon);
+ LoadIcon(L"Global", L"CloseGlyph", CSkin::m_closeIcon);
+ LoadIcon(L"Global", L"MaximizeGlyph", CSkin::m_maxIcon);
+ LoadIcon(L"Global", L"MinimizeGlyph", CSkin::m_minIcon);
- m_frameSkins = GetPrivateProfileInt(_T("Global"), _T("framelessmode"), 0, m_tszFileName) ? true : false;
- m_DisableScrollbars = GetPrivateProfileInt(_T("Global"), _T("NoScrollbars"), 0, m_tszFileName) ? true : false;
+ m_frameSkins = GetPrivateProfileInt(L"Global", L"framelessmode", 0, m_tszFileName) ? true : false;
+ m_DisableScrollbars = GetPrivateProfileInt(L"Global", L"NoScrollbars", 0, m_tszFileName) ? true : false;
- m_SkinnedFrame_left = GetPrivateProfileInt(_T("WindowFrame"), _T("left"), 4, m_tszFileName);
- m_SkinnedFrame_right = GetPrivateProfileInt(_T("WindowFrame"), _T("right"), 4, m_tszFileName);
- m_SkinnedFrame_caption = GetPrivateProfileInt(_T("WindowFrame"), _T("Caption"), 24, m_tszFileName);
- m_SkinnedFrame_bottom = GetPrivateProfileInt(_T("WindowFrame"), _T("bottom"), 4, m_tszFileName);
+ m_SkinnedFrame_left = GetPrivateProfileInt(L"WindowFrame", L"left", 4, m_tszFileName);
+ m_SkinnedFrame_right = GetPrivateProfileInt(L"WindowFrame", L"right", 4, m_tszFileName);
+ m_SkinnedFrame_caption = GetPrivateProfileInt(L"WindowFrame", L"Caption", 24, m_tszFileName);
+ m_SkinnedFrame_bottom = GetPrivateProfileInt(L"WindowFrame", L"bottom", 4, m_tszFileName);
- m_titleBarButtonSize.cx = GetPrivateProfileInt(_T("WindowFrame"), _T("TitleButtonWidth"), 24, m_tszFileName);
- m_titleBarButtonSize.cy = GetPrivateProfileInt(_T("WindowFrame"), _T("TitleButtonHeight"), 12, m_tszFileName);
- m_titleButtonTopOff = GetPrivateProfileInt(_T("WindowFrame"), _T("TitleButtonTopOffset"), 0, m_tszFileName);
+ m_titleBarButtonSize.cx = GetPrivateProfileInt(L"WindowFrame", L"TitleButtonWidth", 24, m_tszFileName);
+ m_titleBarButtonSize.cy = GetPrivateProfileInt(L"WindowFrame", L"TitleButtonHeight", 12, m_tszFileName);
+ m_titleButtonTopOff = GetPrivateProfileInt(L"WindowFrame", L"TitleButtonTopOffset", 0, m_tszFileName);
- m_titleBarRightOff = GetPrivateProfileInt(_T("WindowFrame"), _T("TitleBarRightOffset"), 0, m_tszFileName);
- m_titleBarLeftOff = GetPrivateProfileInt(_T("WindowFrame"), _T("TitleBarLeftOffset"), 0, m_tszFileName);
+ m_titleBarRightOff = GetPrivateProfileInt(L"WindowFrame", L"TitleBarRightOffset", 0, m_tszFileName);
+ m_titleBarLeftOff = GetPrivateProfileInt(L"WindowFrame", L"TitleBarLeftOffset", 0, m_tszFileName);
- m_captionOffset = GetPrivateProfileInt(_T("WindowFrame"), _T("CaptionOffset"), 3, m_tszFileName);
- m_captionPadding = GetPrivateProfileInt(_T("WindowFrame"), _T("CaptionPadding"), 0, m_tszFileName);
- m_sidebarTopOffset = GetPrivateProfileInt(_T("ClientArea"), _T("SidebarTop"), -1, m_tszFileName);
- m_sidebarBottomOffset = GetPrivateProfileInt(_T("ClientArea"), _T("SidebarBottom"), -1, m_tszFileName);
+ m_captionOffset = GetPrivateProfileInt(L"WindowFrame", L"CaptionOffset", 3, m_tszFileName);
+ m_captionPadding = GetPrivateProfileInt(L"WindowFrame", L"CaptionPadding", 0, m_tszFileName);
+ m_sidebarTopOffset = GetPrivateProfileInt(L"ClientArea", L"SidebarTop", -1, m_tszFileName);
+ m_sidebarBottomOffset = GetPrivateProfileInt(L"ClientArea", L"SidebarBottom", -1, m_tszFileName);
- m_bClipBorder = GetPrivateProfileInt(_T("WindowFrame"), _T("ClipFrame"), 0, m_tszFileName) ? true : false;
+ m_bClipBorder = GetPrivateProfileInt(L"WindowFrame", L"ClipFrame", 0, m_tszFileName) ? true : false;
BYTE radius_tl, radius_tr, radius_bl, radius_br;
TCHAR szFinalName[MAX_PATH];
TCHAR szDrive[MAX_PATH], szPath[MAX_PATH];
- radius_tl = GetPrivateProfileInt(_T("WindowFrame"), _T("RadiusTL"), 0, m_tszFileName);
- radius_tr = GetPrivateProfileInt(_T("WindowFrame"), _T("RadiusTR"), 0, m_tszFileName);
- radius_bl = GetPrivateProfileInt(_T("WindowFrame"), _T("RadiusBL"), 0, m_tszFileName);
- radius_br = GetPrivateProfileInt(_T("WindowFrame"), _T("RadiusBR"), 0, m_tszFileName);
+ radius_tl = GetPrivateProfileInt(L"WindowFrame", L"RadiusTL", 0, m_tszFileName);
+ radius_tr = GetPrivateProfileInt(L"WindowFrame", L"RadiusTR", 0, m_tszFileName);
+ radius_bl = GetPrivateProfileInt(L"WindowFrame", L"RadiusBL", 0, m_tszFileName);
+ radius_br = GetPrivateProfileInt(L"WindowFrame", L"RadiusBR", 0, m_tszFileName);
CSkin::m_bRoundedCorner = radius_tl;
- GetPrivateProfileString(_T("Theme"), _T("File"), _T("None"), buffer, MAX_PATH, m_tszFileName);
+ GetPrivateProfileString(L"Theme", L"File", L"None", buffer, MAX_PATH, m_tszFileName);
_tsplitpath(m_tszFileName, szDrive, szPath, NULL, NULL);
- mir_sntprintf(szFinalName, _T("%s\\%s\\%s"), szDrive, szPath, buffer);
+ mir_sntprintf(szFinalName, L"%s\\%s\\%s", szDrive, szPath, buffer);
if (PathFileExists(szFinalName)) {
ReadThemeFromINI(szFinalName, 0, FALSE, m_fLoadOnStartup ? 0 : M.GetByte("skin_loadmode", 0));
CacheLogFonts();
CacheMsgLogIcons();
}
- GetPrivateProfileString(_T("Global"), _T("MenuBarBG"), _T("None"), buffer, 20, m_tszFileName);
+ GetPrivateProfileString(L"Global", L"MenuBarBG", L"None", buffer, 20, m_tszFileName);
data = HexStringToLong(buffer);
if (m_MenuBGBrush) {
DeleteObject(m_MenuBGBrush);
m_MenuBGBrush = 0;
}
- if (mir_tstrcmp(buffer, _T("None")))
+ if (mir_tstrcmp(buffer, L"None"))
m_MenuBGBrush = CreateSolidBrush(data);
- GetPrivateProfileString(_T("Global"), _T("LightShadow"), _T("000000"), buffer, 20, m_tszFileName);
+ GetPrivateProfileString(L"Global", L"LightShadow", L"000000", buffer, 20, m_tszFileName);
data = HexStringToLong(buffer);
CSkin::m_SkinLightShadowPen = CreatePen(PS_SOLID, 1, RGB(GetRValue(data), GetGValue(data), GetBValue(data)));
- GetPrivateProfileString(_T("Global"), _T("DarkShadow"), _T("000000"), buffer, 20, m_tszFileName);
+ GetPrivateProfileString(L"Global", L"DarkShadow", L"000000", buffer, 20, m_tszFileName);
data = HexStringToLong(buffer);
CSkin::m_SkinDarkShadowPen = CreatePen(PS_SOLID, 1, RGB(GetRValue(data), GetGValue(data), GetBValue(data)));
SkinCalcFrameWidth();
- GetPrivateProfileString(_T("Global"), _T("FontColor"), _T("None"), buffer, 20, m_tszFileName);
- if (mir_tstrcmp(buffer, _T("None")))
+ GetPrivateProfileString(L"Global", L"FontColor", L"None", buffer, 20, m_tszFileName);
+ if (mir_tstrcmp(buffer, L"None"))
CSkin::m_DefaultFontColor = HexStringToLong(buffer);
else
CSkin::m_DefaultFontColor = GetSysColor(COLOR_BTNTEXT);
@@ -1535,7 +1535,7 @@ void CSkin::LoadItems()
szSections = (TCHAR*)mir_alloc((SECT_BUFFER_SIZE + 2) * sizeof(TCHAR));
memset(szSections, 0, ((SECT_BUFFER_SIZE + 2) * sizeof(TCHAR)));
- GetPrivateProfileSection(_T("Icons"), szSections, SECT_BUFFER_SIZE, m_tszFileName);
+ GetPrivateProfileSection(L"Icons", szSections, SECT_BUFFER_SIZE, m_tszFileName);
szSections[SECT_BUFFER_SIZE] = 0;
p = szSections;
@@ -1544,7 +1544,7 @@ void CSkin::LoadItems()
if (p1)
*p1 = 0;
if (m_nrSkinIcons < NR_MAXSKINICONS && p1) {
- LoadIcon(_T("Icons"), p, *(HICON*)&tmpIconDesc.uId);
+ LoadIcon(L"Icons", p, *(HICON*)&tmpIconDesc.uId);
if (tmpIconDesc.uId) {
memset(&m_skinIcons[m_nrSkinIcons], 0, sizeof(TIconDesc));
m_skinIcons[m_nrSkinIcons].uId = tmpIconDesc.uId;
@@ -1574,10 +1574,10 @@ void CSkin::LoadItems()
p = szSections;
mir_free(szSections);
- g_ButtonSet.top = GetPrivateProfileInt(_T("ButtonArea"), _T("top"), 0, m_tszFileName);
- g_ButtonSet.bottom = GetPrivateProfileInt(_T("ButtonArea"), _T("bottom"), 0, m_tszFileName);
- g_ButtonSet.left = GetPrivateProfileInt(_T("ButtonArea"), _T("left"), 0, m_tszFileName);
- g_ButtonSet.right = GetPrivateProfileInt(_T("ButtonArea"), _T("right"), 0, m_tszFileName);
+ g_ButtonSet.top = GetPrivateProfileInt(L"ButtonArea", L"top", 0, m_tszFileName);
+ g_ButtonSet.bottom = GetPrivateProfileInt(L"ButtonArea", L"bottom", 0, m_tszFileName);
+ g_ButtonSet.left = GetPrivateProfileInt(L"ButtonArea", L"left", 0, m_tszFileName);
+ g_ButtonSet.right = GetPrivateProfileInt(L"ButtonArea", L"right", 0, m_tszFileName);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1669,13 +1669,13 @@ void CSkin::setupAeroSkins()
TCHAR tszFilename[MAX_PATH], tszBasePath[MAX_PATH];
_tcsncpy_s(tszBasePath, M.getDataPath(), _TRUNCATE);
if (tszBasePath[mir_tstrlen(tszBasePath) - 1] != '\\')
- mir_tstrcat(tszBasePath, _T("\\"));
+ mir_tstrcat(tszBasePath, L"\\");
// load unknown avatar..
if (0 == PluginConfig.g_hbmUnknown) {
- mir_sntprintf(tszFilename, _T("%scustom_unknown.png"), tszBasePath);
+ mir_sntprintf(tszFilename, L"%scustom_unknown.png", tszBasePath);
if (!PathFileExists(tszFilename))
- mir_sntprintf(tszFilename, _T("%sunknown.png"), tszBasePath);
+ mir_sntprintf(tszFilename, L"%sunknown.png", tszBasePath);
PluginConfig.g_hbmUnknown = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR);
if (PluginConfig.g_hbmUnknown == 0) {
HDC dc = GetDC(0);
@@ -1684,9 +1684,9 @@ void CSkin::setupAeroSkins()
}
}
- mir_sntprintf(tszFilename, _T("%scustom_tabskin_aero.png"), tszBasePath);
+ mir_sntprintf(tszFilename, L"%scustom_tabskin_aero.png", tszBasePath);
if (!PathFileExists(tszFilename))
- mir_sntprintf(tszFilename, _T("%stabskin_aero.png"), tszBasePath);
+ mir_sntprintf(tszFilename, L"%stabskin_aero.png", tszBasePath);
BOOL isOpaque = false;
if (CMimAPI::m_pfnDwmGetColorizationColor && M.isAero())
@@ -1771,9 +1771,9 @@ void CSkin::setupAeroSkins()
m_tabBottom->setMetrics(bm.bmWidth, bm.bmHeight);
- mir_sntprintf(tszFilename, _T("%scustom_tabskin_aero_glow.png"), tszBasePath);
+ mir_sntprintf(tszFilename, L"%scustom_tabskin_aero_glow.png", tszBasePath);
if (!PathFileExists(tszFilename))
- mir_sntprintf(tszFilename, _T("%stabskin_aero_glow.png"), tszBasePath);
+ mir_sntprintf(tszFilename, L"%stabskin_aero_glow.png", tszBasePath);
fib = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR | IMGL_RETURNDIB);
@@ -1804,9 +1804,9 @@ void CSkin::setupAeroSkins()
m_tabGlowBottom->setMetrics(bm.bmWidth, bm.bmHeight);
// background item for the button switch bar
- mir_sntprintf(tszFilename, _T("%scustom_tabskin_aero_button.png"), tszBasePath);
+ mir_sntprintf(tszFilename, L"%scustom_tabskin_aero_button.png", tszBasePath);
if (!PathFileExists(tszFilename))
- mir_sntprintf(tszFilename, _T("%stabskin_aero_button.png"), tszBasePath);
+ mir_sntprintf(tszFilename, L"%stabskin_aero_button.png", tszBasePath);
hbm = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR);
@@ -2440,14 +2440,14 @@ void CSkin::extractSkinsAndLogo(bool fForceOverwrite) const
TCHAR tszBasePath[MAX_PATH];
_tcsncpy_s(tszBasePath, M.getDataPath(), _TRUNCATE);
if (tszBasePath[mir_tstrlen(tszBasePath) - 1] != '\\')
- mir_tstrcat(tszBasePath, _T("\\"));
+ mir_tstrcat(tszBasePath, L"\\");
CreateDirectoryTreeT(tszBasePath);
m_fAeroSkinsValid = true;
for (int i = 0; i < _countof(my_default_skin); i++)
- if (!Utils::extractResource(g_hInst, my_default_skin[i].ulID, _T("SKIN_GLYPH"), tszBasePath, my_default_skin[i].tszName, fForceOverwrite))
+ if (!Utils::extractResource(g_hInst, my_default_skin[i].ulID, L"SKIN_GLYPH", tszBasePath, my_default_skin[i].tszName, fForceOverwrite))
m_fAeroSkinsValid = false;
}
diff --git a/plugins/TabSRMM/src/trayicon.cpp b/plugins/TabSRMM/src/trayicon.cpp
index caf9715dee..d27a5446ca 100644
--- a/plugins/TabSRMM/src/trayicon.cpp
+++ b/plugins/TabSRMM/src/trayicon.cpp
@@ -92,7 +92,7 @@ static void TrayAnimThread(LPVOID)
void TSAPI CreateTrayMenus(int mode)
{
if (mode) {
- mir_sntprintf(g_eventName, _T("tsr_evt_%d"), GetCurrentThreadId());
+ mir_sntprintf(g_eventName, L"tsr_evt_%d", GetCurrentThreadId());
g_hEvent = CreateEvent(NULL, FALSE, FALSE, g_eventName);
isAnimThreadRunning = TRUE;
hTrayAnimThread = mir_forkthread(TrayAnimThread, NULL);
@@ -142,7 +142,7 @@ void TSAPI CreateSystrayIcon(int create)
nim.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
nim.hIcon = PluginConfig.g_iconContainer;
nim.uCallbackMessage = DM_TRAYICONNOTIFY;
- _tcsncpy_s(nim.szTip, _T("tabSRMM"), _TRUNCATE);
+ _tcsncpy_s(nim.szTip, L"tabSRMM", _TRUNCATE);
if (create && !nen_options.bTrayExist) {
Shell_NotifyIcon(NIM_ADD, &nim);
nen_options.bTrayExist = TRUE;
@@ -217,7 +217,7 @@ void TSAPI AddContactToFavorites(MCONTACT hContact, const TCHAR *szNickname, con
if (acc && acc->tszAccountName) {
MENUITEMINFO mii = { 0 };
mii.cbSize = sizeof(mii);
- mir_sntprintf(szMenuEntry, _T("%s: %s (%s)"), acc->tszAccountName, szFinalNick, szStatus);
+ mir_sntprintf(szMenuEntry, L"%s: %s (%s)", acc->tszAccountName, szFinalNick, szStatus);
if (mode) {
if (hMenu == PluginConfig.g_hMenuRecent) {
if (CheckMenuItem(hMenu, (UINT_PTR)hContact, MF_BYCOMMAND | MF_UNCHECKED) == 0) {
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index 44f123e657..674872b380 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -38,15 +38,15 @@ typedef std::basic_string<TCHAR> tstring;
static TRTFColorTable _rtf_ctable[] =
{
- { _T("red"), RGB(255, 0, 0), ID_FONT_RED },
- { _T("blue"), RGB(0, 0, 255), ID_FONT_BLUE },
- { _T("green"), RGB(0, 255, 0), ID_FONT_GREEN },
- { _T("magenta"), RGB(255, 0, 255), ID_FONT_MAGENTA },
- { _T("yellow"), RGB(255, 255, 0), ID_FONT_YELLOW },
- { _T("cyan"), RGB(0, 255, 255), ID_FONT_CYAN },
- { _T("black"), 0, ID_FONT_BLACK },
- { _T("white"), RGB(255, 255, 255), ID_FONT_WHITE },
- { _T(""), 0, 0 }
+ { L"red", RGB(255, 0, 0), ID_FONT_RED },
+ { L"blue", RGB(0, 0, 255), ID_FONT_BLUE },
+ { L"green", RGB(0, 255, 0), ID_FONT_GREEN },
+ { L"magenta", RGB(255, 0, 255), ID_FONT_MAGENTA },
+ { L"yellow", RGB(255, 255, 0), ID_FONT_YELLOW },
+ { L"cyan", RGB(0, 255, 255), ID_FONT_CYAN },
+ { L"black", 0, ID_FONT_BLACK },
+ { L"white", RGB(255, 255, 255), ID_FONT_WHITE },
+ { L"", 0, 0 }
};
int Utils::rtf_ctable_size = 0;
@@ -54,11 +54,11 @@ TRTFColorTable* Utils::rtf_ctable = 0;
MWindowList CWarning::hWindowList = 0;
-static TCHAR *w_bbcodes_begin[] = { _T("[b]"), _T("[i]"), _T("[u]"), _T("[s]"), _T("[color=") };
-static TCHAR *w_bbcodes_end[] = { _T("[/b]"), _T("[/i]"), _T("[/u]"), _T("[/s]"), _T("[/color]") };
+static TCHAR *w_bbcodes_begin[] = { L"[b]", L"[i]", L"[u]", L"[s]", L"[color=" };
+static TCHAR *w_bbcodes_end[] = { L"[/b]", L"[/i]", L"[/u]", L"[/s]", L"[/color]" };
-static TCHAR *formatting_strings_begin[] = { _T("b1 "), _T("i1 "), _T("u1 "), _T("s1 "), _T("c1 ") };
-static TCHAR *formatting_strings_end[] = { _T("b0 "), _T("i0 "), _T("u0 "), _T("s0 "), _T("c0 ") };
+static TCHAR *formatting_strings_begin[] = { L"b1 ", L"i1 ", L"u1 ", L"s1 ", L"c1 " };
+static TCHAR *formatting_strings_end[] = { L"b0 ", L"i0 ", L"u0 ", L"s0 ", L"c0 " };
#define NR_CODES 5
@@ -91,7 +91,7 @@ const TCHAR* Utils::FormatRaw(TWindowData *dat, const TCHAR *msg, int flags, BOO
endindex = i;
endmark = message.find(w_bbcodes_end[i], beginmark);
if (endindex == 4) { // color
- size_t closing = message.find_first_of(_T("]"), beginmark);
+ size_t closing = message.find_first_of(L"]", beginmark);
was_added = false;
if (closing == message.npos) { // must be an invalid [color=] tag w/o closing bracket
@@ -107,19 +107,19 @@ search_again:
closing = beginmark + 7 + mir_tstrlen(rtf_ctable[ii].szName);
if (endmark != message.npos) {
message.erase(endmark, 4);
- message.replace(endmark, 4, _T("c0 "));
+ message.replace(endmark, 4, L"c0 ");
}
message.erase(beginmark, (closing - beginmark));
TCHAR szTemp[5];
- message.insert(beginmark, _T("cxxx "));
- mir_sntprintf(szTemp, _T("%02d"), MSGDLGFONTCOUNT + 13 + ii);
+ message.insert(beginmark, L"cxxx ");
+ mir_sntprintf(szTemp, L"%02d", MSGDLGFONTCOUNT + 13 + ii);
message[beginmark + 3] = szTemp[0];
message[beginmark + 4] = szTemp[1];
clr_found = true;
if (was_added) {
TCHAR wszTemp[100];
- mir_sntprintf(wszTemp, _T("##col##%06u:%04u"), endmark - closing, ii);
+ mir_sntprintf(wszTemp, L"##col##%06u:%04u", endmark - closing, ii);
wszTemp[99] = 0;
message.insert(beginmark, wszTemp);
}
@@ -127,7 +127,7 @@ search_again:
}
}
if (!clr_found) {
- size_t c_closing = colorname.find_first_of(_T("]"), 0);
+ size_t c_closing = colorname.find_first_of(L"]", 0);
if (c_closing == colorname.npos)
c_closing = colorname.length();
const TCHAR *wszColname = colorname.c_str();
@@ -153,17 +153,17 @@ invalid_code:
}
if (endmark != message.npos)
message.replace(endmark, 4, formatting_strings_end[i]);
- message.insert(beginmark, _T(" "));
+ message.insert(beginmark, L" ");
message.replace(beginmark, 4, formatting_strings_begin[i]);
}
}
- if (!(dwFlags & MWF_LOG_TEXTFORMAT) || message.find(_T("://")) != message.npos) {
+ if (!(dwFlags & MWF_LOG_TEXTFORMAT) || message.find(L"://") != message.npos) {
dat->clr_added = clr_was_added ? TRUE : FALSE;
return(message.c_str());
}
- while ((beginmark = message.find_first_of(_T("*/_"), beginmark)) != message.npos) {
+ while ((beginmark = message.find_first_of(L"*/_", beginmark)) != message.npos) {
endmarker = message[beginmark];
if (LOWORD(flags)) {
if (beginmark > 0 && !_istspace(message[beginmark - 1]) && !_istpunct(message[beginmark - 1])) {
@@ -174,7 +174,7 @@ invalid_code:
// search a corresponding endmarker which fulfills the criteria
INT_PTR mark = beginmark + 1;
while ((endmark = message.find(endmarker, mark)) != message.npos) {
- if (_istpunct(message[endmark + 1]) || _istspace(message[endmark + 1]) || message[endmark + 1] == 0 || _tcschr(_T("*/_"), message[endmark + 1]) != NULL)
+ if (_istpunct(message[endmark + 1]) || _istspace(message[endmark + 1]) || message[endmark + 1] == 0 || _tcschr(L"*/_", message[endmark + 1]) != NULL)
goto ok;
mark = endmark + 1;
}
@@ -221,9 +221,9 @@ ok:
continue;
}
}
- message.insert(endmark, _T("%%%"));
+ message.insert(endmark, L"%%%");
message.replace(endmark, 4, formatting_strings_end[index]);
- message.insert(beginmark, _T("%%%"));
+ message.insert(beginmark, L"%%%");
message.replace(beginmark, 4, formatting_strings_begin[index]);
}
dat->clr_added = clr_was_added ? TRUE : FALSE;
@@ -271,7 +271,7 @@ bool Utils::FormatTitleBar(const TWindowData *dat, const TCHAR *szFormat, CMStri
break;
case 'c':
- dest.Append(!mir_tstrcmp(dat->pContainer->szName, _T("default")) ? TranslateT("Default container") : dat->pContainer->szName);
+ dest.Append(!mir_tstrcmp(dat->pContainer->szName, L"default") ? TranslateT("Default container") : dat->pContainer->szName);
break;
case 'o':
@@ -299,7 +299,7 @@ bool Utils::FormatTitleBar(const TWindowData *dat, const TCHAR *szFormat, CMStri
ptrT szXStatus(db_get_tsa(dat->hContact, dat->szProto, "XStatusName"));
dest.Append((szXStatus != NULL) ? Trunc500(szXStatus) : xStatusDescr[xStatus - 1]);
}
- else dest.Append(dat->szStatus && dat->szStatus[0] ? dat->szStatus : _T("(undef)"));
+ else dest.Append(dat->szStatus && dat->szStatus[0] ? dat->szStatus : L"(undef)");
}
break;
@@ -364,7 +364,7 @@ WCHAR* Utils::FilterEventMarkers(WCHAR *wszText)
void Utils::DoubleAmpersands(TCHAR *pszText, size_t len)
{
CMString text(pszText);
- text.Replace(_T("&"), _T("&&"));
+ text.Replace(L"&", L"&&");
mir_tstrncpy(pszText, text.c_str(), len);
}
@@ -399,7 +399,7 @@ TCHAR* Utils::GetPreviewWithEllipsis(TCHAR *szText, size_t iMaxLen)
uRequired = (p - szText) + 6;
}
TCHAR *szResult = reinterpret_cast<TCHAR *>(mir_alloc((uRequired + 1) * sizeof(TCHAR)));
- mir_sntprintf(szResult, (uRequired + 1), fEllipsis ? _T("%s...") : _T("%s"), szText);
+ mir_sntprintf(szResult, (uRequired + 1), fEllipsis ? L"%s..." : L"%s", szText);
if (p)
*p = cSaved;
@@ -457,7 +457,7 @@ void Utils::RTF_ColorAdd(const TCHAR *tszColname, size_t length)
rtf_ctable_size++;
rtf_ctable = (TRTFColorTable *)mir_realloc(rtf_ctable, sizeof(TRTFColorTable) * rtf_ctable_size);
COLORREF clr = _tcstol(tszColname, &stopped, 16);
- mir_sntprintf(rtf_ctable[rtf_ctable_size - 1].szName, length + 1, _T("%06x"), clr);
+ mir_sntprintf(rtf_ctable[rtf_ctable_size - 1].szName, length + 1, L"%06x", clr);
rtf_ctable[rtf_ctable_size - 1].menuid = 0;
clr = _tcstol(tszColname, &stopped, 16);
@@ -800,7 +800,7 @@ bool Utils::extractResource(const HMODULE h, const UINT uID, const TCHAR *tszNam
DWORD dwSize = SizeofResource(g_hInst, hRes), written = 0;
TCHAR szFilename[MAX_PATH];
- mir_sntprintf(szFilename, _T("%s%s"), tszPath, tszFilename);
+ mir_sntprintf(szFilename, L"%s%s", tszPath, tszFilename);
if (!fForceOverwrite)
if (PathFileExists(szFilename))
return true;
@@ -834,7 +834,7 @@ TCHAR* Utils::extractURLFromRichEdit(const ENLINK* _e, const HWND hwndRich)
tr.lpstrText = (TCHAR*)mir_alloc(sizeof(TCHAR) * (tr.chrg.cpMax - tr.chrg.cpMin + 8));
::SendMessage(hwndRich, EM_GETTEXTRANGE, 0, (LPARAM)&tr);
if (_tcschr(tr.lpstrText, '@') != NULL && _tcschr(tr.lpstrText, ':') == NULL && _tcschr(tr.lpstrText, '/') == NULL) {
- mir_tstrncpy(tr.lpstrText, _T("mailto:"), 7);
+ mir_tstrncpy(tr.lpstrText, L"mailto:", 7);
mir_tstrncpy(tr.lpstrText + 7, tr.lpstrText, tr.chrg.cpMax - tr.chrg.cpMin + 1);
}
return tr.lpstrText;
@@ -960,14 +960,14 @@ void Utils::AddToFileList(TCHAR ***pppFiles, int *totalCount, LPCTSTR szFilename
WIN32_FIND_DATA fd;
TCHAR szPath[MAX_PATH];
mir_tstrcpy(szPath, szFilename);
- mir_tstrcat(szPath, _T("\\*"));
+ mir_tstrcat(szPath, L"\\*");
HANDLE hFind = FindFirstFile(szPath, &fd);
if (hFind != INVALID_HANDLE_VALUE) {
do {
- if (!mir_tstrcmp(fd.cFileName, _T(".")) || !mir_tstrcmp(fd.cFileName, _T("..")))
+ if (!mir_tstrcmp(fd.cFileName, L".") || !mir_tstrcmp(fd.cFileName, L".."))
continue;
mir_tstrcpy(szPath, szFilename);
- mir_tstrcat(szPath, _T("\\"));
+ mir_tstrcat(szPath, L"\\");
mir_tstrcat(szPath, fd.cFileName);
AddToFileList(pppFiles, totalCount, szPath);
} while (FindNextFile(hFind, &fd));
diff --git a/plugins/TabSRMM/src/utils.h b/plugins/TabSRMM/src/utils.h
index a4f27a61f7..a5bed3cef5 100644
--- a/plugins/TabSRMM/src/utils.h
+++ b/plugins/TabSRMM/src/utils.h
@@ -31,7 +31,7 @@
#define RTF_CTABLE_DEFSIZE 8
-#define RTF_DEFAULT_HEADER _T("{\\rtf1\\ansi\\deff0\\pard\\li%u\\fi-%u\\ri%u\\tx%u")
+#define RTF_DEFAULT_HEADER L"{\\rtf1\\ansi\\deff0\\pard\\li%u\\fi-%u\\ri%u\\tx%u"
#define CNT_KEYNAME "CNTW_Def"
#define CNT_BASEKEYNAME "CNTW_"