Use explicite L to replace TEXT - part 2

This commit is contained in:
Don Ho 2024-07-18 21:39:08 +02:00
parent 8866d4b7fe
commit a427ace34c
59 changed files with 185 additions and 185 deletions

View File

@ -76,7 +76,7 @@ bool SecurityGuard::checkSha256(const std::wstring& filePath, NppModule module2c
wchar_t sha2hashStr[65] = { '\0' };
for (size_t i = 0; i < 32; i++)
wsprintf(sha2hashStr + i * 2, TEXT("%02x"), sha2hash[i]);
wsprintf(sha2hashStr + i * 2, L"%02x", sha2hash[i]);
std::vector<std::wstring>* moduleSha256 = nullptr;
@ -149,7 +149,7 @@ bool SecurityGuard::verifySignedLibrary(const std::wstring& filepath)
DWORD netstatus;
QOCINFO oci;
oci.dwSize = sizeof(oci);
CONST TCHAR* msftTEXTest_site = TEXT("http://www.msftncsi.com/ncsi.txt");
CONST TCHAR* msftTEXTest_site = L"http://www.msftncsi.com/ncsi.txt";
bool online = false;
online = (0 != IsNetworkAlive(&netstatus));
online = online && (0 == GetLastError());

View File

@ -46,7 +46,7 @@ bool MiniDumper::writeDump(EXCEPTION_POINTERS * pExceptionInfo)
wcscat_s(szDumpPath, L"\\NppDump.dmp");
// ask the user if they want to save a dump file
int msgret = ::MessageBox(NULL, TEXT("Do you want to save a dump file?\r\nDoing so can aid in developing Notepad++."), msgTitle, MB_YESNO);
int msgret = ::MessageBox(NULL, L"Do you want to save a dump file?\r\nDoing so can aid in developing Notepad++.", msgTitle, MB_YESNO);
if (msgret == IDYES)
{
// create the file

View File

@ -34,7 +34,7 @@ const TCHAR defExtArray[nbSupportedLang][nbExtMax][extNameMax] =
{L"Notepad",
L".txt", L".log"
},
{TEXT("ms ini/inf"),
{L"ms ini/inf",
L".ini", L".inf"
},
{L"c, c++, objc",
@ -42,7 +42,7 @@ const TCHAR defExtArray[nbSupportedLang][nbExtMax][extNameMax] =
L".m", L".mm",
L".vcxproj", L".vcproj", L".props", L".vsprops", L".manifest"
},
{TEXT("java, c#, pascal"),
{L"java, c#, pascal",
L".java", L".cs", L".pas", L".pp", L".inc"
},
{L"web script",

View File

@ -21,7 +21,7 @@
IDD_REGEXT_BOX DIALOGEX 115, 10, 460, 205
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | DS_CONTROL
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x1
FONT 8, L"MS Shell Dlg", 0, 0, 0x1
BEGIN
LTEXT "Please exit Notepad++ and relaunch Notepad++ in Administrator mode to use this feature.",IDC_ADMINMUSTBEONMSG_STATIC,20,0,300,16
LTEXT "Supported extensions:",IDC_SUPPORTEDEXTS_STATIC,70,18,80,8

View File

@ -118,7 +118,7 @@ intptr_t CALLBACK HashFromFilesDlg::run_dlgProc(UINT message, WPARAM wParam, LPA
case IDC_HASH_FILEBROWSER_BUTTON:
{
CustomFileDialog fDlg(_hSelf);
fDlg.setExtFilter(L"All types", TEXT(".*"));
fDlg.setExtFilter(L"All types", L".*");
const auto& fns = fDlg.doOpenMultiFilesDlg();
if (!fns.empty())
@ -272,28 +272,28 @@ void HashFromFilesDlg::doDialog(bool isRTL)
case hash_md5:
{
title = L"Generate MD5 digest from files";
buttonText = TEXT("Choose files to &generate MD5...");
buttonText = L"Choose files to &generate MD5...";
}
break;
case hash_sha1:
{
title = L"Generate SHA-1 digest from files";
buttonText = TEXT("Choose files to &generate SHA-1...");
buttonText = L"Choose files to &generate SHA-1...";
}
break;
case hash_sha256:
{
title = L"Generate SHA-256 digest from files";
buttonText = TEXT("Choose files to &generate SHA-256...");
buttonText = L"Choose files to &generate SHA-256...";
}
break;
case hash_sha512:
{
title = L"Generate SHA-1 digest from files";
buttonText = TEXT("Choose files to &generate SHA-512...");
buttonText = L"Choose files to &generate SHA-512...";
}
break;

View File

@ -1310,7 +1310,7 @@ END
IDD_ABOUTBOX DIALOGEX 0, 0, 270, 240
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_BORDER | WS_SYSMENU
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x1
FONT 8, L"MS Shell Dlg", 0, 0, 0x1
BEGIN
EDITTEXT IDC_BUILD_DATETIME,150,2,150,10, ES_READONLY | NOT WS_BORDER
CONTROL "", IDI_NPPABOUT_LOGO,"Static",SS_OWNERDRAW,10,5,128,128
@ -1343,7 +1343,7 @@ IDD_DEBUGINFOBOX DIALOGEX 0, 0, 246, 195
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Debug Info"
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x1
FONT 8, L"MS Shell Dlg", 0, 0, 0x1
BEGIN
GROUPBOX "",IDC_STATIC,8,3,230,151,BS_CENTER
EDITTEXT IDC_DEBUGINFO_EDIT,18,16,210,128,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL
@ -1355,7 +1355,7 @@ IDD_DOSAVEORNOTBOX DIALOGEX 0, 0, 312, 80
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Save"
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x1
FONT 8, L"MS Shell Dlg", 0, 0, 0x1
BEGIN
LTEXT "",IDC_DOSAVEORNOTTEXT,7,10,290,40,SS_EDITCONTROL
DEFPUSHBUTTON "&Yes",IDYES,10,60,50,14
@ -1369,7 +1369,7 @@ IDD_DOSAVEALLBOX DIALOGEX 0, 0, 260, 95
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Save"
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x1
FONT 8, L"MS Shell Dlg", 0, 0, 0x1
BEGIN
LTEXT "",IDC_DOSAVEALLTEXT,7,10,250,70,SS_EDITCONTROL
DEFPUSHBUTTON "&Yes",IDYES,47,75,50,14
@ -1381,7 +1381,7 @@ IDD_GOLINE DIALOGEX 0, 0, 258, 75
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Go To..."
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x0
FONT 8, L"MS Shell Dlg", 0, 0, 0x0
BEGIN
CONTROL "&Line",IDC_RADIO_GOTOLINE,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,5,80,10
CONTROL "&Offset",IDC_RADIO_GOTOOFFSET,"Button",BS_AUTORADIOBUTTON,98,5,80,10

View File

@ -98,7 +98,7 @@ IDB_INCREMENTAL_BG BITMAP "../icons/incrementalBg.bmp"
IDD_INCREMENT_FIND DIALOGEX 0, 0, 680, 20
STYLE DS_SYSMODAL | DS_CONTROL | DS_FIXEDSYS | WS_CHILD | WS_CLIPCHILDREN
FONT 8, TEXT("MS Shell Dlg")
FONT 8, L"MS Shell Dlg"
BEGIN
PUSHBUTTON "✕",IDCANCEL,2,3,16,14
RTEXT "Find:",IDC_INCSTATIC,18,6,46,12
@ -114,7 +114,7 @@ IDD_FINDRESULT DIALOGEX 0, 0, 223, 67
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE
CAPTION "Search results"
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x0
FONT 8, L"MS Shell Dlg", 0, 0, 0x0
BEGIN
DEFPUSHBUTTON ">",IDC_INCFINDNXTOK,243,0,16,14,NOT WS_VISIBLE // dummy control to prevent issue with focus (search result selection)
END

View File

@ -53,7 +53,7 @@ private:
TCHAR _stop = ')';
TCHAR _param = ',';
TCHAR _terminal = ';';
generic_string _additionalWordChar = TEXT("");
generic_string _additionalWordChar = L"";
bool _ignoreCase = true;
bool _selfActivated = false;

View File

@ -48,7 +48,7 @@ public :
else
{
// clean Line Edit
::SetDlgItemText(_hSelf, ID_GOLINE_EDIT, TEXT(""));
::SetDlgItemText(_hSelf, ID_GOLINE_EDIT, L"");
}
};

View File

@ -23,7 +23,7 @@ IDD_COLUMNEDIT DIALOGEX 0, 0, 220, 214
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Column / Multi-Selection Editor"
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x0
FONT 8, L"MS Shell Dlg", 0, 0, 0x0
BEGIN
CONTROL "&Text to Insert",IDC_COL_TEXT_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP,13,6,124,10
CONTROL "&Number to Insert",IDC_COL_NUM_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP,13,68,204,10

View File

@ -571,7 +571,7 @@ XmlMatchedTagsHighlighter::FindResult XmlMatchedTagsHighlighter::findText(const
search.chrg.cpMax = static_cast<Sci_Position>(end);
LangType lang = (_pEditView->getCurrentBuffer())->getLangType();
if (lang == L_XML || (lang == L_HTML && wcsicmp(PathFindExtension((_pEditView->getCurrentBuffer())->getFileName()), TEXT(".xhtml")) == 0))
if (lang == L_XML || (lang == L_HTML && wcsicmp(PathFindExtension((_pEditView->getCurrentBuffer())->getFileName()), L".xhtml") == 0))
flags = flags | SCFIND_MATCHCASE;
intptr_t result = _pEditView->execute(SCI_FINDTEXTFULL, flags, reinterpret_cast<LPARAM>(&search));

View File

@ -774,7 +774,7 @@ bool TiXmlDocumentA::LoadUnicodeFilePath( const TCHAR* filename )
// See STL_STRING_BUG above.
// Fixed with the StringToBuffer class.
FILE* file = _wfopen(filename, TEXT("r"));
FILE* file = _wfopen(filename, L"r");
if ( file )
{
@ -832,7 +832,7 @@ bool TiXmlDocumentA::SaveFile( const char * filename ) const
bool TiXmlDocumentA::SaveUnicodeFilePath( const TCHAR* filename ) const
{
// The old c stuff lives on...
FILE* fp = _wfopen( filename, TEXT("wc") );
FILE* fp = _wfopen( filename, L"wc" );
if ( fp )
{
Print( fp, 0 );

View File

@ -69,7 +69,7 @@ class TiXmlString
{
if (allocated)
return cstring;
return TEXT("");
return L"";
}
// Return the length of a TiXmlString
@ -115,7 +115,7 @@ class TiXmlString
}
// Checks if a TiXmlString contains only whitespace (same rules as isspace)
// Not actually used in tinyxml. Conflicts with a C macro, TEXT("isblank"),
// Not actually used in tinyxml. Conflicts with a C macro, L"isblank",
// which is a problem. Commenting out. -lee
// bool isblank () const;

View File

@ -366,7 +366,7 @@ public:
void SetValue( const std::wstring& _value )
{
StringToBuffer buf( _value );
SetValue( buf.buffer ? buf.buffer : TEXT("") );
SetValue( buf.buffer ? buf.buffer : L"" );
}
#endif
@ -614,13 +614,13 @@ public:
void SetName( const std::wstring& _name )
{
StringToBuffer buf( _name );
SetName ( buf.buffer ? buf.buffer : TEXT("error") );
SetName ( buf.buffer ? buf.buffer : L"error" );
}
/// STL string form.
void SetValue( const std::wstring& _value )
{
StringToBuffer buf( _value );
SetValue( buf.buffer ? buf.buffer : TEXT("error") );
SetValue( buf.buffer ? buf.buffer : L"error" );
}
#endif
@ -1092,7 +1092,7 @@ public:
*/
void ClearError() { error = false;
errorId = 0;
errorDesc = TEXT("");
errorDesc = L"";
errorLocation.row = errorLocation.col = 0;
//errorLocation.last = 0;
}
@ -1130,9 +1130,9 @@ private:
Take an example:
@verbatim
<Document>
<Element attributeA = TEXT("valueA")>
<Child attributeB = TEXT("value1") />
<Child attributeB = TEXT("value2") />
<Element attributeA = L"valueA">
<Child attributeB = L"value1" />
<Child attributeB = L"value2" />
</Element>
<Document>
@endverbatim

View File

@ -34,18 +34,18 @@ distribution.
const TCHAR* TiXmlBase::errorString[ TIXML_ERROR_STRING_COUNT ] =
{
TEXT("No error"),
TEXT("Error"),
TEXT("Failed to open file"),
TEXT("Memory allocation failed."),
TEXT("Error parsing Element."),
TEXT("Failed to read Element name"),
TEXT("Error reading Element value."),
TEXT("Error reading Attributes."),
TEXT("Error: empty tag."),
TEXT("Error reading end tag."),
TEXT("Error parsing Unknown."),
TEXT("Error parsing Comment."),
TEXT("Error parsing Declaration."),
TEXT("Error document empty.")
L"No error",
L"Error",
L"Failed to open file",
L"Memory allocation failed.",
L"Error parsing Element.",
L"Failed to read Element name",
L"Error reading Element value.",
L"Error reading Attributes.",
L"Error: empty tag.",
L"Error reading end tag.",
L"Error parsing Unknown.",
L"Error parsing Comment.",
L"Error parsing Declaration.",
L"Error document empty."
};

View File

@ -34,11 +34,11 @@ distribution.
// or order will break putstring.
TiXmlBase::Entity TiXmlBase::entity[ NUM_ENTITY ] =
{
{ TEXT("&amp;"), 5, '&' },
{ TEXT("&lt;"), 4, '<' },
{ TEXT("&gt;"), 4, '>' },
{ TEXT("&quot;"), 6, '\"' },
{ TEXT("&apos;"), 6, '\'' }
{ L"&amp;", 5, '&' },
{ L"&lt;", 4, '<' },
{ L"&gt;", 4, '>' },
{ L"&quot;", 6, '\"' },
{ L"&apos;", 6, '\'' }
};
@ -197,7 +197,7 @@ const TCHAR* TiXmlBase::SkipWhiteSpace( const TCHAR* p )
const TCHAR* TiXmlBase::ReadName( const TCHAR* p, TIXML_STRING * name )
{
*name = TEXT("");
*name = L"";
assert( p );
// Names start with letters or underscores.
@ -228,7 +228,7 @@ const TCHAR* TiXmlBase::GetEntity( const TCHAR* p, TCHAR* value )
int i;
// Handle the &#x entities.
if (wcsncmp( TEXT("&#x"), p, 3 ) == 0)
if (wcsncmp( L"&#x", p, 3 ) == 0)
{
const TCHAR* end = wcschr(p+3, L';');
if (end && end - p <= 3 + 4)
@ -311,7 +311,7 @@ const TCHAR* TiXmlBase::ReadText( const TCHAR* p,
const TCHAR* endTag,
bool caseInsensitive )
{
*text = TEXT("");
*text = L"";
if ( !trimWhiteSpace // certain tags always keep whitespace
|| !condenseWhiteSpace ) // if true, whitespace is always kept
{
@ -524,8 +524,8 @@ TiXmlNode* TiXmlNode::Identify( const TCHAR* p )
// - Everthing else is unknown to tinyxml.
//
const TCHAR* xmlHeader = { TEXT("<?xml") };
const TCHAR* commentHeader = { TEXT("<!--") };
const TCHAR* xmlHeader = { L"<?xml" };
const TCHAR* commentHeader = { L"<!--" };
if ( StringEqual( p, xmlHeader, true ) )
{
@ -540,7 +540,7 @@ TiXmlNode* TiXmlNode::Identify( const TCHAR* p )
#ifdef DEBUG_PARSER
TIXML_LOG( "XML parsing Element\n" );
#endif
returnNode = new TiXmlElement( TEXT("") );
returnNode = new TiXmlElement( L"" );
}
else if ( StringEqual( p, commentHeader, false ) )
{
@ -610,7 +610,7 @@ void TiXmlElement::StreamIn (TIXML_ISTREAM * in, TIXML_STRING * tag)
if ( in->good() && in->peek() != '<' )
{
// Yep, text.
TiXmlText text( TEXT("") );
TiXmlText text( L"" );
text.StreamIn( in, tag );
// What follows text is a closing tag or another node.
@ -712,9 +712,9 @@ const TCHAR* TiXmlElement::Parse( const TCHAR* p, TiXmlParsingData* data )
return 0;
}
TIXML_STRING endTag (TEXT("</"));
TIXML_STRING endTag (L"</");
endTag += value;
endTag += TEXT(">");
endTag += L">";
// Check for and read attributes. Also look for an empty
// tag or an end tag.
@ -808,7 +808,7 @@ const TCHAR* TiXmlElement::ReadValue( const TCHAR* p, TiXmlParsingData* data )
if ( *p != '<' )
{
// Take what we have, make a text element.
TiXmlText* textNode = new TiXmlText( TEXT("") );
TiXmlText* textNode = new TiXmlText( L"" );
if ( !textNode )
{
@ -827,7 +827,7 @@ const TCHAR* TiXmlElement::ReadValue( const TCHAR* p, TiXmlParsingData* data )
{
// We hit a '<'
// Have we hit a new element or an end tag?
if ( StringEqual( p, TEXT("</"), false ) )
if ( StringEqual( p, L"</", false ) )
{
return p;
}
@ -891,7 +891,7 @@ const TCHAR* TiXmlUnknown::Parse( const TCHAR* p, TiXmlParsingData* data )
return 0;
}
++p;
value = TEXT("");
value = L"";
while ( p && *p && *p != '>' )
{
@ -931,7 +931,7 @@ void TiXmlComment::StreamIn( TIXML_ISTREAM * in, TIXML_STRING * tag )
const TCHAR* TiXmlComment::Parse( const TCHAR* p, TiXmlParsingData* data )
{
TiXmlDocument* document = GetDocument();
value = TEXT("");
value = L"";
p = SkipWhiteSpace( p );
@ -941,8 +941,8 @@ const TCHAR* TiXmlComment::Parse( const TCHAR* p, TiXmlParsingData* data )
data->Stamp( p );
location = data->Cursor();
}
const TCHAR* startTag = TEXT("<!--");
const TCHAR* endTag = TEXT("-->");
const TCHAR* startTag = L"<!--";
const TCHAR* endTag = L"-->";
if ( !StringEqual( p, startTag, false ) )
{
@ -994,13 +994,13 @@ const TCHAR* TiXmlAttribute::Parse( const TCHAR* p, TiXmlParsingData* data )
if ( *p == '\'' )
{
++p;
end = TEXT("\'");
end = L"\'";
p = ReadText( p, &value, false, end, false );
}
else if ( *p == '"' )
{
++p;
end = TEXT("\"");
end = L"\"";
p = ReadText( p, &value, false, end, false );
}
else
@ -1008,7 +1008,7 @@ const TCHAR* TiXmlAttribute::Parse( const TCHAR* p, TiXmlParsingData* data )
// All attribute values should be in single or double quotes.
// But this is such a common error that the parser will try
// its best, even without them.
value = TEXT("");
value = L"";
while ( p && *p // existence
&& !_istspace( *p ) && *p != '\n' && *p != '\r' // whitespace
&& *p != '/' && *p != '>' ) // tag end
@ -1037,7 +1037,7 @@ void TiXmlText::StreamIn( TIXML_ISTREAM * in, TIXML_STRING * tag )
const TCHAR* TiXmlText::Parse( const TCHAR* p, TiXmlParsingData* data )
{
value = TEXT("");
value = L"";
// TiXmlParsingData data( p, prevData );
if ( data )
{
@ -1046,7 +1046,7 @@ const TCHAR* TiXmlText::Parse( const TCHAR* p, TiXmlParsingData* data )
}
bool ignoreWhite = true;
const TCHAR* end = TEXT("<");
const TCHAR* end = L"<";
p = ReadText( p, &value, ignoreWhite, end, false );
if ( p )
return p-1; // don't truncate the '<'
@ -1076,7 +1076,7 @@ const TCHAR* TiXmlDeclaration::Parse( const TCHAR* p, TiXmlParsingData* data )
// Find the beginning, find the end, and look for
// the stuff in-between.
TiXmlDocument* document = GetDocument();
if ( !p || !*p || !StringEqual( p, TEXT("<?xml"), true ) )
if ( !p || !*p || !StringEqual( p, L"<?xml", true ) )
{
if ( document ) document->SetError( TIXML_ERROR_PARSING_DECLARATION, 0, 0 );
return 0;
@ -1089,9 +1089,9 @@ const TCHAR* TiXmlDeclaration::Parse( const TCHAR* p, TiXmlParsingData* data )
}
p += 5;
version = TEXT("");
encoding = TEXT("");
standalone = TEXT("");
version = L"";
encoding = L"";
standalone = L"";
while ( p && *p )
{
@ -1102,19 +1102,19 @@ const TCHAR* TiXmlDeclaration::Parse( const TCHAR* p, TiXmlParsingData* data )
}
p = SkipWhiteSpace( p );
if ( StringEqual( p, TEXT("version"), true ) )
if ( StringEqual( p, L"version", true ) )
{
TiXmlAttribute attrib;
p = attrib.Parse( p, data );
version = attrib.Value();
}
else if ( StringEqual( p, TEXT("encoding"), true ) )
else if ( StringEqual( p, L"encoding", true ) )
{
TiXmlAttribute attrib;
p = attrib.Parse( p, data );
encoding = attrib.Value();
}
else if ( StringEqual( p, TEXT("standalone"), true ) )
else if ( StringEqual( p, L"standalone", true ) )
{
TiXmlAttribute attrib;
p = attrib.Parse( p, data );

View File

@ -22,7 +22,7 @@
#include "StaticDialog.h"
#define LICENCE_TXT \
TEXT("This program is free software; you can redistribute it and/or \
L"This program is free software; you can redistribute it and/or \
modify it under the terms of the GNU General Public License \
as published by the Free Software Foundation; either \
version 3 of the License, or at your option any later version.\r\n\
@ -33,7 +33,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \
GNU General Public License for more details. \r\n\
\r\n\
You should have received a copy of the GNU General Public License \
along with this program. If not, see <https://www.gnu.org/licenses/>.")
along with this program. If not, see <https://www.gnu.org/licenses/>."
class AboutDlg : public StaticDialog

View File

@ -104,13 +104,13 @@ void URLCtrl::action()
// Open a browser
if (!_URL.empty())
{
::ShellExecute(NULL, TEXT("open"), _URL.c_str(), NULL, NULL, SW_SHOWNORMAL);
::ShellExecute(NULL, L"open", _URL.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
else
{
TCHAR szWinText[MAX_PATH] = { '\0' };
::GetWindowText(_hSelf, szWinText, MAX_PATH);
::ShellExecute(NULL, TEXT("open"), szWinText, NULL, NULL, SW_SHOWNORMAL);
::ShellExecute(NULL, L"open", szWinText, NULL, NULL, SW_SHOWNORMAL);
}
}
}

View File

@ -39,7 +39,7 @@ void ListView::init(HINSTANCE hInst, HWND parent)
| LVS_SHAREIMAGELISTS | LVS_SHOWSELALWAYS;
_hSelf = ::CreateWindow(WC_LISTVIEW,
TEXT(""),
L"",
WS_CHILD | WS_BORDER | listViewStyles,
0,
0,

View File

@ -25,7 +25,7 @@
#include "ListView.h"
#include "asciiListView.h"
#define AI_PROJECTPANELTITLE TEXT("ASCII Codes Insertion Panel")
#define AI_PROJECTPANELTITLE L"ASCII Codes Insertion Panel"
class ScintillaEditView;

View File

@ -524,16 +524,16 @@ void AsciiListView::setValues(int codepage)
{
if ((i >= 32 && i <= 126 && i != 45) || (i >= 160 && i <= 255))
{
swprintf(htmlNumber, bufSize, TEXT("&#%d;"), i);
swprintf(htmlHexNumber, bufSize, TEXT("&#x%x;"), i);
swprintf(htmlNumber, bufSize, L"&#%d;", i);
swprintf(htmlHexNumber, bufSize, L"&#x%x;", i);
}
else
{
int n = getHtmlNumber(static_cast<unsigned char>(i));
if (n > -1)
{
swprintf(htmlNumber, bufSize, TEXT("&#%d;"), n);
swprintf(htmlHexNumber, bufSizeHex, TEXT("&#x%x;"), n);
swprintf(htmlNumber, bufSize, L"&#%d;", n);
swprintf(htmlHexNumber, bufSizeHex, L"&#x%x;", n);
}
else
{

View File

@ -182,7 +182,7 @@ void ClipboardHistoryPanel::drawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
if (i >= _clipboardDataInfos.size())
return;
//printStr(TEXT("OK"));
//printStr(L"OK");
COLORREF fgColor = _lbFgColor == -1?black:_lbFgColor; // fg black by default
COLORREF bgColor = _lbBgColor == -1?white:_lbBgColor; // bg white by default
@ -293,7 +293,7 @@ intptr_t CALLBACK ClipboardHistoryPanel::run_dlgProc(UINT message, WPARAM wParam
}
catch (...)
{
MessageBox(_hSelf, TEXT("Cannot process this clipboard data in the history:\nThe data is too large to be treated."), TEXT("Clipboard problem"), MB_OK | MB_APPLMODAL);
MessageBox(_hSelf, L"Cannot process this clipboard data in the history:\nThe data is too large to be treated.", L"Clipboard problem", MB_OK | MB_APPLMODAL);
delete[] c;
}
}

View File

@ -21,7 +21,7 @@
#include "clipboardHistoryPanel_rc.h"
#include <vector>
#define CH_PROJECTPANELTITLE TEXT("Clipboard History")
#define CH_PROJECTPANELTITLE L"Clipboard History"
class ScintillaEditView;

View File

@ -26,8 +26,8 @@ void ColourPicker::init(HINSTANCE hInst, HWND parent)
_hSelf = ::CreateWindowEx(
0,
TEXT("Button"),
TEXT("F"),
L"Button",
L"F",
WS_CHILD | WS_VISIBLE,
0, 0, 25, 25,
_hParent, NULL, _hInst, (LPVOID)0);

View File

@ -20,7 +20,7 @@
IDD_COLOUR_POPUP DIALOGEX 0, 0, 132, 113
STYLE DS_SETFONT | WS_POPUP | WS_BORDER
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x0
FONT 8, L"MS Shell Dlg", 0, 0, 0x0
BEGIN
LISTBOX IDC_COLOUR_LIST,7,7,117,79,
LBS_OWNERDRAWFIXED | LBS_NOINTEGRALHEIGHT |

View File

@ -799,8 +799,8 @@ void WordStyleDlg::switchToTheme()
NativeLangSpeaker *pNativeSpeaker = nppParamInst.getNativeLangSpeaker();
int mb_response = pNativeSpeaker->messageBox("SwitchUnsavedThemeWarning",
_hSelf,
TEXT("Unsaved changes are about to be discarded!\nDo you want to save your changes before switching themes?"),
TEXT("$STR_REPLACE$"),
L"Unsaved changes are about to be discarded!\nDo you want to save your changes before switching themes?",
L"$STR_REPLACE$",
MB_ICONWARNING | MB_YESNO | MB_APPLMODAL | MB_SETFOREGROUND,
0,
themeFileName);
@ -1164,7 +1164,7 @@ void WordStyleDlg::setVisualFromStyleList()
if (lType == L_TEXT)
{
generic_string lexerNameStr = lexerStyler.getLexerName();
lexerNameStr += TEXT(" is not defined in NppParameters::getLangIDFromStr()");
lexerNameStr += L" is not defined in NppParameters::getLangIDFromStr()";
printStr(lexerNameStr.c_str());
}
const TCHAR *kws = nppParams.getWordList(lType, style._keywordClass);

View File

@ -313,8 +313,8 @@ LRESULT DockingCont::runProcCaption(HWND hwnd, UINT Message, WPARAM wParam, LPAR
{
DWORD dwError = ::GetLastError();
TCHAR str[128]{};
::wsprintf(str, TEXT("GetLastError() returned %lu"), dwError);
::MessageBox(NULL, str, TEXT("SetWindowsHookEx(MOUSE) failed on runProcCaption"), MB_OK | MB_ICONERROR);
::wsprintf(str, L"GetLastError() returned %lu", dwError);
::MessageBox(NULL, str, L"SetWindowsHookEx(MOUSE) failed on runProcCaption", MB_OK | MB_ICONERROR);
}
::RedrawWindow(hwnd, nullptr, nullptr, RDW_INVALIDATE);
}
@ -425,7 +425,7 @@ LRESULT DockingCont::runProcCaption(HWND hwnd, UINT Message, WPARAM wParam, LPAR
else
{
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
generic_string tip = pNativeSpeaker->getLocalizedStrFromID("close-panel-tip", TEXT("Close"));
generic_string tip = pNativeSpeaker->getLocalizedStrFromID("close-panel-tip", L"Close");
toolTip.Show(rc, tip.c_str(), pt.x, pt.y + 20);
}
return 0;
@ -592,7 +592,7 @@ void DockingCont::drawCaptionItem(DRAWITEMSTRUCT *pDrawItemStruct)
ANSI_CHARSET, OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
DEFAULT_PITCH | FF_ROMAN,
TEXT("MS Shell Dlg"));
L"MS Shell Dlg");
}
hOldFont = (HFONT)::SelectObject(hDc, hFont);
@ -1726,7 +1726,7 @@ void DockingCont::selectTab(int iTab)
if (iItem == iTab && pszMaxTxt)
{
// fake here an icon before text ...
szText = TEXT(" ");
szText = L" ";
szText += pszMaxTxt;
}
tcItem.pszText = (TCHAR *)szText.c_str();
@ -1768,7 +1768,7 @@ bool DockingCont::updateCaption()
if ((((tTbData*)tcItem.lParam)->uMask & DWS_ADDINFO) &&
(lstrlen(((tTbData*)tcItem.lParam)->pszAddInfo) != 0))
{
_pszCaption += TEXT(" - ");
_pszCaption += L" - ";
_pszCaption += ((tTbData*)tcItem.lParam)->pszAddInfo;
}

View File

@ -23,7 +23,7 @@ STYLE DS_SETFONT | DS_SETFOREGROUND | WS_MAXIMIZEBOX | WS_POPUP |
WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_TOOLWINDOW
CAPTION "Selected Tab"
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x1
FONT 8, L"MS Shell Dlg", 0, 0, 0x1
BEGIN
CONTROL "Caption",IDC_BTN_CAPTION,"Button",BS_OWNERDRAW | NOT
WS_VISIBLE,0,0,186,10

View File

@ -119,7 +119,7 @@ void DockingManager::init(HINSTANCE hInst, HWND hWnd, Window ** ppWin)
_hSelf = ::CreateWindowEx(
0,
DSPC_CLASS_NAME,
TEXT(""),
L"",
WS_CHILD | WS_CLIPCHILDREN,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,

View File

@ -23,7 +23,7 @@
#include "DockingCont.h"
#include "SplitterContainer.h"
#define DSPC_CLASS_NAME TEXT("dockingManager")
#define DSPC_CLASS_NAME L"dockingManager"
#define CONT_MAP_MAX 50
class DockingSplitter;

View File

@ -37,13 +37,13 @@ void DockingSplitter::init(HINSTANCE hInst, HWND hWnd, HWND hMessage, UINT flags
{
//double sided arrow pointing north-south as cursor
wc.hCursor = ::LoadCursor(NULL,IDC_SIZENS);
wc.lpszClassName = TEXT("nsdockspliter");
wc.lpszClassName = L"nsdockspliter";
}
else
{
// double sided arrow pointing east-west as cursor
wc.hCursor = ::LoadCursor(NULL,IDC_SIZEWE);
wc.lpszClassName = TEXT("wedockspliter");
wc.lpszClassName = L"wedockspliter";
}
if (((_isHoriReg == FALSE) && (flags & DMS_HORIZONTAL)) ||
@ -73,7 +73,7 @@ void DockingSplitter::init(HINSTANCE hInst, HWND hWnd, HWND hMessage, UINT flags
}
/* create splitter windows and initialize it */
_hSelf = ::CreateWindowEx( 0, wc.lpszClassName, TEXT(""), WS_CHILD | WS_VISIBLE,
_hSelf = ::CreateWindowEx( 0, wc.lpszClassName, L"", WS_CHILD | WS_VISIBLE,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
_hParent, NULL, _hInst, (LPVOID)this);

View File

@ -108,7 +108,7 @@ void Gripper::startGrip(DockingCont* pCont, DockingManager* pDockMgr)
_hSelf = ::CreateWindowEx(
0,
MDLG_CLASS_NAME,
TEXT(""), 0,
L"", 0,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
NULL,
@ -222,8 +222,8 @@ void Gripper::create()
{
DWORD dwError = ::GetLastError();
TCHAR str[128];
::wsprintf(str, TEXT("GetLastError() returned %lu"), dwError);
::MessageBox(NULL, str, TEXT("SetWindowsHookEx(MOUSE) failed on Gripper::create()"), MB_OK | MB_ICONERROR);
::wsprintf(str, L"GetLastError() returned %lu", dwError);
::MessageBox(NULL, str, L"SetWindowsHookEx(MOUSE) failed on Gripper::create()", MB_OK | MB_ICONERROR);
}
if (ver != WV_UNKNOWN && ver < WV_VISTA)
@ -233,8 +233,8 @@ void Gripper::create()
{
DWORD dwError = ::GetLastError();
TCHAR str[128];
::wsprintf(str, TEXT("GetLastError() returned %lu"), dwError);
::MessageBox(NULL, str, TEXT("SetWindowsHookEx(KEYBOARD) failed on Gripper::create()"), MB_OK | MB_ICONERROR);
::wsprintf(str, L"GetLastError() returned %lu", dwError);
::MessageBox(NULL, str, L"SetWindowsHookEx(KEYBOARD) failed on Gripper::create()", MB_OK | MB_ICONERROR);
}
}
// Removed regarding W9x systems
@ -474,7 +474,7 @@ void Gripper::doTabReordering(POINT pt)
#if 0
extern HWND g_hMainWnd;
TCHAR str[128];
wsprintf(str, TEXT("Size: %i"), vCont.size());
wsprintf(str, L"Size: %i", vCont.size());
::SetWindowText(g_hMainWnd, str);
#endif

View File

@ -37,7 +37,7 @@ static const WORD DotPattern[] =
};
#define MDLG_CLASS_NAME TEXT("moveDlg")
#define MDLG_CLASS_NAME L"moveDlg"
class Gripper final

View File

@ -17,7 +17,7 @@
#pragma once
#define DM_NOFOCUSWHILECLICKINGCAPTION TEXT("NOFOCUSWHILECLICKINGCAPTION")
#define DM_NOFOCUSWHILECLICKINGCAPTION L"NOFOCUSWHILECLICKINGCAPTION"
#define IDD_PLUGIN_DLG 103
#define IDC_EDIT1 1000

View File

@ -20,13 +20,13 @@
#include "DockingDlgInterface.h"
#include "documentMap_rc.h"
#define DM_PANELTITLE TEXT("Document Map")
#define DM_PANELTITLE L"Document Map"
#define DOCUMENTMAP_SCROLL (WM_USER + 4) // DM_SETDEFID uses WM_USER + 1
#define DOCUMENTMAP_MOUSECLICKED (WM_USER + 5) // DM_REPOSITION uses WM_USER + 2
#define DOCUMENTMAP_MOUSEWHEEL (WM_USER + 3)
const TCHAR VIEWZONE_DOCUMENTMAP[64] = TEXT("Document map");
const TCHAR VIEWZONE_DOCUMENTMAP[64] = L"Document map";
class ScintillaEditView;
class Buffer;

View File

@ -142,8 +142,8 @@ intptr_t CALLBACK FindCharsInRangeDlg::run_dlgProc(UINT message, WPARAM wParam,
//STOP!
NppParameters::getInstance().getNativeLangSpeaker()->messageBox("FindCharRangeValueError",
_hSelf,
TEXT("You should type between 0 and 255."),
TEXT("Range Value problem"),
L"You should type between 0 and 255.",
L"Range Value problem",
MB_OK);
return TRUE;
}

View File

@ -712,7 +712,7 @@ TCHAR GetASCII(WPARAM wParam, LPARAM lParam)
int result = ToAscii(static_cast<UINT>(wParam), (lParam >> 16) & 0xff, keys, &dwReturnedValue, 0);
int returnvalue = (TCHAR)dwReturnedValue;
if (returnvalue < 0) { returnvalue = 0; }
wsprintf(mbuffer, TEXT("return value = %d"), returnvalue);
wsprintf(mbuffer, L"return value = %d", returnvalue);
if (result != 1) { returnvalue = 0; }
return (TCHAR)returnvalue;
@ -1389,7 +1389,7 @@ LRESULT CALLBACK GridProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
//protecting or unprotecting a cell that isn't in the list
//add it as blank;
wcscat_s(buffer, TEXT("|"));
wcscat_s(buffer, L"|");
if ((BOOL)lParam)
{
wcscat_s(buffer, L"PA");
@ -1398,7 +1398,7 @@ LRESULT CALLBACK GridProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
wcscat_s(buffer, L"UA");
}
wcscat_s(buffer, TEXT("|"));
wcscat_s(buffer, L"|");
SendMessage(BGHS[SelfIndex].hlist1, LB_ADDSTRING, FindResult, reinterpret_cast<LPARAM>(buffer));
}
}
@ -1467,7 +1467,7 @@ LRESULT CALLBACK GridProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
}
//now add it
wcscat_s(buffer, TEXT("|"));
wcscat_s(buffer, L"|");
wcscat_s(buffer, BGHS[SelfIndex].protect);
int iDataType = 1;
@ -1478,7 +1478,7 @@ LRESULT CALLBACK GridProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
if (iDataType == 4) { wcscat_s(buffer, L"F"); }
if (iDataType == 5) { wcscat_s(buffer, L"G"); }
wcscat_s(buffer, TEXT("|"));
wcscat_s(buffer, L"|");
wcscat_s(buffer, (TCHAR*)lParam);
int FindResult = static_cast<int32_t>(SendMessage(BGHS[SelfIndex].hlist1, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(buffer)));

View File

@ -30,7 +30,7 @@ void BabyGridWrapper::init(HINSTANCE hInst, HWND parent, int16_t id)
_hSelf = ::CreateWindowEx(0,
babyGridClassName,
TEXT(""),
L"",
WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
_hParent,

View File

@ -26,7 +26,7 @@ IDD_SHORTCUTMAPPER_DLG DIALOGEX 0, 0, 450, 353
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
WS_SYSMENU | WS_MAXIMIZEBOX | WS_THICKFRAME
CAPTION "Shortcut mapper"
FONT 8, TEXT("MS Shell Dlg"), 400, 0, 0x1
FONT 8, L"MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "",IDC_BABYGRID_TABBAR,"SysTabControl32",WS_TABSTOP,5,6,384,12
EDITTEXT IDC_BABYGRID_INFO,4,283,442,29,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP

View File

@ -114,9 +114,9 @@ void Splitter::init( HINSTANCE hInst, HWND hPere, int splitterSize, double iSpli
wcex.hCursor = ::LoadCursor(NULL, IDC_ARROW);
// if fixed spliter then choose default cursor type.
if (_dwFlags & SV_HORIZONTAL)
wcex.lpszClassName = TEXT("fxdnsspliter");
wcex.lpszClassName = L"fxdnsspliter";
else
wcex.lpszClassName = TEXT("fxdwespliter");
wcex.lpszClassName = L"fxdwespliter";
}
else
{
@ -124,13 +124,13 @@ void Splitter::init( HINSTANCE hInst, HWND hPere, int splitterSize, double iSpli
{
//double sided arrow pointing north-south as cursor
wcex.hCursor = ::LoadCursor(NULL,IDC_SIZENS);
wcex.lpszClassName = TEXT("nsspliter");
wcex.lpszClassName = L"nsspliter";
}
else
{
// double sided arrow pointing east-west as cursor
wcex.hCursor = ::LoadCursor(NULL,IDC_SIZEWE);
wcex.lpszClassName = TEXT("wespliter");
wcex.lpszClassName = L"wespliter";
}
}
@ -160,7 +160,7 @@ void Splitter::init( HINSTANCE hInst, HWND hPere, int splitterSize, double iSpli
}
_hSelf = CreateWindowEx(dwExStyle, wcex.lpszClassName,
TEXT(""),
L"",
dwStyle,
_rect.left, _rect.top, _rect.right, _rect.bottom,
_hParent, NULL, _hInst, this);

View File

@ -67,7 +67,7 @@ void SplitterContainer::create(Window *pWin0, Window *pWin1, int splitterSize, S
}
_hSelf = ::CreateWindowEx(
0, SPC_CLASS_NAME, TEXT("a koi sert?"),
0, SPC_CLASS_NAME, L"a koi sert?",
WS_CHILD | WS_CLIPCHILDREN,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
_hParent, NULL, _hInst, this);
@ -245,9 +245,9 @@ LRESULT SplitterContainer::runProc(UINT message, WPARAM wParam, LPARAM lParam)
NativeLangSpeaker* nativeLangSpeaker = NppParameters::getInstance().getNativeLangSpeaker();
const generic_string textLeft =
nativeLangSpeaker->getLocalizedStrFromID("splitter-rotate-left", TEXT("Rotate to left"));
nativeLangSpeaker->getLocalizedStrFromID("splitter-rotate-left", L"Rotate to left");
const generic_string textRight =
nativeLangSpeaker->getLocalizedStrFromID("splitter-rotate-right", TEXT("Rotate to right"));
nativeLangSpeaker->getLocalizedStrFromID("splitter-rotate-right", L"Rotate to right");
::InsertMenu(_hPopupMenu, 1, MF_BYPOSITION, ROTATION_LEFT, textLeft.c_str());
::InsertMenu(_hPopupMenu, 0, MF_BYPOSITION, ROTATION_RIGHT, textRight.c_str());

View File

@ -18,7 +18,7 @@
#include "menuCmdID.h"
#define SPC_CLASS_NAME TEXT("splitterContainer")
#define SPC_CLASS_NAME L"splitterContainer"
#define ROTATION_LEFT 2000
#define ROTATION_RIGHT 2001

View File

@ -28,7 +28,7 @@ IDD_RUN_DLG DIALOGEX 0, 0, 186, 80
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Run..."
FONT 8, TEXT("MS Shell Dlg"), 400, 0, 0x1
FONT 8, L"MS Shell Dlg", 400, 0, 0x1
BEGIN
GROUPBOX "The &Program to Run",IDC_MAINTEXT_STATIC,7,6,172,48,BS_CENTER
COMBOBOX IDC_COMBO_RUN_PATH,14,26,138,71,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP

View File

@ -27,7 +27,7 @@ struct DlgInfo
generic_string _name;
generic_string _internalName;
DlgInfo(Window *dlg, const TCHAR *name, const TCHAR *internalName = TEXT("")): _dlg(dlg), _name(name), _internalName(internalName) {};
DlgInfo(Window *dlg, const TCHAR *name, const TCHAR *internalName = L""): _dlg(dlg), _name(name), _internalName(internalName) {};
};
typedef std::vector<DlgInfo> WindowVector;

View File

@ -1145,7 +1145,7 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT *pDrawItemStruct, bool isDarkMode)
int nTab = pDrawItemStruct->itemID;
if (nTab < 0)
{
::MessageBox(NULL, TEXT("nTab < 0"), L"", MB_OK);
::MessageBox(NULL, L"nTab < 0", L"", MB_OK);
}
bool isSelected = (nTab == ::SendMessage(_hSelf, TCM_GETCURSEL, 0, 0));
@ -1157,7 +1157,7 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT *pDrawItemStruct, bool isDarkMode)
if (!::SendMessage(_hSelf, TCM_GETITEM, nTab, reinterpret_cast<LPARAM>(&tci)))
{
std::wstring errorMessageTitle = TEXT("TabBarPlus::drawItem wrong: ! TCM_GETITEM");
std::wstring errorMessageTitle = L"TabBarPlus::drawItem wrong: ! TCM_GETITEM";
std::wstring errorMessage = GetLastErrorAsString(GetLastError());
::MessageBox(NULL, errorMessage.c_str(), errorMessageTitle.c_str(), MB_OK);
}

View File

@ -43,10 +43,10 @@
const int marge = 8;
const int nbCtrlMax = 10;
const TCHAR TABBAR_ACTIVEFOCUSEDINDCATOR[64] = TEXT("Active tab focused indicator");
const TCHAR TABBAR_ACTIVEUNFOCUSEDINDCATOR[64] = TEXT("Active tab unfocused indicator");
const TCHAR TABBAR_ACTIVETEXT[64] = TEXT("Active tab text");
const TCHAR TABBAR_INACTIVETEXT[64] = TEXT("Inactive tabs");
const TCHAR TABBAR_ACTIVEFOCUSEDINDCATOR[64] = L"Active tab focused indicator";
const TCHAR TABBAR_ACTIVEUNFOCUSEDINDCATOR[64] = L"Active tab unfocused indicator";
const TCHAR TABBAR_ACTIVETEXT[64] = L"Active tab text";
const TCHAR TABBAR_INACTIVETEXT[64] = L"Inactive tabs";
constexpr int g_TabIconSize = 16;
constexpr int g_TabHeight = 22;

View File

@ -42,7 +42,7 @@ void TaskList::init(HINSTANCE hInst, HWND parent, HIMAGELIST hImaLst, int nbItem
| LVS_SHAREIMAGELISTS/* | WS_BORDER*/;
_hSelf = ::CreateWindow(WC_LISTVIEW,
TEXT(""),
L"",
WS_CHILD | listViewStyles,
0,
0,
@ -94,7 +94,7 @@ RECT TaskList::adjustSize()
RECT rc{};
ListView_GetItemRect(_hSelf, 0, &rc, LVIR_ICON);
const int imgWidth = rc.right - rc.left;
const int aSpaceWidth = ListView_GetStringWidth(_hSelf, TEXT(" "));
const int aSpaceWidth = ListView_GetStringWidth(_hSelf, L" ");
const int paddedBorder = ::GetSystemMetrics(SM_CXPADDEDBORDER);
const int leftMarge = (::GetSystemMetrics(SM_CXFRAME) + paddedBorder) * 2 + aSpaceWidth * 4;

View File

@ -80,7 +80,7 @@ intptr_t CALLBACK TaskListDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM l
i2set = 0;
_taskList.init(_hInst, _hSelf, _hImalist, nbTotal, i2set);
_taskList.setFont(TEXT("Verdana"), NppParameters::getInstance()._dpiManager.scaleY(14));
_taskList.setFont(L"Verdana", NppParameters::getInstance()._dpiManager.scaleY(14));
_rc = _taskList.adjustSize();
reSizeTo(_rc);
@ -203,7 +203,7 @@ void TaskListDlg::drawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
const TCHAR *label = _taskListInfo._tlfsLst[nItem]._fn.c_str();
int iImage = _taskListInfo._tlfsLst[nItem]._status;
const int aSpaceWidth = ListView_GetStringWidth(_taskList.getHSelf(), TEXT(" "));
const int aSpaceWidth = ListView_GetStringWidth(_taskList.getHSelf(), L" ");
COLORREF textColor = NppDarkMode::isEnabled() ? NppDarkMode::getDarkerTextColor() : darkGrey;
int imgStyle = ILD_SELECTED;

View File

@ -20,7 +20,7 @@
IDD_TASKLIST_DLG DIALOGEX DISCARDABLE 0, 0, 300, 300
STYLE WS_POPUP | WS_VISIBLE | WS_THICKFRAME
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x1
FONT 8, L"MS Shell Dlg", 0, 0, 0x1
BEGIN
END

View File

@ -27,7 +27,7 @@ trayIconControler::trayIconControler(HWND hwnd, UINT uID, UINT uCBMsg, HICON hic
_nid.hIcon = hicon;
wcscpy_s(_nid.szTip, tip);
::RegisterWindowMessage(TEXT("TaskbarCreated"));
::RegisterWindowMessage(L"TaskbarCreated");
_isIconShowed = false;
}

View File

@ -21,7 +21,7 @@
#include "VerticalFileSwitcher_rc.h"
#include "VerticalFileSwitcherListView.h"
#define FS_PROJECTPANELTITLE TEXT("Document List")
#define FS_PROJECTPANELTITLE L"Document List"
struct sortCompareData {
HWND hListView = nullptr;

View File

@ -20,7 +20,7 @@ inline static DWORD GetExStyle(HWND hWnd) {
return (DWORD)GetWindowLongPtr(hWnd, GWL_EXSTYLE);
}
const UINT WM_WINMGR = RegisterWindowMessage(TEXT("WM_WINMGR"));
const UINT WM_WINMGR = RegisterWindowMessage(L"WM_WINMGR");
CWinMgr::CWinMgr(WINRECT* pWinMap) : m_map(pWinMap)
{

View File

@ -42,8 +42,8 @@ using namespace std;
#define WD_MENUCOPYNAME "MenuCopyName"
#define WD_MENUCOPYPATH "MenuCopyPath"
static const TCHAR *readonlyString = TEXT(" [Read Only]");
const UINT WDN_NOTIFY = RegisterWindowMessage(TEXT("WDN_NOTIFY"));
static const TCHAR *readonlyString = L" [Read Only]";
const UINT WDN_NOTIFY = RegisterWindowMessage(L"WDN_NOTIFY");
/*
inline static DWORD GetStyle(HWND hWnd) {
return (DWORD)GetWindowLongPtr(hWnd, GWL_STYLE);
@ -489,8 +489,8 @@ intptr_t CALLBACK WindowsDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
NativeLangSpeaker* pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
const std::vector<MenuItemUnit> itemUnitArray
{
{IDM_WINDOW_COPY_NAME, pNativeSpeaker->getAttrNameStr(TEXT("Copy Name(s)"), WD_ROOTNODE, WD_MENUCOPYNAME)},
{IDM_WINDOW_COPY_PATH, pNativeSpeaker->getAttrNameStr(TEXT("Copy Pathname(s)"), WD_ROOTNODE, WD_MENUCOPYPATH)}
{IDM_WINDOW_COPY_NAME, pNativeSpeaker->getAttrNameStr(L"Copy Name(s)", WD_ROOTNODE, WD_MENUCOPYNAME)},
{IDM_WINDOW_COPY_PATH, pNativeSpeaker->getAttrNameStr(L"Copy Pathname(s)", WD_ROOTNODE, WD_MENUCOPYPATH)}
};
_listMenu.create(_hSelf, itemUnitArray);
}
@ -601,23 +601,23 @@ BOOL WindowsDlg::onInitDialog()
generic_string columnText;
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
columnText = TEXT("") + pNativeSpeaker->getAttrNameStr(L"Name", WD_ROOTNODE, WD_CLMNNAME);
columnText = L"" + pNativeSpeaker->getAttrNameStr(L"Name", WD_ROOTNODE, WD_CLMNNAME);
lvColumn.pszText = const_cast<TCHAR *>(columnText.c_str());
lvColumn.cx = width / 4;
SendMessage(_hList, LVM_INSERTCOLUMN, 0, LPARAM(&lvColumn));
columnText = TEXT("") + pNativeSpeaker->getAttrNameStr(L"Path", WD_ROOTNODE, WD_CLMNPATH);
columnText = L"" + pNativeSpeaker->getAttrNameStr(L"Path", WD_ROOTNODE, WD_CLMNPATH);
lvColumn.pszText = const_cast<TCHAR *>(columnText.c_str());
lvColumn.cx = 300;
SendMessage(_hList, LVM_INSERTCOLUMN, 1, LPARAM(&lvColumn));
lvColumn.fmt = LVCFMT_CENTER;
columnText = TEXT("") + pNativeSpeaker->getAttrNameStr(L"Type", WD_ROOTNODE, WD_CLMNTYPE);
columnText = L"" + pNativeSpeaker->getAttrNameStr(L"Type", WD_ROOTNODE, WD_CLMNTYPE);
lvColumn.pszText = const_cast<TCHAR *>(columnText.c_str());
lvColumn.cx = 100;
SendMessage(_hList, LVM_INSERTCOLUMN, 2, LPARAM(&lvColumn));
columnText = TEXT("") + pNativeSpeaker->getAttrNameStr(L"Size", WD_ROOTNODE, WD_CLMNSIZE);
columnText = L"" + pNativeSpeaker->getAttrNameStr(L"Size", WD_ROOTNODE, WD_CLMNSIZE);
lvColumn.pszText = const_cast<TCHAR *>(columnText.c_str());
lvColumn.cx = 100;
SendMessage(_hList, LVM_INSERTCOLUMN, 3, LPARAM(&lvColumn));
@ -650,15 +650,15 @@ void WindowsDlg::updateColumnNames()
columnText = pNativeSpeaker->getAttrNameStr(L"Name", WD_ROOTNODE, WD_CLMNNAME);
if (_currentColumn != 0)
{
columnText = TEXT("") + columnText;
columnText = L"" + columnText;
}
else if (_reverseSort)
{
columnText = TEXT("") + columnText;
columnText = L"" + columnText;
}
else
{
columnText = TEXT("") + columnText;
columnText = L"" + columnText;
}
lvColumn.pszText = const_cast<TCHAR *>(columnText.c_str());
lvColumn.cx = static_cast<int>(SendMessage(_hList, LVM_GETCOLUMNWIDTH, 0, 0));
@ -667,15 +667,15 @@ void WindowsDlg::updateColumnNames()
columnText = pNativeSpeaker->getAttrNameStr(L"Path", WD_ROOTNODE, WD_CLMNPATH);
if (_currentColumn != 1)
{
columnText = TEXT("") + columnText;
columnText = L"" + columnText;
}
else if (_reverseSort)
{
columnText = TEXT("") + columnText;
columnText = L"" + columnText;
}
else
{
columnText = TEXT("") + columnText;
columnText = L"" + columnText;
}
lvColumn.pszText = const_cast<TCHAR *>(columnText.c_str());
lvColumn.cx = static_cast<int>(SendMessage(_hList, LVM_GETCOLUMNWIDTH, 1, 0));
@ -685,15 +685,15 @@ void WindowsDlg::updateColumnNames()
columnText = pNativeSpeaker->getAttrNameStr(L"Type", WD_ROOTNODE, WD_CLMNTYPE);
if (_currentColumn != 2)
{
columnText = TEXT("") + columnText;
columnText = L"" + columnText;
}
else if (_reverseSort)
{
columnText = TEXT("") + columnText;
columnText = L"" + columnText;
}
else
{
columnText = TEXT("") + columnText;
columnText = L"" + columnText;
}
lvColumn.pszText = const_cast<TCHAR *>(columnText.c_str());
lvColumn.cx = static_cast<int>(SendMessage(_hList, LVM_GETCOLUMNWIDTH, 2, 0));
@ -702,15 +702,15 @@ void WindowsDlg::updateColumnNames()
columnText = pNativeSpeaker->getAttrNameStr(L"Size", WD_ROOTNODE, WD_CLMNSIZE);
if (_currentColumn != 3)
{
columnText = TEXT("") + columnText;
columnText = L"" + columnText;
}
else if (_reverseSort)
{
columnText = TEXT("") + columnText;
columnText = L"" + columnText;
}
else
{
columnText = TEXT("") + columnText;
columnText = L"" + columnText;
}
lvColumn.pszText = const_cast<TCHAR *>(columnText.c_str());
lvColumn.cx = static_cast<int>(SendMessage(_hList, LVM_GETCOLUMNWIDTH, 3, 0));

View File

@ -21,9 +21,9 @@
IDD_WINDOWS DIALOGEX 0, 0, 450, 300
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | DS_MODALFRAME
CAPTION "Windows"
FONT 8, TEXT("MS Shell Dlg"), 400, 0, 0x1
FONT 8, L"MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "", IDC_WINDOWS_LIST, TEXT("SysListView32"), LVS_REPORT | LVS_OWNERDATA | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP, 7, 7, 206, 160
CONTROL "", IDC_WINDOWS_LIST, L"SysListView32", LVS_REPORT | LVS_OWNERDATA | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP, 7, 7, 206, 160
DEFPUSHBUTTON "&Activate",IDOK,219,7,60,14
PUSHBUTTON "&Save",IDC_WINDOWS_SAVE,219,26,60,14
PUSHBUTTON "&Close window(s)",IDC_WINDOWS_CLOSE,219,44,60,14

View File

@ -31,7 +31,7 @@ void RunMacroDlg::initMacroList()
::SendDlgItemMessage(_hSelf, IDC_MACRO_COMBO, CB_RESETCONTENT, 0, 0);
if (static_cast<MacroStatus>(::SendMessage(_hParent, NPPM_GETCURRENTMACROSTATUS, 0, 0)) == MacroStatus::RecordingStopped)
::SendDlgItemMessage(_hSelf, IDC_MACRO_COMBO, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(TEXT("Current recorded macro")));
::SendDlgItemMessage(_hSelf, IDC_MACRO_COMBO, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(L"Current recorded macro"));
for (size_t i = 0, len = macroList.size(); i < len ; ++i)
::SendDlgItemMessage(_hSelf, IDC_MACRO_COMBO, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(string2wstring(macroList[i].getName(), CP_UTF8).c_str()));

View File

@ -23,7 +23,7 @@ IDD_RUN_MACRO_DLG DIALOGEX 0, 0, 168, 95
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Run a Macro Multiple Times"
FONT 8, TEXT("MS Shell Dlg"), 400, 0, 0x1
FONT 8, L"MS Shell Dlg", 400, 0, 0x1
BEGIN
GROUPBOX "&Macro to run",IDC_MACRO2RUN_STATIC,7,3,154,30,BS_CENTER
COMBOBOX IDC_MACRO_COMBO,14,14,140,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP

View File

@ -999,7 +999,7 @@ void ScintillaAccelerator::updateMenuItemByID(const ScintillaKeyMap& skm, int id
generic_string menuItem = cmdName;
if (skm.isEnabled())
{
menuItem += TEXT("\t");
menuItem += L"\t";
menuItem += string2wstring(skm.toString(), CP_UTF8);
}
::ModifyMenu(_hAccelMenu, id, MF_BYCOMMAND, id, menuItem.c_str());

View File

@ -26,7 +26,7 @@ IDD_SHORTCUT_DLG DIALOGEX 0, 0, 180, 97
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Shortcut"
FONT 8, TEXT("MS Shell Dlg"), 400, 0, 0x1
FONT 8, L"MS Shell Dlg", 400, 0, 0x1
BEGIN
RTEXT "&Name:",IDC_NAME_STATIC,10,9,43,8
EDITTEXT IDC_NAME_EDIT,56,8,118,12,ES_AUTOHSCROLL
@ -46,7 +46,7 @@ IDD_SHORTCUTSCINT_DLG DIALOGEX 0, 0, 282, 115
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Shortcut"
FONT 8, TEXT("MS Shell Dlg"), 400, 0, 0x1
FONT 8, L"MS Shell Dlg", 400, 0, 0x1
BEGIN
RTEXT "&Name:",IDC_NAME_STATIC,111,9,43,8
EDITTEXT IDC_NAME_EDIT,158,8,118,12,ES_AUTOHSCROLL | ES_READONLY

View File

@ -19,13 +19,13 @@
//
// Notepad++ version: begin
//
#define NOTEPAD_PLUS_VERSION TEXT("Notepad++ v8.6.9")
#define NOTEPAD_PLUS_VERSION L"Notepad++ v8.6.9"
// should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71
// ex : #define VERSION_VALUE TEXT("5.63\0")
#define VERSION_INTERNAL_VALUE TEXT("8.69\0")
// ex : #define VERSION_VALUE L"5.63\0"
#define VERSION_INTERNAL_VALUE L"8.69\0"
#define VERSION_PRODUCT_VALUE TEXT("8.6.9\0")
#define VERSION_PRODUCT_VALUE L"8.6.9\0"
#define VERSION_DIGITALVALUE 8, 6, 9, 0
// Notepad++ version: end