summaryrefslogtreecommitdiff
path: root/plugins/HistoryLinkListPlus
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/HistoryLinkListPlus')
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist.cpp2
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist_dlg.cpp22
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist_fct.cpp125
-rw-r--r--plugins/HistoryLinkListPlus/src/stdafx.h6
4 files changed, 77 insertions, 78 deletions
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp
index 2d4ea92498..0ad6c2cda1 100644
--- a/plugins/HistoryLinkListPlus/src/linklist.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist.cpp
@@ -64,7 +64,7 @@ extern "C" __declspec(dllexport) int Load(void)
SET_UID(mi, 0x2964dc6c, 0x9cf9, 0x4f20, 0x8f, 0x8a, 0xc6, 0xfe, 0xe2, 0x65, 0xac, 0xc9);
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LINKLISTICON));
- mi.name.t = LPGENT("&Create Linklist");
+ mi.name.w = LPGENW("&Create Linklist");
mi.pszService = "Linklist/MenuCommand";
Menu_AddContactMenuItem(&mi);
diff --git a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp
index 9946d3f060..812a828b6b 100644
--- a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp
@@ -35,8 +35,8 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
switch (msg) {
case WM_INITDIALOG: {
MCONTACT hContact;
- TCHAR title[256];
- TCHAR filter[FILTERTEXT];
+ wchar_t title[256];
+ wchar_t filter[FILTERTEXT];
RECT rc;
POINT pt;
@@ -118,12 +118,12 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
WriteMessage(hDlg, DlgParam->listStart, SendDlgItemMessage(hDlg, IDC_MAIN, EM_LINEFROMCHAR, -1, 0));
break;
case WM_LBUTTONUP:
- link = (LPTSTR)mir_alloc((pENLink->chrg.cpMax - pENLink->chrg.cpMin + 2) * sizeof(TCHAR));
+ link = (LPTSTR)mir_alloc((pENLink->chrg.cpMax - pENLink->chrg.cpMin + 2) * sizeof(wchar_t));
if (link == NULL)
break;
SendDlgItemMessage(hDlg, IDC_MAIN, EM_EXSETSEL, 0, (LPARAM)&pENLink->chrg);
SendDlgItemMessage(hDlg, IDC_MAIN, EM_GETSELTEXT, 0, (LPARAM)link);
- if (_tcsstr(link, L"mailto:") != NULL)
+ if (wcsstr(link, L"mailto:") != NULL)
ShellExecute(HWND_TOP, NULL, link, NULL, NULL, SW_SHOWNORMAL);
else {
bool openNewWindow = db_get_b(NULL, LINKLIST_MODULE, LINKLIST_OPEN_WINDOW, 0xFF) != 0xFF;
@@ -142,7 +142,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
if (mouseEvent == 0x01)
EnableMenuItem(hSubMenu, IDM_SHOWMESSAGE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
TranslateMenu(hSubMenu);
- link = (LPTSTR)mir_alloc((pENLink->chrg.cpMax - pENLink->chrg.cpMin + 4) * sizeof(TCHAR));
+ link = (LPTSTR)mir_alloc((pENLink->chrg.cpMax - pENLink->chrg.cpMin + 4) * sizeof(wchar_t));
if (link == NULL)
break;
SendDlgItemMessage(hDlg, IDC_MAIN, EM_EXSETSEL, 0, (LPARAM)&pENLink->chrg);
@@ -154,13 +154,13 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
switch (TrackPopupMenu(hSubMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hDlg, NULL)) {
case IDM_LINK_OPEN:
- if (_tcsstr(link, L"mailto:") != NULL)
+ if (wcsstr(link, L"mailto:") != NULL)
ShellExecute(HWND_TOP, NULL, link, NULL, NULL, SW_SHOWNORMAL);
else
Utils_OpenUrlT(link,false);
break;
case IDM_LINK_OPENNEW:
- if (_tcsstr(link, L"mailto:") != NULL)
+ if (wcsstr(link, L"mailto:") != NULL)
ShellExecute(HWND_TOP, NULL, link, NULL, NULL, SW_SHOWNORMAL);
else
Utils_OpenUrlT(link);
@@ -170,7 +170,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
break;
EmptyClipboard();
- size_t dataLen = ((mir_tstrlen(link) + 1) * sizeof(TCHAR));
+ size_t dataLen = ((mir_tstrlen(link) + 1) * sizeof(wchar_t));
HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, dataLen);
memcpy((LPTSTR)GlobalLock(hData), link, dataLen);
GlobalUnlock(hData);
@@ -187,7 +187,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
}
} break;
case WM_COMMAND: {
- TCHAR filter[40];
+ wchar_t filter[40];
listMenu = GetMenu(hDlg);
switch (wParam) {
@@ -373,7 +373,7 @@ INT_PTR CALLBACK SearchDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara
} break;
case IDSEARCH: {
BYTE flags = 0x00;
- TCHAR filter[FILTERTEXT];
+ wchar_t filter[FILTERTEXT];
LPTSTR buffer;
int length;
@@ -393,7 +393,7 @@ INT_PTR CALLBACK SearchDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara
flags |= SLL_DEEP;
length = GetWindowTextLength(GetDlgItem(hDlg, IDC_SEARCHSTRING)) + 1;
- buffer = (LPTSTR)mir_alloc((length + 1) * sizeof(TCHAR));
+ buffer = (LPTSTR)mir_alloc((length + 1) * sizeof(wchar_t));
if (buffer) {
GetDlgItemText(hDlg, IDC_SEARCHSTRING, buffer, length);
WriteLinkList(hListDlg, flags, DlgParam->listStart, buffer, 0);
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
index 558a931e05..7517494115 100644
--- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
@@ -45,11 +45,11 @@ int ExtractURI(DBEVENTINFO *dbei, MEVENT hEvent, LISTELEMENT *listStart)
LISTELEMENT *newElement, *actualElement;
BYTE type = LINK_UNKNOWN;
int direction, isLink, linkFound = 0;
- TCHAR date[DATE_SIZE + 1];
- TCHAR time[TIME_SIZE + 1];
- TCHAR link[LINK_MAX + 1];
- TCHAR templink[LINK_MAX + 1];
- TCHAR dbdate[DATE_SIZE + TIME_SIZE];
+ wchar_t date[DATE_SIZE + 1];
+ wchar_t time[TIME_SIZE + 1];
+ wchar_t link[LINK_MAX + 1];
+ wchar_t templink[LINK_MAX + 1];
+ wchar_t dbdate[DATE_SIZE + TIME_SIZE];
if (listStart == NULL)
return -1;
@@ -66,26 +66,26 @@ int ExtractURI(DBEVENTINFO *dbei, MEVENT hEvent, LISTELEMENT *listStart)
//hyperlinks are delimited by: <non-alphanumeric>"hyperlink"<whitespace>
//then all punctuation is stripped from the end of "hyperlink"
iLastAlphaNum = 0;
- while (msg[i] && !_istalnum(msg[i])) {
+ while (msg[i] && !iswalnum(msg[i])) {
// support for files
- if (msg[i] == _T('\\') && msg[i + 1] == _T('\\') && _istalnum(msg[i + 2]))
+ if (msg[i] == '\\' && msg[i + 1] == '\\' && iswalnum(msg[i + 2]))
break;
if(IsDBCSLeadByte(msg[i]) && msg[i + 1])
i ++;
i ++;
- if (msg[i] != _T('\n'))
+ if (msg[i] != '\n')
charCount ++;
}
- if (msg[i] == _T('\0'))
+ if (msg[i] == '\0')
break;
cpWordStart = charCount;
wordStart = i;
- while (msg[i] && !_istspace(msg[i])) {
+ while (msg[i] && !iswspace(msg[i])) {
if (IsDBCSLeadByte(msg[i]) && msg[i + 1]) {
i ++;
} else {
- if (_istalnum(msg[i]) || msg[i]==_T('/')) {
+ if (iswalnum(msg[i]) || msg[i]=='/') {
cpLastAlphaNum = charCount;
iLastAlphaNum = i;
}
@@ -102,8 +102,8 @@ int ExtractURI(DBEVENTINFO *dbei, MEVENT hEvent, LISTELEMENT *listStart)
isLink = 0;
wordlen = (i - wordStart + 1);
- word = (LPTSTR)mir_alloc(wordlen * sizeof(TCHAR));
- wordsearch = (LPTSTR)mir_alloc(wordlen * sizeof(TCHAR));
+ word = (LPTSTR)mir_alloc(wordlen * sizeof(wchar_t));
+ wordsearch = (LPTSTR)mir_alloc(wordlen * sizeof(wchar_t));
if (word == NULL || wordsearch == NULL) {
mir_free(word);
mir_free(wordsearch);
@@ -111,26 +111,26 @@ int ExtractURI(DBEVENTINFO *dbei, MEVENT hEvent, LISTELEMENT *listStart)
break;
}
- _tcsncpy_s(word, wordlen, msg + wordStart, (wordlen - 1));
- _tcsncpy_s(wordsearch, wordlen, msg + wordStart, (wordlen - 1));
+ wcsncpy_s(word, wordlen, msg + wordStart, (wordlen - 1));
+ wcsncpy_s(wordsearch, wordlen, msg + wordStart, (wordlen - 1));
CharLower(wordsearch);
for (j = 0; j < _countof(hyperlinkPrefixes); j ++) {
- if (!_tcsncmp(wordsearch, hyperlinkPrefixes[j], mir_tstrlen(hyperlinkPrefixes[j]))) {
+ if (!wcsncmp(wordsearch, hyperlinkPrefixes[j], mir_tstrlen(hyperlinkPrefixes[j]))) {
isLink = 1;
break;
}
}
if (!isLink) {
for (j = 0; j < _countof(hyperlinkSubstrings); j ++) {
- if (_tcsstr(wordsearch + 1,hyperlinkSubstrings[j])) {
+ if (wcsstr(wordsearch + 1,hyperlinkSubstrings[j])) {
isLink = 1;
break;
}
}
}
- if (_tcschr(wordsearch,_T('@')) && _tcschr(wordsearch,_T('.')) && !_tcschr(wordsearch,_T(':')) && !_tcschr(wordsearch,_T('/'))) {
+ if (wcschr(wordsearch,'@') && wcschr(wordsearch,'.') && !wcschr(wordsearch,':') && !wcschr(wordsearch,'/')) {
isLink = 1; //e-mail addresses
type = LINK_MAIL;
} else if (isLink) {
@@ -138,29 +138,28 @@ int ExtractURI(DBEVENTINFO *dbei, MEVENT hEvent, LISTELEMENT *listStart)
}
if (isLink && wordlen <= LINK_MAX) {
- if (_tcsstr(wordsearch, L"www.") != NULL && _tcsstr(wordsearch, L"http://") == NULL && _tcsstr(wordsearch, L"https://") == NULL) {
- _tcsncpy_s(link, L"http://", LINK_MAX);
- _tcsncat_s(link, word, LINK_MAX);
+ if (wcsstr(wordsearch, L"www.") != NULL && wcsstr(wordsearch, L"http://") == NULL && wcsstr(wordsearch, L"https://") == NULL) {
+ wcsncpy_s(link, L"http://", LINK_MAX);
+ wcsncat_s(link, word, LINK_MAX);
} else {
- _tcsncpy_s(link, word, LINK_MAX);
+ wcsncpy_s(link, word, LINK_MAX);
}
TimeZone_ToStringT(dbei->timestamp, L"d-t", dbdate, _countof(dbdate));
- date_ptr = _tcstok_s(dbdate, L"-", &tok_ctx);
- time_ptr = _tcstok_s(NULL, L"-", &tok_ctx);
- _tcsncpy_s(date, date_ptr, _TRUNCATE);
- _tcsncpy_s(time, time_ptr, _TRUNCATE);
+ date_ptr = wcstok_s(dbdate, L"-", &tok_ctx);
+ time_ptr = wcstok_s(NULL, L"-", &tok_ctx);
+ wcsncpy_s(date, date_ptr, _TRUNCATE);
+ wcsncpy_s(time, time_ptr, _TRUNCATE);
- if (dbei->flags & DBEF_SENT) {
+ if (dbei->flags & DBEF_SENT)
direction = DIRECTION_OUT;
- } else {
+ else
direction = DIRECTION_IN;
- }
- if (type == LINK_MAIL && _tcsstr(link, L"mailto:") == NULL) {
- _tcsncpy_s(templink, link, _TRUNCATE);
- _tcsncpy_s(link, L"mailto:", _TRUNCATE);
- _tcsncpy_s((link + _mstrlen(L"mailto:")), (_countof(link) - _mstrlen(L"mailto:")), templink, _TRUNCATE);
+ if (type == LINK_MAIL && wcsstr(link, L"mailto:") == NULL) {
+ wcsncpy_s(templink, link, _TRUNCATE);
+ wcsncpy_s(link, L"mailto:", _TRUNCATE);
+ wcsncpy_s((link + _mstrlen(L"mailto:")), (_countof(link) - _mstrlen(L"mailto:")), templink, _TRUNCATE);
}
// Add new Element to list:
@@ -172,9 +171,9 @@ int ExtractURI(DBEVENTINFO *dbei, MEVENT hEvent, LISTELEMENT *listStart)
memset(newElement, 0, sizeof(LISTELEMENT));
newElement->direction = direction;
newElement->type = type;
- _tcsncpy_s(newElement->date, date, _TRUNCATE);
- _tcsncpy_s(newElement->time, time, _TRUNCATE);
- _tcsncpy_s(newElement->link, link, _TRUNCATE);
+ wcsncpy_s(newElement->date, date, _TRUNCATE);
+ wcsncpy_s(newElement->time, time, _TRUNCATE);
+ wcsncpy_s(newElement->link, link, _TRUNCATE);
newElement->hEvent = hEvent;
actualElement = listStart;
@@ -249,10 +248,10 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
HWND hwndProgress = NULL;
RECT DesktopRect;
MYCOLOURSET colourSet;
- TCHAR textLine[LINK_MAX + DIR_SIZE + TIME_SIZE + TYPE_SIZE + 6];
- TCHAR searchText[320];
- TCHAR lastDate[11] = {0};
- TCHAR filter1, filter2, filter3;
+ wchar_t textLine[LINK_MAX + DIR_SIZE + TIME_SIZE + TYPE_SIZE + 6];
+ wchar_t searchText[320];
+ wchar_t lastDate[11] = {0};
+ wchar_t filter1, filter2, filter3;
size_t lineLen, listCount=0, realListCount=0, actCount=0, len, appCount = 0;
int linePos = -1;
LISTELEMENT *actualElement;
@@ -303,7 +302,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_FACE | CFM_COLOR;
cf.dwEffects = CFE_BOLD;
cf.crTextColor = colourSet.text;
- _tcscpy_s(cf.szFaceName, L"Arial");
+ wcscpy_s(cf.szFaceName, L"Arial");
SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
mir_sntprintf(searchText, L"%s '%s': %d\n\n", TranslateT("Matches for searchtext"), searchString, listCount);
@@ -314,7 +313,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
memset(&cf, 0, sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_FACE | CFM_BOLD;
- _tcscpy_s(cf.szFaceName, L"Courier");
+ wcscpy_s(cf.szFaceName, L"Courier");
SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
}
@@ -325,13 +324,13 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
linePos = GetLastLinePos(listStart);
if ((realListCount - append) == 1)
- _tcscpy_s(lastDate, actualElement->date);
+ wcscpy_s(lastDate, actualElement->date);
for(appCount = 1; appCount <= (realListCount - append); appCount++)
{
actualElement = actualElement->nextElement;
if(appCount == (realListCount - append - 1))
- _tcscpy_s(lastDate, actualElement->date);
+ wcscpy_s(lastDate, actualElement->date);
}
gtl.flags = GTL_PRECISE;
gtl.codepage = CP_ACP;
@@ -385,7 +384,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
db_event_get(actualElement->hEvent, &dbe);
dbe.pBlob[dbe.cbBlob] = 0;
LPTSTR msg = DbGetEventTextT(&dbe, CP_ACP);
- if ( _tcsstr(msg, searchString))
+ if ( wcsstr(msg, searchString))
filter3 = 1;
mir_free(dbe.pBlob);
@@ -393,7 +392,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
}
else filter3 = 0;
}
- else if ( _tcsstr(actualElement->link, searchString))
+ else if ( wcsstr(actualElement->link, searchString))
filter3 = 1;
}
else filter3 = 1;
@@ -415,7 +414,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_FACE;
cf.dwEffects = CFE_BOLD;
- _tcscpy_s(cf.szFaceName, L"Arial");
+ wcscpy_s(cf.szFaceName, L"Arial");
SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
if ( options.showDate != 0 )
{
@@ -423,11 +422,11 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM) L"\n\n");
linePos += 3;
}
- _tcscpy_s(lastDate, actualElement->date);
+ wcscpy_s(lastDate, actualElement->date);
memset(&cf, 0, sizeof(cf));
cf.cbSize = sizeof cf;
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_UNDERLINE | CFM_FACE;
- _tcscpy_s(cf.szFaceName, L"Courier");
+ wcscpy_s(cf.szFaceName, L"Courier");
SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
}
memset(&cf, 0, sizeof(cf));
@@ -485,7 +484,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_FACE;
cf.dwEffects = CFE_BOLD;
- _tcscpy_s(cf.szFaceName, L"Arial");
+ wcscpy_s(cf.szFaceName, L"Arial");
SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)TranslateT("No messages found!\nPlease change current filter options."));
SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)L"\n");
@@ -525,7 +524,7 @@ int WriteOptionExample(HWND hDlg, DWORD InColourSel, DWORD OutColourSel, DWORD B
memset(&cf, 0, sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_FACE | CFM_BOLD | CFM_ITALIC | CFM_COLOR;
- _tcscpy_s(cf.szFaceName, L"Courier");
+ wcscpy_s(cf.szFaceName, L"Courier");
cf.crTextColor = TxtColourSel;
SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
if ( options->showLine == 1 )
@@ -537,7 +536,7 @@ int WriteOptionExample(HWND hDlg, DWORD InColourSel, DWORD OutColourSel, DWORD B
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_BOLD | CFM_FACE | CFM_COLOR;
cf.dwEffects = CFE_BOLD;
- _tcscpy_s(cf.szFaceName, L"Arial");
+ wcscpy_s(cf.szFaceName, L"Arial");
cf.crTextColor = TxtColourSel;
SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
@@ -549,7 +548,7 @@ int WriteOptionExample(HWND hDlg, DWORD InColourSel, DWORD OutColourSel, DWORD B
memset(&cf, 0, sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_UNDERLINE | CFM_FACE;
- _tcscpy_s(cf.szFaceName, L"Courier");
+ wcscpy_s(cf.szFaceName, L"Courier");
SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
// incoming
@@ -557,7 +556,7 @@ int WriteOptionExample(HWND hDlg, DWORD InColourSel, DWORD OutColourSel, DWORD B
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_COLOR | CFM_FACE;
cf.crTextColor = InColourSel;
- _tcscpy_s(cf.szFaceName, L"Courier");
+ wcscpy_s(cf.szFaceName, L"Courier");
SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf );
if ( options->showDirection == 1 )
@@ -580,7 +579,7 @@ int WriteOptionExample(HWND hDlg, DWORD InColourSel, DWORD OutColourSel, DWORD B
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_COLOR | CFM_FACE;
cf.crTextColor = OutColourSel;
- _tcscpy_s(cf.szFaceName, L"Courier");
+ wcscpy_s(cf.szFaceName, L"Courier");
SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
@@ -718,13 +717,13 @@ Little helper function to draw a horizontal line
*/
void DrawLine(HWND hDlg, size_t lineLen)
{
- TCHAR line[LINK_MAX + 18];
+ wchar_t line[LINK_MAX + 18];
size_t i;
for (i=0; (i<lineLen+18)&&(i<LINK_MAX+18); i++ )
{
- line[i] = _T('_');
+ line[i] = '_';
}
- line[lineLen+18] = _T('\0');
+ line[lineLen+18] = '\0';
SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)line);
SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)L"\n");
return;
@@ -775,7 +774,7 @@ void GetListInfo(BYTE params, LISTELEMENT *listStart, LPCTSTR searchString, siz
dbe.pBlob = (PBYTE)mir_alloc(dbe.cbBlob+1);
db_event_get(actualElement->hEvent, &dbe);
dbe.pBlob[dbe.cbBlob] = 0;
- if ( _tcsstr((LPTSTR)dbe.pBlob, searchString))
+ if ( wcsstr((LPTSTR)dbe.pBlob, searchString))
filter3 = 1;
mir_free(dbe.pBlob);
@@ -785,7 +784,7 @@ void GetListInfo(BYTE params, LISTELEMENT *listStart, LPCTSTR searchString, siz
}
else
{
- if(_tcsstr(actualElement->link, searchString))
+ if(wcsstr(actualElement->link, searchString))
filter3 = 1;
}
}
@@ -1238,15 +1237,15 @@ BOOL SaveEditAsStream( HWND hDlg )
LONG lOut;
OPENFILENAME ofn;
HANDLE hFile;
- TCHAR szFilename[MAX_PATH];
+ wchar_t szFilename[MAX_PATH];
// Initialize filename field
- _tcscpy_s(szFilename, L"*.rtf");
+ wcscpy_s(szFilename, L"*.rtf");
// Fill in OPENFILENAME struct
memset(&ofn, 0, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hDlg;
- TCHAR temp[MAX_PATH];
+ wchar_t temp[MAX_PATH];
mir_sntprintf(temp, L"%s (*.rtf)%c*.rtf%c%s (*.*)%c*.*%c%c", TranslateT("RTF file"), 0, 0, TranslateT("All files"), 0, 0, 0);
ofn.lpstrFilter = temp;
ofn.lpstrFile = szFilename;
diff --git a/plugins/HistoryLinkListPlus/src/stdafx.h b/plugins/HistoryLinkListPlus/src/stdafx.h
index 37859b91b2..e0ff6adecd 100644
--- a/plugins/HistoryLinkListPlus/src/stdafx.h
+++ b/plugins/HistoryLinkListPlus/src/stdafx.h
@@ -76,9 +76,9 @@
struct LISTELEMENT {
BYTE direction;
BYTE type;
- TCHAR date[DATE_SIZE];
- TCHAR time[TIME_SIZE];
- TCHAR link[LINK_MAX];
+ wchar_t date[DATE_SIZE];
+ wchar_t time[TIME_SIZE];
+ wchar_t link[LINK_MAX];
MEVENT hEvent;
int linePos;
struct LISTELEMENT *nextElement;