diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
commit | 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch) | |
tree | 2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/TabSRMM/src/modplus.cpp | |
parent | a61c8728b379057fe7f0a0d86fe0b037598229dd (diff) |
less TCHARs:
- TCHAR is replaced with wchar_t everywhere;
- LPGENT replaced with either LPGENW or LPGEN;
- fixes for ANSI plugins that improperly used _t functions;
- TCHAR *t removed from MAllStrings;
- ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz*
git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/modplus.cpp')
-rw-r--r-- | plugins/TabSRMM/src/modplus.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/TabSRMM/src/modplus.cpp b/plugins/TabSRMM/src/modplus.cpp index 907f802484..1fc829c606 100644 --- a/plugins/TabSRMM/src/modplus.cpp +++ b/plugins/TabSRMM/src/modplus.cpp @@ -40,7 +40,7 @@ #include "stdafx.h"
-static TCHAR* getMenuEntry(int i)
+static wchar_t* getMenuEntry(int i)
{
char MEntry[256];
mir_snprintf(MEntry, "MenuEntry_%u", i);
@@ -59,7 +59,7 @@ static int RegisterCustomButton(WPARAM, LPARAM) bbd.dwDefPos = 200;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[3];
bbd.pszModuleName = "Tabmodplus";
- bbd.ptszTooltip = LPGENT("Insert [img] tag / surround selected text with [img][/img]");
+ bbd.ptszTooltip = LPGENW("Insert [img] tag / surround selected text with [img][/img]");
return CallService(MS_BB_ADDBUTTON, 0, (LPARAM)&bbd);
}
@@ -74,14 +74,14 @@ static int CustomButtonPressed(WPARAM wParam, LPARAM lParam) bbd.pszModuleName = "Tabmodplus";
CallService(MS_BB_GETBUTTONSTATE, wParam, (LPARAM)&bbd);
- TCHAR *pszText = L"";
+ wchar_t *pszText = L"";
CHARRANGE cr;
cr.cpMin = cr.cpMax = 0;
SendDlgItemMessage(cbcd->hwndFrom, IDC_MESSAGE, EM_EXGETSEL, 0, (LPARAM)&cr);
UINT textlenght = cr.cpMax - cr.cpMin;
if (textlenght) {
- pszText = (TCHAR*)mir_alloc((textlenght + 1)*sizeof(TCHAR));
- memset(pszText, 0, ((textlenght + 1) * sizeof(TCHAR)));
+ pszText = (wchar_t*)mir_alloc((textlenght + 1)*sizeof(wchar_t));
+ memset(pszText, 0, ((textlenght + 1) * sizeof(wchar_t)));
SendDlgItemMessage(cbcd->hwndFrom, IDC_MESSAGE, EM_GETSELTEXT, 0, (LPARAM)pszText);
}
@@ -95,7 +95,7 @@ static int CustomButtonPressed(WPARAM wParam, LPARAM lParam) else
state = 4;
- TCHAR *pszFormatedText = NULL, *pszMenu[256] = { 0 };
+ wchar_t *pszFormatedText = NULL, *pszMenu[256] = { 0 };
size_t bufSize;
@@ -118,7 +118,7 @@ static int CustomButtonPressed(WPARAM wParam, LPARAM lParam) break;
bufSize = textlenght + mir_tstrlen(pszMenu[res - 1]) + 2;
- pszFormatedText = (TCHAR*)_alloca(bufSize*sizeof(TCHAR));
+ pszFormatedText = (wchar_t*)_alloca(bufSize*sizeof(wchar_t));
mir_sntprintf(pszFormatedText, bufSize, pszMenu[res - 1], pszText);
}
break;
@@ -127,7 +127,7 @@ static int CustomButtonPressed(WPARAM wParam, LPARAM lParam) SendDlgItemMessage(cbcd->hwndFrom, IDC_MESSAGE, EM_GETSELTEXT, 0, (LPARAM)pszText);
bufSize = textlenght + 12;
- pszFormatedText = (TCHAR*)_alloca(bufSize*sizeof(TCHAR));
+ pszFormatedText = (wchar_t*)_alloca(bufSize*sizeof(wchar_t));
mir_sntprintf(pszFormatedText, bufSize, L"[img]%s[/img]", pszText);
bbd.ptszTooltip = 0;
@@ -139,14 +139,14 @@ static int CustomButtonPressed(WPARAM wParam, LPARAM lParam) case 3:
pszFormatedText = L"[img]";
- bbd.ptszTooltip = LPGENT("Insert [img] tag / surround selected text with [img][/img]");
+ bbd.ptszTooltip = LPGENW("Insert [img] tag / surround selected text with [img][/img]");
CallService(MS_BB_SETBUTTONSTATE, wParam, (LPARAM)&bbd);
break;
case 4:
pszFormatedText = L"[/img]";
- bbd.ptszTooltip = LPGENT("Insert [img] tag / surround selected text with [img][/img]");
+ bbd.ptszTooltip = LPGENW("Insert [img] tag / surround selected text with [img][/img]");
CallService(MS_BB_SETBUTTONSTATE, wParam, (LPARAM)&bbd);
break;
}
|