From 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Jul 2016 09:20:25 +0000 Subject: 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 --- plugins/mTextControl/src/fancy_rtf.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins/mTextControl/src/fancy_rtf.cpp') diff --git a/plugins/mTextControl/src/fancy_rtf.cpp b/plugins/mTextControl/src/fancy_rtf.cpp index a210632700..17f5f76dba 100644 --- a/plugins/mTextControl/src/fancy_rtf.cpp +++ b/plugins/mTextControl/src/fancy_rtf.cpp @@ -2,9 +2,9 @@ struct BBCodeInfo { - TCHAR *start; - TCHAR *end; - bool(*func)(IFormattedTextDraw *ftd, CHARRANGE range, TCHAR *txt, DWORD cookie); + wchar_t *start; + wchar_t *end; + bool(*func)(IFormattedTextDraw *ftd, CHARRANGE range, wchar_t *txt, DWORD cookie); DWORD cookie; }; @@ -14,7 +14,7 @@ enum { BBS_IMG1, BBS_IMG2 }; -static bool bbCodeSimpleFunc(IFormattedTextDraw *ftd, CHARRANGE range, TCHAR *, DWORD cookie) +static bool bbCodeSimpleFunc(IFormattedTextDraw *ftd, CHARRANGE range, wchar_t *, DWORD cookie) { CHARFORMAT cf = { 0 }; cf.cbSize = sizeof(cf); @@ -60,7 +60,7 @@ static bool bbCodeSimpleFunc(IFormattedTextDraw *ftd, CHARRANGE range, TCHAR *, return true; } -static bool bbCodeImageFunc(IFormattedTextDraw *ftd, CHARRANGE range, TCHAR *txt, DWORD) +static bool bbCodeImageFunc(IFormattedTextDraw *ftd, CHARRANGE range, wchar_t *txt, DWORD) { ITextServices *ts = ftd->getTextService(); ITextDocument *td = ftd->getTextDocument(); @@ -73,9 +73,9 @@ static bool bbCodeImageFunc(IFormattedTextDraw *ftd, CHARRANGE range, TCHAR *txt td->Freeze(&cnt); #ifdef _WIN64 - bool res = InsertBitmap(RichEditOle, CacheIconToEmf((HICON)_tstoi64(txt))); + bool res = InsertBitmap(RichEditOle, CacheIconToEmf((HICON)_wtoi64(txt))); #else - bool res = InsertBitmap(RichEditOle, CacheIconToEmf((HICON)_ttoi(txt))); + bool res = InsertBitmap(RichEditOle, CacheIconToEmf((HICON)_wtoi(txt))); #endif td->Unfreeze(&cnt); @@ -115,7 +115,7 @@ void bbCodeParse(IFormattedTextDraw *ftd) for (bool found = true; found;) { found = false; CHARRANGE fRange; fRange.cpMin = -1; - TCHAR *fText = 0; + wchar_t *fText = 0; BBCodeInfo *fBBCode = NULL; for (int i = 0; i < bbCodeCount; i++) { @@ -154,7 +154,7 @@ void bbCodeParse(IFormattedTextDraw *ftd) TEXTRANGE trg; trg.chrg.cpMin = fte.chrg.cpMin; trg.chrg.cpMax = fte.chrgText.cpMin; - trg.lpstrText = new TCHAR[trg.chrg.cpMax - trg.chrg.cpMin + 1]; + trg.lpstrText = new wchar_t[trg.chrg.cpMax - trg.chrg.cpMin + 1]; ts->TxSendMessage(EM_GETTEXTRANGE, 0, (LPARAM)&trg, &lResult); fText = trg.lpstrText; } -- cgit v1.2.3