From fda7962d029672a5f4c718a3c6b2559856f4cd95 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 10 Jul 2003 08:36:14 +0000 Subject: [PATCH] Applied patch [ 761138 ] Replaces references to wxT("") and _T("") with wxEmptyString git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/cmdproc.h | 2 +- include/wx/ffile.h | 2 +- include/wx/fileconf.h | 8 ++++---- include/wx/filename.h | 4 ++-- include/wx/fontenum.h | 2 +- include/wx/helpbase.h | 2 +- include/wx/image.h | 2 +- include/wx/log.h | 2 +- include/wx/mimetype.h | 2 +- include/wx/msw/regconf.h | 8 ++++---- src/msw/app.cpp | 4 ++-- src/msw/bmpbuttn.cpp | 2 +- src/msw/combobox.cpp | 2 +- src/msw/dcprint.cpp | 2 +- src/msw/filedlg.cpp | 2 +- src/msw/font.cpp | 4 ++-- src/msw/iniconf.cpp | 2 +- src/msw/listctrl.cpp | 2 +- src/msw/metafile.cpp | 4 ++-- src/msw/mimetype.cpp | 34 +++++++++++++++++----------------- src/msw/notebook.cpp | 4 ++-- src/msw/ole/dataobj.cpp | 2 +- src/msw/radiobox.cpp | 2 +- src/msw/regconf.cpp | 4 ++-- src/msw/registry.cpp | 4 ++-- src/msw/slider95.cpp | 4 ++-- src/msw/slidrmsw.cpp | 2 +- src/msw/statbmp.cpp | 2 +- src/msw/statline.cpp | 2 +- src/msw/tabctrl.cpp | 6 +++--- src/msw/tbar95.cpp | 2 +- src/msw/textctrl.cpp | 4 ++-- src/msw/toplevel.cpp | 2 +- src/msw/utils.cpp | 2 +- src/msw/utilsexc.cpp | 2 +- src/msw/utilsgui.cpp | 4 ++-- src/msw/window.cpp | 2 +- 37 files changed, 71 insertions(+), 71 deletions(-) diff --git a/include/wx/cmdproc.h b/include/wx/cmdproc.h index 13523e077e..d630a15224 100644 --- a/include/wx/cmdproc.h +++ b/include/wx/cmdproc.h @@ -28,7 +28,7 @@ class WXDLLEXPORT wxMenu; class WXDLLEXPORT wxCommand : public wxObject { public: - wxCommand(bool canUndoIt = FALSE, const wxString& name = wxT("")); + wxCommand(bool canUndoIt = FALSE, const wxString& name = wxEmptyString); ~wxCommand(); // Override this to perform a command diff --git a/include/wx/ffile.h b/include/wx/ffile.h index 75d546e055..9e8067b9e2 100644 --- a/include/wx/ffile.h +++ b/include/wx/ffile.h @@ -53,7 +53,7 @@ public: bool Close(); // assign an existing file descriptor and get it back from wxFFile object - void Attach(FILE *fp, const wxString& name = wxT("")) + void Attach(FILE *fp, const wxString& name = wxEmptyString) { Close(); m_fp = fp; m_name = name; } void Detach() { m_fp = NULL; } FILE *fp() const { return m_fp; } diff --git a/include/wx/fileconf.h b/include/wx/fileconf.h index d366ceb4f3..b00ac59e49 100644 --- a/include/wx/fileconf.h +++ b/include/wx/fileconf.h @@ -116,10 +116,10 @@ public: // ctor & dtor // New constructor: one size fits all. Specify wxCONFIG_USE_LOCAL_FILE or // wxCONFIG_USE_GLOBAL_FILE to say which files should be used. - wxFileConfig(const wxString& appName = wxT(""), - const wxString& vendorName = wxT(""), - const wxString& localFilename = wxT(""), - const wxString& globalFilename = wxT(""), + wxFileConfig(const wxString& appName = wxEmptyString, + const wxString& vendorName = wxEmptyString, + const wxString& localFilename = wxEmptyString, + const wxString& globalFilename = wxEmptyString, long style = wxCONFIG_USE_LOCAL_FILE, wxMBConv& conv = wxConvUTF8); diff --git a/include/wx/filename.h b/include/wx/filename.h index d024415ac2..4db46c5b38 100644 --- a/include/wx/filename.h +++ b/include/wx/filename.h @@ -150,7 +150,7 @@ public: wxPathFormat format = wxPATH_NATIVE) { // empty volume - Assign(_T(""), path, name, ext, format); + Assign(wxEmptyString, path, name, ext, format); } void AssignDir(const wxString& dir, wxPathFormat format = wxPATH_NATIVE); @@ -270,7 +270,7 @@ public: // returns TRUE if the file name was modified, FALSE if we failed to do // anything with it (happens when the file is on a different volume, // for example) - bool MakeRelativeTo(const wxString& pathBase = _T(""), + bool MakeRelativeTo(const wxString& pathBase = wxEmptyString, wxPathFormat format = wxPATH_NATIVE); // make the path absolute diff --git a/include/wx/fontenum.h b/include/wx/fontenum.h index 69829484e2..2412f25c46 100644 --- a/include/wx/fontenum.h +++ b/include/wx/fontenum.h @@ -43,7 +43,7 @@ public: // enumerate the different encodings either for given font facename or for // all facenames - will result in OnFontEncoding() being called for each // available (facename, encoding) couple - virtual bool EnumerateEncodings(const wxString& facename = wxT("")); + virtual bool EnumerateEncodings(const wxString& facename = wxEmptyString); // callbacks which are called after one of EnumerateXXX() functions from // above is invoked - all of them may return FALSE to stop enumeration or diff --git a/include/wx/helpbase.h b/include/wx/helpbase.h index aa12d0dc5f..2dad25c4e8 100644 --- a/include/wx/helpbase.h +++ b/include/wx/helpbase.h @@ -45,7 +45,7 @@ public: virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {} // If file is "", reloads file given in Initialize - virtual bool LoadFile(const wxString& file = wxT("")) = 0; + virtual bool LoadFile(const wxString& file = wxEmptyString) = 0; // Displays the contents virtual bool DisplayContents(void) = 0; diff --git a/include/wx/image.h b/include/wx/image.h index 1d30b7a8f1..0d8f947e3c 100644 --- a/include/wx/image.h +++ b/include/wx/image.h @@ -51,7 +51,7 @@ class WXDLLEXPORT wxImageHandler: public wxObject { public: wxImageHandler() - : m_name(wxT("")), m_extension(wxT("")), m_mime(), m_type(0) + : m_name(wxEmptyString), m_extension(wxEmptyString), m_mime(), m_type(0) { } #if wxUSE_STREAMS diff --git a/include/wx/log.h b/include/wx/log.h index 472d6776a8..74d1684ef9 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -448,7 +448,7 @@ public: #define wxSysErrorMsg( X ) (const wxChar*)NULL // Fake symbolic trace masks... for those that are used frequently -#define wxTRACE_OleCalls wxT("") // OLE interface calls +#define wxTRACE_OleCalls wxEmptyString // OLE interface calls #endif // wxUSE_LOG/!wxUSE_LOG diff --git a/include/wx/mimetype.h b/include/wx/mimetype.h index f332faf641..59071d6d30 100644 --- a/include/wx/mimetype.h +++ b/include/wx/mimetype.h @@ -178,7 +178,7 @@ public: // ctors MessageParameters() { } MessageParameters(const wxString& filename, - const wxString& mimetype = _T("")) + const wxString& mimetype = wxEmptyString) : m_filename(filename), m_mimetype(mimetype) { } // accessors (called by GetOpenCommand) diff --git a/include/wx/msw/regconf.h b/include/wx/msw/regconf.h index 3a1bca89a1..f34b265170 100644 --- a/include/wx/msw/regconf.h +++ b/include/wx/msw/regconf.h @@ -30,10 +30,10 @@ class WXDLLIMPEXP_BASE wxRegConfig : public wxConfigBase public: // ctor & dtor // will store data in HKLM\appName and HKCU\appName - wxRegConfig(const wxString& appName = _T(""), - const wxString& vendorName = _T(""), - const wxString& localFilename = _T(""), - const wxString& globalFilename = _T(""), + wxRegConfig(const wxString& appName = wxEmptyString, + const wxString& vendorName = wxEmptyString, + const wxString& localFilename = wxEmptyString, + const wxString& globalFilename = wxEmptyString, long style = 0); // dtor will save unsaved data diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 4e58a0bba6..ebacad3d1b 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -189,8 +189,8 @@ void *wxGUIAppTraits::BeforeChildWaitLoop() wxWindow *winActive = new wxFrame ( wxTheApp->GetTopWindow(), - -1, - _T(""), + wxID_ANY, + wxEmptyString, wxPoint(32600, 32600), wxSize(1, 1), wxDEFAULT_FRAME_STYLE | wxFRAME_NO_TASKBAR diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index 3ed26799e4..f150ee844b 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -95,7 +95,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit ( 0, wxT("BUTTON"), - wxT(""), + wxEmptyString, msStyle, 0, 0, 0, 0, GetWinHwnd(parent), diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index cb069d9cfd..f7c9e312e5 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -410,7 +410,7 @@ void wxComboBox::SetInsertionPoint(long pos) // Scroll insertion point into view SendMessage(hEditWnd, EM_SCROLLCARET, (WPARAM)0, (LPARAM)0); // Why is this necessary? (Copied from wxTextCtrl::SetInsertionPoint) - SendMessage(hEditWnd, EM_REPLACESEL, 0, (LPARAM)_T("")); + SendMessage(hEditWnd, EM_REPLACESEL, 0, (LPARAM) wxEmptyString); } #endif // __WIN32__ } diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index c0e90e3d2c..51f6c9c01e 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -276,7 +276,7 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName) GlobalFree(pd.hDevMode); pd.hDevMode=NULL; } - return ( deviceName != wxT("") ); + return ( deviceName != wxEmptyString ); } // Gets an HDC for the specified printer configuration diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index 13ee874b53..27d08e5447 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -99,7 +99,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, if ( ( m_dialogStyle & wxMULTIPLE ) && ( m_dialogStyle & wxSAVE ) ) m_dialogStyle &= ~wxMULTIPLE; m_parent = parent; - m_path = wxT(""); + m_path = wxEmptyString; m_fileName = defaultFileName; m_dir = defaultDir; m_wildCard = wildCard; diff --git a/src/msw/font.cpp b/src/msw/font.cpp index f29b9a4aea..db290f0362 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -64,7 +64,7 @@ public: wxFontRefData() { Init(-1, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, - FALSE, _T(""), wxFONTENCODING_DEFAULT); + FALSE, wxEmptyString, wxFONTENCODING_DEFAULT); } wxFontRefData(int size, @@ -891,7 +891,7 @@ bool wxFont::GetUnderlined() const wxString wxFont::GetFaceName() const { - wxCHECK_MSG( Ok(), wxT(""), wxT("invalid font") ); + wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") ); return M_FONTDATA->GetFaceName(); } diff --git a/src/msw/iniconf.cpp b/src/msw/iniconf.cpp index 1ab07f3183..e03824cc3f 100644 --- a/src/msw/iniconf.cpp +++ b/src/msw/iniconf.cpp @@ -95,7 +95,7 @@ wxIniConfig::wxIniConfig(const wxString& strAppName, } // set root path - SetPath(wxT("")); + SetPath(wxEmptyString); } wxIniConfig::~wxIniConfig() diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index b009824380..c459899173 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -313,7 +313,7 @@ bool wxListCtrl::DoCreateControl(int x, int y, int w, int h) // Create the ListView control. m_hWnd = (WXHWND)CreateWindowEx(exStyle, WC_LISTVIEW, - wxT(""), + wxEmptyString, wstyle, x, y, w, h, GetWinHwnd(GetParent()), diff --git a/src/msw/metafile.cpp b/src/msw/metafile.cpp index 4f46aed04a..d9242661f8 100644 --- a/src/msw/metafile.cpp +++ b/src/msw/metafile.cpp @@ -94,7 +94,7 @@ wxMetafile::wxMetafile(const wxString& file) M_METAFILEDATA->m_windowsMappingMode = wxMM_ANISOTROPIC; M_METAFILEDATA->m_metafile = 0; - if (!file.IsNull() && (file.Cmp(wxT("")) == 0)) + if (!file.IsNull() && (file.Cmp(wxEmptyString) == 0)) M_METAFILEDATA->m_metafile = (WXHANDLE) GetMetaFile(file); } @@ -180,7 +180,7 @@ wxMetafileDC::wxMetafileDC(const wxString& file) if (!file.IsNull() && wxFileExists(file)) wxRemoveFile(file); - if (!file.IsNull() && (file != wxT(""))) + if (!file.IsNull() && (file != wxEmptyString)) m_hDC = (WXHDC) CreateMetaFile(file); else m_hDC = (WXHDC) CreateMetaFile(NULL); diff --git a/src/msw/mimetype.cpp b/src/msw/mimetype.cpp index 8e663b816b..01e5968316 100644 --- a/src/msw/mimetype.cpp +++ b/src/msw/mimetype.cpp @@ -111,7 +111,7 @@ size_t wxFileTypeImpl::GetAllCommands(wxArrayString *verbs, // get it from the registry wxFileTypeImpl *self = wxConstCast(this, wxFileTypeImpl); wxRegKey rkey(wxRegKey::HKCR, m_ext); - if ( !rkey.Exists() || !rkey.QueryValue(_T(""), self->m_strFileType) ) + if ( !rkey.Exists() || !rkey.QueryValue(wxEmptyString, self->m_strFileType) ) { wxLogDebug(_T("Can't get the filetype for extension '%s'."), m_ext.c_str()); @@ -164,7 +164,7 @@ bool wxFileTypeImpl::EnsureExtKeyExists() wxRegKey rkey(wxRegKey::HKCR, m_ext); if ( !rkey.Exists() ) { - if ( !rkey.Create() || !rkey.SetValue(_T(""), m_strFileType) ) + if ( !rkey.Create() || !rkey.SetValue(wxEmptyString, m_strFileType) ) { wxLogError(_("Failed to create registry entry for '%s' files."), m_ext.c_str()); @@ -201,7 +201,7 @@ wxString wxFileTypeImpl::GetCommand(const wxChar *verb) const wxString command; if ( key.Open() ) { // it's the default value of the key - if ( key.QueryValue(wxT(""), command) ) { + if ( key.QueryValue(wxEmptyString, command) ) { // transform it from '%1' to '%s' style format string (now also // test for %L - apparently MS started using it as well for the // same purpose) @@ -230,13 +230,13 @@ wxString wxFileTypeImpl::GetCommand(const wxChar *verb) const wxRegKey keyDDE(wxRegKey::HKCR, strKey); if ( keyDDE.Open() ) { wxString ddeCommand, ddeServer, ddeTopic; - keyDDE.QueryValue(_T(""), ddeCommand); + keyDDE.QueryValue(wxEmptyString, ddeCommand); ddeCommand.Replace(_T("%1"), _T("%s")); wxRegKey(wxRegKey::HKCR, strKey + _T("\\Application")). - QueryValue(_T(""), ddeServer); + QueryValue(wxEmptyString, ddeServer); wxRegKey(wxRegKey::HKCR, strKey + _T("\\Topic")). - QueryValue(_T(""), ddeTopic); + QueryValue(wxEmptyString, ddeTopic); if (ddeTopic.IsEmpty()) ddeTopic = wxT("System"); @@ -347,7 +347,7 @@ bool wxFileTypeImpl::GetIcon(wxIconLocation *iconLoc) const if ( key.Open() ) { wxString strIcon; // it's the default value of the key - if ( key.QueryValue(wxT(""), strIcon) ) { + if ( key.QueryValue(wxEmptyString, strIcon) ) { // the format is the following: , // NB: icon index may be negative as well as positive and the full // path may contain the environment variables inside '%' @@ -384,7 +384,7 @@ bool wxFileTypeImpl::GetDescription(wxString *desc) const if ( key.Open() ) { // it's the default value of the key - if ( key.QueryValue(wxT(""), *desc) ) { + if ( key.QueryValue(wxEmptyString, *desc) ) { return TRUE; } } @@ -421,7 +421,7 @@ wxMimeTypesManagerImpl::GetFileTypeFromExtension(const wxString& ext) wxRegKey key(wxRegKey::HKCR, str); if ( key.Open() ) { // it's the default value of the key - if ( key.QueryValue(wxT(""), strFileType) ) { + if ( key.QueryValue(wxEmptyString, strFileType) ) { // create the new wxFileType object return CreateFileType(strFileType, ext); } @@ -542,7 +542,7 @@ wxFileType *wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo) filetype = filetypeOrig; } - ok = key.SetValue(_T(""), filetype); + ok = key.SetValue(wxEmptyString, filetype); } } else @@ -551,11 +551,11 @@ wxFileType *wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo) if (!filetypeOrig.empty()) { filetype = filetypeOrig; - ok = key.SetValue(_T(""), filetype); + ok = key.SetValue(wxEmptyString, filetype); } else { - ok = key.QueryValue(_T(""), filetype); + ok = key.QueryValue(wxEmptyString, filetype); } } // now set a mimetypeif we have it, but ignore it if none @@ -593,7 +593,7 @@ wxFileType *wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo) wxRegKey key(wxRegKey::HKCR, extWithDot); if ( !key.Exists() ) ok = key.Create(); - ok = key.SetValue(_T(""), filetype); + ok = key.SetValue(wxEmptyString, filetype); // now set any mimetypes we may have, but ignore it if none const wxString& mimetype = ftInfo.GetMimeType(); @@ -657,7 +657,7 @@ bool wxFileTypeImpl::SetCommand(const wxString& cmd, { #if wxUSE_GUI wxString old; - rkey.QueryValue(wxT(""), old); + rkey.QueryValue(wxEmptyString, old); if ( wxMessageBox ( wxString::Format( @@ -681,7 +681,7 @@ bool wxFileTypeImpl::SetCommand(const wxString& cmd, // TODO: // 1. translate '%s' to '%1' instead of always adding it // 2. create DDEExec value if needed (undo GetCommand) - return rkey.Create() && rkey.SetValue(_T(""), cmd + _T(" \"%1\"") ); + return rkey.Create() && rkey.SetValue(wxEmptyString, cmd + _T(" \"%1\"") ); } /* // no longer used @@ -724,7 +724,7 @@ bool wxFileTypeImpl::SetDefaultIcon(const wxString& cmd, int index) wxRegKey rkey(wxRegKey::HKCR, m_strFileType + _T("\\DefaultIcon")); return rkey.Create() && - rkey.SetValue(_T(""), + rkey.SetValue(wxEmptyString, wxString::Format(_T("%s,%d"), cmd.c_str(), index)); } @@ -739,7 +739,7 @@ bool wxFileTypeImpl::SetDescription (const wxString& desc) wxRegKey rkey(wxRegKey::HKCR, m_strFileType ); return rkey.Create() && - rkey.SetValue(_T(""), desc); + rkey.SetValue(wxEmptyString, desc); } // ---------------------------------------------------------------------------- diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 1b82f24ba1..f2b88f379e 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -175,7 +175,7 @@ bool wxNotebook::Create(wxWindow *parent, wxDefaultValidator, name) ) return FALSE; - if ( !MSWCreateControl(WC_TABCONTROL, _T(""), pos, size) ) + if ( !MSWCreateControl(WC_TABCONTROL, wxEmptyString, pos, size) ) return FALSE; SetBackgroundColour(wxColour(::GetSysColor(COLOR_BTNFACE))); @@ -265,7 +265,7 @@ bool wxNotebook::SetPageText(int nPage, const wxString& strText) wxString wxNotebook::GetPageText(int nPage) const { - wxCHECK_MSG( IS_VALID_PAGE(nPage), wxT(""), wxT("notebook page out of range") ); + wxCHECK_MSG( IS_VALID_PAGE(nPage), wxEmptyString, wxT("notebook page out of range") ); wxChar buf[256]; TC_ITEM tcItem; diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index 502137ce8f..9e7b0363d1 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -62,7 +62,7 @@ #ifdef __WXDEBUG__ static const wxChar *GetTymedName(DWORD tymed); #else // !Debug - #define GetTymedName(tymed) _T("") + #define GetTymedName(tymed) wxEmptyString #endif // Debug/!Debug // ---------------------------------------------------------------------------- diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index f565a60b86..3718821eba 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -284,7 +284,7 @@ bool wxRadioBox::Create(wxWindow *parent, // Create a dummy radio control to end the group. (void)::CreateWindow(_T("BUTTON"), - _T(""), + wxEmptyString, WS_GROUP | BS_AUTORADIOBUTTON | WS_CHILD, 0, 0, 0, 0, hwndParent, (HMENU)NewControlId(), wxGetInstance(), NULL); diff --git a/src/msw/regconf.cpp b/src/msw/regconf.cpp index 050ef4646f..07af68b3a0 100644 --- a/src/msw/regconf.cpp +++ b/src/msw/regconf.cpp @@ -124,7 +124,7 @@ wxRegConfig::wxRegConfig(const wxString& appName, const wxString& vendorName, m_keyLocal.ReserveMemoryForName(MEMORY_PREALLOC); m_keyLocalRoot.SetName(wxRegKey::HKCU, SOFTWARE_KEY + str); - m_keyLocal.SetName(m_keyLocalRoot, _T("")); + m_keyLocal.SetName(m_keyLocalRoot, wxEmptyString); if ( bDoUseGlobal ) { @@ -134,7 +134,7 @@ wxRegConfig::wxRegConfig(const wxString& appName, const wxString& vendorName, m_keyGlobal.ReserveMemoryForName(MEMORY_PREALLOC); m_keyGlobalRoot.SetName(wxRegKey::HKLM, SOFTWARE_KEY + str); - m_keyGlobal.SetName(m_keyGlobalRoot, _T("")); + m_keyGlobal.SetName(m_keyGlobalRoot, wxEmptyString); } // Create() will Open() if key already exists diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index c9111fbda5..620ff86358 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -127,7 +127,7 @@ const size_t wxRegKey::nStdKeys = WXSIZEOF(aStdKeys); const wxChar *wxRegKey::GetStdKeyName(size_t key) { // return empty string if key is invalid - wxCHECK_MSG( key < nStdKeys, wxT(""), wxT("invalid key in wxRegKey::GetStdKeyName") ); + wxCHECK_MSG( key < nStdKeys, wxEmptyString, wxT("invalid key in wxRegKey::GetStdKeyName") ); return aStdKeys[key].szName; } @@ -135,7 +135,7 @@ const wxChar *wxRegKey::GetStdKeyName(size_t key) const wxChar *wxRegKey::GetStdKeyShortName(size_t key) { // return empty string if key is invalid - wxCHECK( key < nStdKeys, wxT("") ); + wxCHECK( key < nStdKeys, wxEmptyString ); return aStdKeys[key].szShortName; } diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 6c811b81e0..3e07c77a93 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -155,7 +155,7 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, HWND scroll_bar = CreateWindowEx ( - exStyle, TRACKBAR_CLASS, wxT(""), + exStyle, TRACKBAR_CLASS, wxEmptyString, msStyle, 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, wxGetInstance(), NULL @@ -174,7 +174,7 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id, SubclassWin(GetHWND()); - ::SetWindowText((HWND) m_hWnd, wxT("")); + ::SetWindowText((HWND) m_hWnd, wxEmptyString); SetFont(parent->GetFont()); diff --git a/src/msw/slidrmsw.cpp b/src/msw/slidrmsw.cpp index 18431b2e0b..3a776160ab 100644 --- a/src/msw/slidrmsw.cpp +++ b/src/msw/slidrmsw.cpp @@ -108,7 +108,7 @@ bool wxSliderMSW::Create(wxWindow *parent, wxWindowID id, else msStyle = SBS_HORZ | WS_CHILD | WS_VISIBLE | WS_TABSTOP ; - HWND scroll_bar = CreateWindowEx(exStyle, wxT("SCROLLBAR"), wxT(""), + HWND scroll_bar = CreateWindowEx(exStyle, wxT("SCROLLBAR"), wxEmptyString, msStyle, 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)m_windowId, wxGetInstance(), NULL); diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index 84857d996f..d4a9711d9d 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -122,7 +122,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, #else // Win16 _T("BUTTON"), #endif // Win32/16 - _T(""), pos, size) ) + wxEmptyString, pos, size) ) { // control creation failed return FALSE; diff --git a/src/msw/statline.cpp b/src/msw/statline.cpp index 29ee6373e1..65906af298 100644 --- a/src/msw/statline.cpp +++ b/src/msw/statline.cpp @@ -64,7 +64,7 @@ bool wxStaticLine::Create(wxWindow *parent, if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) ) return FALSE; - return MSWCreateControl(_T("STATIC"), _T(""), pos, size); + return MSWCreateControl(_T("STATIC"), wxEmptyString, pos, size); } WXDWORD wxStaticLine::MSWGetStyle(long style, WXDWORD *exstyle) const diff --git a/src/msw/tabctrl.cpp b/src/msw/tabctrl.cpp index 251e484a37..12562fa5f7 100644 --- a/src/msw/tabctrl.cpp +++ b/src/msw/tabctrl.cpp @@ -106,7 +106,7 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons // Create the toolbar control. HWND hWndTabCtrl = CreateWindowEx(0L, // No extended styles. WC_TABCONTROL, // Class name for the tab control - wxT(""), // No default text. + wxEmptyString, // No default text. tabStyle, // Styles and defaults. x, y, width, height, // Standard size and position. (HWND) parent->GetHWND(), // Parent window @@ -237,7 +237,7 @@ int wxTabCtrl::GetRowCount() const wxString wxTabCtrl::GetItemText(int item) const { wxChar buf[256]; - wxString str(wxT("")); + wxString str(wxEmptyString); TC_ITEM tcItem; tcItem.mask = TCIF_TEXT; tcItem.pszText = buf; @@ -299,7 +299,7 @@ bool wxTabCtrl::InsertItem(int item, const wxString& text, int imageId, void* da TC_ITEM tcItem; tcItem.mask = TCIF_PARAM; tcItem.lParam = (long) data; - if (text != wxT("")) + if (text != wxEmptyString) { tcItem.mask |= TCIF_TEXT; wxStrcpy(buf, (const wxChar*) text); diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 1379da5ace..12c9613116 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -245,7 +245,7 @@ bool wxToolBar::Create(wxWindow *parent, bool wxToolBar::MSWCreateToolbar(const wxPoint& pos, const wxSize& size) { - if ( !MSWCreateControl(TOOLBARCLASSNAME, _T(""), pos, size) ) + if ( !MSWCreateControl(TOOLBARCLASSNAME, wxEmptyString, pos, size) ) return FALSE; // toolbar-specific post initialisation diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 8b901fa107..ba253ef85b 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -749,7 +749,7 @@ void wxTextCtrl::AppendText(const wxString& text) void wxTextCtrl::Clear() { - ::SetWindowText(GetHwnd(), wxT("")); + ::SetWindowText(GetHwnd(), wxEmptyString); #if wxUSE_RICHEDIT if ( !IsRich() ) @@ -1064,7 +1064,7 @@ void wxTextCtrl::Replace(long from, long to, const wxString& value) void wxTextCtrl::Remove(long from, long to) { - Replace(from, to, _T("")); + Replace(from, to, wxEmptyString); } bool wxTextCtrl::LoadFile(const wxString& file) diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index b12a323c5a..d0ae7e02c3 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -945,7 +945,7 @@ HWND wxTLWHiddenParentModule::GetHWND() } } - ms_hwnd = ::CreateWindow(ms_className, _T(""), 0, 0, 0, 0, 0, NULL, + ms_hwnd = ::CreateWindow(ms_className, wxEmptyString, 0, 0, 0, 0, 0, NULL, (HMENU)NULL, wxGetInstance(), NULL); if ( !ms_hwnd ) { diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index ce67545bdb..a036e1a10f 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -309,7 +309,7 @@ error: #else // !USE_NET_API // Could use NIS, MS-Mail or other site specific programs // Use wxWindows configuration data - bool ok = GetProfileString(WX_SECTION, eUSERNAME, wxT(""), buf, maxSize - 1) != 0; + bool ok = GetProfileString(WX_SECTION, eUSERNAME, wxEmptyString, buf, maxSize - 1) != 0; if ( !ok ) { ok = wxGetUserId(buf, maxSize); diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp index d42b1a4838..aca3e0336c 100644 --- a/src/msw/utilsexc.cpp +++ b/src/msw/utilsexc.cpp @@ -454,7 +454,7 @@ static bool wxExecuteDDE(const wxString& ddeServer, bool ok = FALSE; wxDDEClient client; - wxConnectionBase *conn = client.MakeConnection(_T(""), + wxConnectionBase *conn = client.MakeConnection(wxEmptyString, ddeServer, ddeTopic); if ( !conn ) diff --git a/src/msw/utilsgui.cpp b/src/msw/utilsgui.cpp index 7d18ec21ad..00cb07b33b 100644 --- a/src/msw/utilsgui.cpp +++ b/src/msw/utilsgui.cpp @@ -44,7 +44,7 @@ #if wxUSE_RESOURCES bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file) { - if (file != wxT("")) + if (file != wxEmptyString) // Don't know what the correct cast should be, but it doesn't // compile in BC++/16-bit without this cast. #if !defined(__WIN32__) @@ -85,7 +85,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, wxChar **valu static const wxChar defunkt[] = wxT("$$default"); wxChar buf[1024]; - if (file != wxT("")) + if (file != wxEmptyString) { int n = GetPrivateProfileString(section, entry, defunkt, buf, WXSIZEOF(buf), file); diff --git a/src/msw/window.cpp b/src/msw/window.cpp index afba07ad53..8bb2ed22f1 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -2895,7 +2895,7 @@ bool wxWindowMSW::MSWCreate(const wxChar *wclass, ( extendedStyle, className, - title ? title : wxT(""), + title ? title : wxEmptyString, style, x, y, w, h, (HWND)MSWGetParent(),