summaryrefslogtreecommitdiff
path: root/plugins/SendScreenshotPlus/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
commit8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch)
tree94ef8927e12043ed6dcc15e1e640d68a8add520e /plugins/SendScreenshotPlus/src
parent1e273e28d89b5838e3d0f0cafac9676577cb71ce (diff)
hello, Unix.
phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SendScreenshotPlus/src')
-rw-r--r--plugins/SendScreenshotPlus/src/CSend.cpp24
-rw-r--r--plugins/SendScreenshotPlus/src/CSendDropbox.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendEmail.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp10
-rw-r--r--plugins/SendScreenshotPlus/src/UAboutForm.cpp8
-rw-r--r--plugins/SendScreenshotPlus/src/UMainForm.cpp68
-rw-r--r--plugins/SendScreenshotPlus/src/Utils.cpp4
-rw-r--r--plugins/SendScreenshotPlus/src/dlg_msgbox.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/stdafx.h4
11 files changed, 64 insertions, 64 deletions
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp
index 01daca3cd9..eb4b9dcc61 100644
--- a/plugins/SendScreenshotPlus/src/CSend.cpp
+++ b/plugins/SendScreenshotPlus/src/CSend.cpp
@@ -166,16 +166,16 @@ INT_PTR CALLBACK CSend::ResultDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
size_t len;
if (bbc) {
if (bbc == 1) {
- memcpy(tmp, _T("[img]"), 5 * sizeof(TCHAR)); len = 5;
+ memcpy(tmp, L"[img]", 5 * sizeof(TCHAR)); len = 5;
len += GetDlgItemText(hwndDlg, edtID, tmp + len, 2048 - 11);
- memcpy(tmp + len, _T("[/img]"), 7 * sizeof(TCHAR)); len += 7;
+ memcpy(tmp + len, L"[/img]", 7 * sizeof(TCHAR)); len += 7;
}
else {
- memcpy(tmp, _T("[url="), 5 * sizeof(TCHAR)); len = 5;
+ memcpy(tmp, L"[url=", 5 * sizeof(TCHAR)); len = 5;
len += GetDlgItemText(hwndDlg, ID_edtURL, tmp + len, 1024);
- memcpy(tmp + len, _T("][img]"), 6 * sizeof(TCHAR)); len += 6;
+ memcpy(tmp + len, L"][img]", 6 * sizeof(TCHAR)); len += 6;
len += GetDlgItemText(hwndDlg, edtID, tmp + len, 1024);
- memcpy(tmp + len, _T("[/img][/url]"), 13 * sizeof(TCHAR)); len += 12;
+ memcpy(tmp + len, L"[/img][/url]", 13 * sizeof(TCHAR)); len += 12;
}
}
else
@@ -217,7 +217,7 @@ void CSend::svcSendMsgExit(const char* szMessage)
if (m_ChatRoom) {
TCHAR* tmp = mir_a2t(szMessage);
if (m_pszFileDesc) {
- mir_tstradd(tmp, _T("\r\n"));
+ mir_tstradd(tmp, L"\r\n");
mir_tstradd(tmp, m_pszFileDesc);
}
GC_INFO gci = { 0 };
@@ -399,7 +399,7 @@ void CSend::Error(LPCTSTR pszFormat, ...)
{
TCHAR tszMsg[MAX_SECONDLINE];
- mir_sntprintf(tszMsg, _T("%s - %s"), _T(SZ_SENDSS), TranslateT("Error"));
+ mir_sntprintf(tszMsg, L"%s - %s", _T(SZ_SENDSS), TranslateT("Error"));
mir_free(m_ErrorTitle), m_ErrorTitle = mir_tstrdup(tszMsg);
va_list vl;
@@ -436,18 +436,18 @@ void CSend::Exit(unsigned int Result)
break;
case ACKRESULT_DENIED:
SkinPlaySound("FileDenied");
- Error(_T("%s (%i):\nFile transfer denied."), TranslateTS(m_pszSendTyp), Result);
+ Error(L"%s (%i):\nFile transfer denied.", TranslateTS(m_pszSendTyp), Result);
MsgBoxService(NULL, (LPARAM)&m_box);
err = false;
break;
case GC_RESULT_WRONGVER: //.You appear to be using the wrong version of GC API.
- Error(_T("%s (%i):\nYou appear to be using the wrong version of GC API"), TranslateT("GCHAT error"), Result);
+ Error(L"%s (%i):\nYou appear to be using the wrong version of GC API", TranslateT("GCHAT error"), Result);
break;
case GC_RESULT_ERROR: // An internal GC error occurred.
- Error(_T("%s (%i):\nAn internal GC error occurred."), TranslateT("GCHAT error"), Result);
+ Error(L"%s (%i):\nAn internal GC error occurred.", TranslateT("GCHAT error"), Result);
break;
case GC_RESULT_NOSESSION: // contact has no open GC session
- Error(_T("%s (%i):\nContact has no open GC session."), TranslateT("GCHAT error"), Result);
+ Error(L"%s (%i):\nContact has no open GC session.", TranslateT("GCHAT error"), Result);
break;
case ACKRESULT_FAILED:
default:
@@ -754,7 +754,7 @@ int CSend::HTTPFormCreate(NETLIBHTTPREQUEST* nlhr, int requestType, char* url, H
}
if (!fp) {
HTTPFormDestroy(nlhr);
- Error(_T("Error occurred when opening local file.\nAborting file upload..."));
+ Error(L"Error occurred when opening local file.\nAborting file upload...");
Exit(ACKRESULT_FAILED);
return 1;
}
diff --git a/plugins/SendScreenshotPlus/src/CSendDropbox.cpp b/plugins/SendScreenshotPlus/src/CSendDropbox.cpp
index 2bcebe5287..62203d6ccd 100644
--- a/plugins/SendScreenshotPlus/src/CSendDropbox.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendDropbox.cpp
@@ -56,7 +56,7 @@ void CSendDropbox::SendThread()
{
/// @todo : SS_DLG_DESCRIPTION and SS_DLG_DELETEAFTERSSEND are of no use as of now since we don't track upload progress
- DropboxUploadInfo ui = { m_pszFile, _T("SendSS") };
+ DropboxUploadInfo ui = { m_pszFile, L"SendSS" };
if (CallService(MS_DROPBOX_UPLOAD, (WPARAM)&m_URL, (LPARAM)&ui))
{
diff --git a/plugins/SendScreenshotPlus/src/CSendEmail.cpp b/plugins/SendScreenshotPlus/src/CSendEmail.cpp
index c674e13186..99fa9304ea 100644
--- a/plugins/SendScreenshotPlus/src/CSendEmail.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendEmail.cpp
@@ -86,7 +86,7 @@ void CSendEmail::SendThread()
MapiMessage Msg;
MAPIFUNC lpMAPISendMail;
- HINSTANCE hMAPILib = ::LoadLibrary(_T("MAPI32.DLL"));
+ HINSTANCE hMAPILib = ::LoadLibrary(L"MAPI32.DLL");
if (hMAPILib == NULL) {
//return -1;
Error(SS_ERR_INIT, m_pszSendTyp);
diff --git a/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp b/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp
index 3294909b10..cb5abc8e20 100644
--- a/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp
@@ -106,7 +106,7 @@ void CSendHost_ImageShack::SendThread()
mir_free(err);
err = mir_a2t(reply->pData);
}
- Error(_T("%s"), err);
+ Error(L"%s", err);
mir_free(err);
}
}
diff --git a/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp b/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp
index e1c44a831a..6d210953b0 100644
--- a/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp
@@ -95,7 +95,7 @@ void CSendHost_UploadPie::SendThread(void* obj)
TCHAR* werr;
if (err) werr = mir_a2t(err);
else werr = mir_a2t(reply->pData);
- self->Error(_T("%s"), werr);
+ self->Error(L"%s", werr);
mir_free(werr);
}
}
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp
index 62ee37e261..fa4d8277e4 100644
--- a/plugins/SendScreenshotPlus/src/Main.cpp
+++ b/plugins/SendScreenshotPlus/src/Main.cpp
@@ -70,7 +70,7 @@ IconItem ICONS_BTN[ICO_BTN_END_] =
static HANDLE m_hFolderScreenshot = 0;
TCHAR* GetCustomPath()
{
- TCHAR* pszPath = Utils_ReplaceVarsT(_T("%miranda_userdata%\\Screenshots"));
+ TCHAR* pszPath = Utils_ReplaceVarsT(L"%miranda_userdata%\\Screenshots");
if (m_hFolderScreenshot) {
TCHAR szPath[1024] = { 0 };
FoldersGetCustomPathT(m_hFolderScreenshot, szPath, 1024, pszPath);
@@ -78,14 +78,14 @@ TCHAR* GetCustomPath()
pszPath = mir_tstrdup(szPath);
}
if (!pszPath) {
- MessageBox(NULL, _T("Can not retrieve screenshot path."), _T("SendSS"), MB_OK | MB_ICONERROR | MB_APPLMODAL);
+ MessageBox(NULL, L"Can not retrieve screenshot path.", L"SendSS", MB_OK | MB_ICONERROR | MB_APPLMODAL);
return 0;
}
int result = CreateDirectoryTreeT(pszPath);
if (result) {
TCHAR szError[MAX_PATH];
mir_sntprintf(szError, MAX_PATH, TranslateT("Could not create screenshot folder (error code: %d):\n%s\nDo you have write permissions?"), result, pszPath);
- MessageBox(NULL, szError, _T("SendSS"), MB_OK | MB_ICONERROR | MB_APPLMODAL);
+ MessageBox(NULL, szError, L"SendSS", MB_OK | MB_ICONERROR | MB_APPLMODAL);
mir_free(pszPath);
return 0;
}
@@ -240,7 +240,7 @@ int hook_ModulesLoaded(WPARAM, LPARAM)
CtrlButtonLoadModule();
// Folders plugin support
m_hFolderScreenshot = FoldersRegisterCustomPathT(LPGEN("SendSS"), LPGEN("Screenshots"),
- _T(PROFILE_PATH)_T("\\")_T(CURRENT_PROFILE)_T("\\Screenshots"));
+ PROFILE_PATHW L"\\" CURRENT_PROFILEW L"\\Screenshots");
return 0;
}
int hook_SystemPreShutdown(WPARAM, LPARAM)
@@ -310,7 +310,7 @@ DLL_EXPORT int Load(void)
HOTKEYDESC hkd = { sizeof(hkd) };
hkd.pszName = "Open SendSS+";
hkd.ptszDescription = LPGENT("Open SendSS+");
- hkd.ptszSection = _T("SendSS+");
+ hkd.ptszSection = L"SendSS+";
hkd.pszService = MS_SENDSS_OPENDIALOG;
//hkd.DefHotKey=HOTKEYCODE(HOTKEYF_CONTROL, VK_F10) | HKF_MIRANDA_LOCAL;
hkd.lParam = 0xFFFF;
diff --git a/plugins/SendScreenshotPlus/src/UAboutForm.cpp b/plugins/SendScreenshotPlus/src/UAboutForm.cpp
index f11938d868..6d7e0a57a6 100644
--- a/plugins/SendScreenshotPlus/src/UAboutForm.cpp
+++ b/plugins/SendScreenshotPlus/src/UAboutForm.cpp
@@ -95,9 +95,9 @@ LRESULT TfrmAbout::wmInitdialog(WPARAM, LPARAM)
{
TCHAR* pszText = NULL;
mir_tstradd(pszText, _T(__COPYRIGHT));
- mir_tstradd(pszText, _T("\r\n\r\n"));
+ mir_tstradd(pszText, L"\r\n\r\n");
- HRSRC hRes = FindResource(g_hSendSS, MAKEINTRESOURCE(IDR_LICENSE), _T("TEXT"));
+ HRSRC hRes = FindResource(g_hSendSS, MAKEINTRESOURCE(IDR_LICENSE), L"TEXT");
DWORD size = SizeofResource(g_hSendSS, hRes);
char* data = (char*)mir_alloc(size + 1);
memcpy(data, LockResource(LoadResource(g_hSendSS, hRes)), size);
@@ -112,7 +112,7 @@ LRESULT TfrmAbout::wmInitdialog(WPARAM, LPARAM)
//Credit
{
- HRSRC hRes = FindResource(g_hSendSS, MAKEINTRESOURCE(IDR_CREDIT), _T("TEXT"));
+ HRSRC hRes = FindResource(g_hSendSS, MAKEINTRESOURCE(IDR_CREDIT), L"TEXT");
DWORD size = SizeofResource(g_hSendSS, hRes);
char* data = (char*)mir_alloc(size + 1);
memcpy(data, LockResource(LoadResource(g_hSendSS, hRes)), size);
@@ -205,7 +205,7 @@ void TfrmAbout::btnPageClick()
TCHAR newTitle[128];
TCHAR* pszPlug = mir_a2t(__PLUGIN_NAME);
TCHAR* pszVer = mir_a2t(__VERSION_STRING_DOTS);
- mir_sntprintf(newTitle, _T("%s - %s\nv%s"), pszPlug, title, pszVer);
+ mir_sntprintf(newTitle, L"%s - %s\nv%s", pszPlug, title, pszVer);
mir_free(pszPlug);
mir_free(pszVer);
SetDlgItemText(m_hWnd, IDC_HEADERBAR, newTitle);
diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp
index 2832444bef..92e894894c 100644
--- a/plugins/SendScreenshotPlus/src/UMainForm.cpp
+++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp
@@ -75,7 +75,7 @@ INT_PTR CALLBACK TfrmMain::DlgProc_CaptureTabPage(HWND hDlg, UINT uMsg, WPARAM w
GetDlgItemText(hDlg, ID_edtSize, filename, _countof(filename));
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = hDlg;
- ofn.lpstrFilter = _T("Images\0*.png;*.jpg;*.jpeg;*.bmp;*.gif;*.tif;*.tiff\0");
+ ofn.lpstrFilter = L"Images\0*.png;*.jpg;*.jpeg;*.bmp;*.gif;*.tif;*.tiff\0";
ofn.nFilterIndex = 1;
ofn.lpstrFile = filename;
ofn.nMaxFile = MAX_PATH;
@@ -240,9 +240,9 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM)
if (m_MonitorCount > 1) {
TCHAR tszTemp[120];
for (size_t mon = 0; mon < m_MonitorCount; ++mon) { /// @todo : fix format for non MSVC compilers
- mir_sntprintf(tszTemp, _T("%Iu. %s%s"),
+ mir_sntprintf(tszTemp, L"%Iu. %s%s",
mon + 1, TranslateT("Monitor"),
- (m_Monitors[mon].dwFlags & MONITORINFOF_PRIMARY) ? TranslateT(" (primary)") : _T("")
+ (m_Monitors[mon].dwFlags & MONITORINFOF_PRIMARY) ? TranslateT(" (primary)") : L""
);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, tszTemp), mon + 1);
}
@@ -278,11 +278,11 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM)
{
hCtrl = GetDlgItem(m_hWnd, ID_cboxFormat);
ComboBox_ResetContent(hCtrl);
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("PNG")), 0);
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("JPG")), 1);
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("BMP")), 2);
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("TIF")), 3);
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("GIF")), 4);
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"PNG"), 0);
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"JPG"), 1);
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"BMP"), 2);
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"TIF"), 3);
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"GIF"), 4);
ComboBox_SelectItemData(hCtrl, m_opt_cboxFormat); //use Workaround for MS bug ComboBox_SelectItemData
}
/// init SendBy combo box
@@ -294,7 +294,7 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM)
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("File Transfer")), SS_FILESEND);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("E-mail")), SS_EMAIL);
if (g_myGlobals.PluginHTTPExist) {
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("HTTP Server")), SS_HTTPSERVER);
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"HTTP Server"), SS_HTTPSERVER);
}
else if (m_opt_cboxSendBy == SS_HTTPSERVER) {
m_opt_cboxSendBy = SS_IMAGESHACK;
@@ -310,16 +310,16 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM)
m_opt_cboxSendBy = SS_IMAGESHACK;
}
if (g_myGlobals.PluginDropboxExist) {
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("Dropbox")), SS_DROPBOX);
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"Dropbox"), SS_DROPBOX);
}
else if (m_opt_cboxSendBy == SS_DROPBOX) {
m_opt_cboxSendBy = SS_IMAGESHACK;
}
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("ImageShack")), SS_IMAGESHACK);
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"ImageShack"), SS_IMAGESHACK);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Upload Pie (30m)")), SS_UPLOADPIE_30M);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Upload Pie (1d)")), SS_UPLOADPIE_1D);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Upload Pie (1w)")), SS_UPLOADPIE_1W);
- ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("imgur")), SS_IMGUR);
+ ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"imgur"), SS_IMGUR);
ComboBox_SelectItemData(hCtrl, m_opt_cboxSendBy); //use Workaround for MS bug ComboBox_SelectItemData
}
/// init footer options
@@ -329,21 +329,21 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM)
SendDlgItemMessage(m_hWnd, ID_btnAbout, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Information"), MBBF_TCHAR);
HICON hIcon = GetIconBtn(ICO_BTN_HELP);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
- SetWindowText(hCtrl, hIcon ? _T("") : _T("?"));
+ SetWindowText(hCtrl, hIcon ? L"" : L"?");
}
if (hCtrl = GetDlgItem(m_hWnd, ID_btnExplore)) {
SendDlgItemMessage(m_hWnd, ID_btnExplore, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open Folder"), MBBF_TCHAR);
HICON hIcon = GetIconBtn(ICO_BTN_FOLDER);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
- SetWindowText(hCtrl, hIcon ? _T("") : _T("..."));
+ SetWindowText(hCtrl, hIcon ? L"" : L"...");
}
if (hCtrl = GetDlgItem(m_hWnd, ID_chkDesc)) {
SendDlgItemMessage(m_hWnd, ID_chkDesc, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Fill description textbox."), MBBF_TCHAR);
HICON hIcon = GetIconBtn(m_opt_btnDesc ? ICO_BTN_DESCON : ICO_BTN_DESC);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
- SetWindowText(hCtrl, hIcon ? _T("") : _T("D"));
+ SetWindowText(hCtrl, hIcon ? L"" : L"D");
SendMessage(hCtrl, BM_SETCHECK, m_opt_btnDesc ? BST_CHECKED : BST_UNCHECKED, NULL);
}
@@ -351,7 +351,7 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM)
SendDlgItemMessage(m_hWnd, ID_chkDeleteAfterSend, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Delete after send"), MBBF_TCHAR);
HICON hIcon = GetIconBtn(m_opt_btnDeleteAfterSend ? ICO_BTN_DELON : ICO_BTN_DEL);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
- SetWindowText(hCtrl, hIcon ? _T("") : _T("X"));
+ SetWindowText(hCtrl, hIcon ? L"" : L"X");
SendMessage(hCtrl, BM_SETCHECK, m_opt_btnDeleteAfterSend ? BST_CHECKED : BST_UNCHECKED, NULL);
}
@@ -359,7 +359,7 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM)
SendDlgItemMessage(m_hWnd, ID_chkEditor, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open editor before sending"), MBBF_TCHAR);
HICON hIcon = GetIconBtn(m_opt_chkEditor ? ICO_BTN_EDITON : ICO_BTN_EDIT);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
- SetWindowText(hCtrl, hIcon ? _T("") : _T("E"));
+ SetWindowText(hCtrl, hIcon ? L"" : L"E");
SendMessage(hCtrl, BM_SETCHECK, m_opt_chkEditor ? BST_CHECKED : BST_UNCHECKED, NULL);
}
@@ -803,7 +803,7 @@ void TfrmMain::btnCaptureClick()
else if (m_opt_tabCapture == 2) {
TCHAR filename[MAX_PATH];
GetDlgItemText(m_hwndTabPage, ID_edtSize, filename, _countof(filename));
- FILE* fp = _wfopen(filename, _T("rb"));
+ FILE* fp = _wfopen(filename, L"rb");
if (!fp) {
TCHAR *err = TranslateT("Select a file");
MessageBox(m_hWnd, err, ERROR_TITLE, MB_OK | MB_ICONWARNING);
@@ -919,7 +919,7 @@ void TfrmMain::btnAboutOnCloseWindow(HWND)
void TfrmMain::btnExploreClick()
{
if (m_FDestFolder)
- ShellExecute(NULL, _T("explore"), m_FDestFolder, NULL, NULL, SW_SHOW);
+ ShellExecute(NULL, L"explore", m_FDestFolder, NULL, NULL, SW_SHOW);
}
//---------------------------------------------------------------------------
@@ -944,7 +944,7 @@ void TfrmMain::edtSizeUpdate(HWND hWnd, BOOL ClientArea, HWND hTarget, UINT Ctrl
_itot(rect.right - rect.left, B, 10);
// _itot_s(rect.bottom - rect.top, H, 16, 10);
_itot(rect.bottom - rect.top, H, 10);
- mir_tstrncat(B, _T("x"), _countof(B) - mir_tstrlen(B));
+ mir_tstrncat(B, L"x", _countof(B) - mir_tstrlen(B));
mir_tstrncat(B, H, _countof(B) - mir_tstrlen(B));
SetDlgItemText(hTarget, Ctrl, B);
}
@@ -956,7 +956,7 @@ void TfrmMain::edtSizeUpdate(RECT rect, HWND hTarget, UINT Ctrl)
_itot(ABS(rect.right - rect.left), B, 10);
// _itot_s(ABS(rect.bottom - rect.top), H, 16, 10);
_itot(ABS(rect.bottom - rect.top), H, 10);
- mir_tstrncat(B, _T("x"), _countof(B) - mir_tstrlen(B));
+ mir_tstrncat(B, L"x", _countof(B) - mir_tstrlen(B));
mir_tstrncat(B, H, _countof(B) - mir_tstrlen(B));
SetDlgItemText(hTarget, Ctrl, B);
}
@@ -975,8 +975,8 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib)
if (FileNumber > 99999) FileNumber = 1;
//Generate FileName
mir_tstradd(path, m_FDestFolder);
- if (path[mir_tstrlen(path) - 1] != _T('\\')) mir_tstradd(path, _T("\\"));
- mir_tstradd(path, _T("shot%.5u"));//on format change, adapt "len" below
+ if (path[mir_tstrlen(path) - 1] != _T('\\')) mir_tstradd(path, L"\\");
+ mir_tstradd(path, L"shot%.5u");//on format change, adapt "len" below
size_t len = mir_tstrlen(path) + 2;
pszFilename = (TCHAR*)mir_alloc(sizeof(TCHAR)*(len));
mir_sntprintf(pszFilename, len, path, FileNumber);
@@ -1034,7 +1034,7 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib)
HWND hwndCombo = GetDlgItem(m_hWnd, ID_cboxFormat);
switch (ComboBox_GetItemData(hwndCombo, ComboBox_GetCurSel(hwndCombo))) {
case 0: //PNG
- ret = SaveImage(fif, dib_new, pszFilename, _T("png"));
+ ret = SaveImage(fif, dib_new, pszFilename, L"png");
break;
case 1: //JPG
@@ -1049,16 +1049,16 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib)
dib32 = FIP->FI_Composite(dib_new, FALSE, &m_AlphaColor, NULL);
dib24 = FIP->FI_ConvertTo24Bits(dib32);
FIP->FI_Unload(dib32);
- ret = SaveImage(fif, dib24, pszFilename, _T("jpg"));
+ ret = SaveImage(fif, dib24, pszFilename, L"jpg");
FIP->FI_Unload(dib24);
break;
case 2: //BMP
- // ret = SaveImage(FIF_BMP,dib_new, pszFilename, _T("bmp")); //32bit alpha BMP
+ // ret = SaveImage(FIF_BMP,dib_new, pszFilename, L"bmp"); //32bit alpha BMP
dib32 = FIP->FI_Composite(dib_new, FALSE, &m_AlphaColor, NULL);
dib24 = FIP->FI_ConvertTo24Bits(dib32);
FIP->FI_Unload(dib32);
- ret = SaveImage(FIF_BMP, dib24, pszFilename, _T("bmp"));
+ ret = SaveImage(FIF_BMP, dib24, pszFilename, L"bmp");
FIP->FI_Unload(dib24);
break;
@@ -1066,7 +1066,7 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib)
{
TCHAR* pszFile = NULL;
mir_tstradd(pszFile, pszFilename);
- mir_tstradd(pszFile, _T(".tif"));
+ mir_tstradd(pszFile, L".tif");
dib32 = FIP->FI_Composite(dib_new, FALSE, &m_AlphaColor, NULL);
dib24 = FIP->FI_ConvertTo24Bits(dib32);
@@ -1083,11 +1083,11 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib)
case 4: //GIF
{
//dib24 = FIP->FI_ConvertTo8Bits(dib_new);
- //ret = SaveImage(FIF_GIF,dib24, pszFilename, _T("gif"));
+ //ret = SaveImage(FIF_GIF,dib24, pszFilename, L"gif");
//FIP->FI_Unload(dib24);
TCHAR* pszFile = NULL;
mir_tstradd(pszFile, pszFilename);
- mir_tstradd(pszFile, _T(".gif"));
+ mir_tstradd(pszFile, L".gif");
HBITMAP hBmp = FIP->FI_CreateHBITMAPFromDIB(dib_new);
SaveGIF(hBmp, pszFile);
ret = pszFile;
@@ -1103,7 +1103,7 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib)
//TCHAR* pszFormat = (TCHAR*)ComboBox_GetItemData(hwndCombo, ComboBox_GetCurSel(hwndCombo));
TCHAR pszFormat[6];
ComboBox_GetText(hwndCombo, pszFormat, 6);
- if(ret && (mir_tstrcmpi (pszFormat,_T("png")) != 0)) {
+ if(ret && (mir_tstrcmpi (pszFormat,L"png") != 0)) {
fif = FIP->FI_GetFIFFromFilenameU(ret);
dib_new = FIP->FI_LoadU(fif, ret,0);
@@ -1130,7 +1130,7 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib)
}
else {
mir_free(pszFileDesc);
- m_pszFileDesc = mir_tstrdup(_T(""));
+ m_pszFileDesc = mir_tstrdup(L"");
}
if (m_cSend) {
@@ -1168,7 +1168,7 @@ void TfrmMain::FormClose()
if (m_opt_chkEditor) {
SHELLEXECUTEINFO shex = { sizeof(SHELLEXECUTEINFO) };
shex.fMask = SEE_MASK_NOCLOSEPROCESS;
- shex.lpVerb = _T("edit");
+ shex.lpVerb = L"edit";
shex.lpFile = m_pszFile;
shex.nShow = SW_SHOWNORMAL;
ShellExecuteEx(&shex);
@@ -1197,7 +1197,7 @@ void TfrmMain::FormClose()
} while (res == WAIT_OBJECT_0 + 1);
CloseHandle(shex.hProcess);
}
- if (MessageBox(m_hWnd, TranslateT("Send screenshot?"), _T("SendSS"), MB_YESNO | MB_ICONQUESTION | MB_SYSTEMMODAL) != IDYES)
+ if (MessageBox(m_hWnd, TranslateT("Send screenshot?"), L"SendSS", MB_YESNO | MB_ICONQUESTION | MB_SYSTEMMODAL) != IDYES)
send = false;
}
diff --git a/plugins/SendScreenshotPlus/src/Utils.cpp b/plugins/SendScreenshotPlus/src/Utils.cpp
index 8df226f0dc..d36a4a9cc6 100644
--- a/plugins/SendScreenshotPlus/src/Utils.cpp
+++ b/plugins/SendScreenshotPlus/src/Utils.cpp
@@ -149,7 +149,7 @@ FIBITMAP* CaptureMonitor(const TCHAR* szDevice, const RECT* cropRect/*=NULL*/)
FIBITMAP* dib;
/// get screen resolution
if (!szDevice) {
- hScrDC = CreateDC(_T("DISPLAY"), NULL, NULL, NULL);
+ hScrDC = CreateDC(L"DISPLAY", NULL, NULL, NULL);
rect.left = GetSystemMetrics(SM_XVIRTUALSCREEN);
rect.top = GetSystemMetrics(SM_YVIRTUALSCREEN);
rect.right = GetSystemMetrics(SM_XVIRTUALSCREEN) + GetSystemMetrics(SM_CXVIRTUALSCREEN);
@@ -316,7 +316,7 @@ TCHAR* SaveImage(FREE_IMAGE_FORMAT fif, FIBITMAP* dib, const TCHAR* pszFilename,
if (!FileExt) {
if (!pszExt) return NULL;
mir_tstradd(pszFile, pszFilename);
- mir_tstradd(pszFile, _T("."));
+ mir_tstradd(pszFile, L".");
mir_tstradd(pszFile, pszExt);
}
else {
diff --git a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
index 324bdb6d09..5801dcd7fb 100644
--- a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
+++ b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
@@ -700,7 +700,7 @@ INT_PTR CALLBACK MsgBox(HWND hParent, UINT uType, LPCTSTR pszTitle, LPCTSTR pszI
INT_PTR CALLBACK MsgErr(HWND hParent, LPCTSTR pszFormat, ...)
{
TCHAR tszTitle[MAX_SECONDLINE], tszMsg[MAX_SECONDLINE];
- mir_sntprintf(tszTitle, _T("%s - %s"), _T(MODNAME), TranslateT("Error"));
+ mir_sntprintf(tszTitle, L"%s - %s", _T(MODNAME), TranslateT("Error"));
va_list vl;
va_start(vl, pszFormat);
diff --git a/plugins/SendScreenshotPlus/src/stdafx.h b/plugins/SendScreenshotPlus/src/stdafx.h
index 201458b30d..2b003979e8 100644
--- a/plugins/SendScreenshotPlus/src/stdafx.h
+++ b/plugins/SendScreenshotPlus/src/stdafx.h
@@ -97,8 +97,8 @@ using namespace std;
#define UM_EVENT WM_USER+2
// Generic Message Box for Errors
-#define MSGERROR(text) MessageBox(NULL, text, _T("SendSS"), MB_OK | MB_ICONERROR)
-#define MSGINFO (text) MessageBox(NULL, text, _T("SendSS"), MB_OK | MB_ICONINFORMATION)
+#define MSGERROR(text) MessageBox(NULL, text, L"SendSS", MB_OK | MB_ICONERROR)
+#define MSGINFO (text) MessageBox(NULL, text, L"SendSS", MB_OK | MB_ICONINFORMATION)
typedef struct _MGLOBAL {
DWORD mirandaVersion; // mirandaVersion