Globally replace _T() with wxT().

Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-07-23 20:30:22 +00:00
parent 32cdc45397
commit 9a83f86094
798 changed files with 10370 additions and 10349 deletions

View File

@@ -1553,7 +1553,7 @@ HBITMAP wxInvertMask(
{
HBITMAP hBmpInvMask = 0;
wxCHECK_MSG( hBmpMask, 0, _T("invalid bitmap in wxInvertMask") );
wxCHECK_MSG( hBmpMask, 0, wxT("invalid bitmap in wxInvertMask") );
//
// Get width/height from the bitmap if not given
@@ -1615,7 +1615,7 @@ HBITMAP wxInvertMask(
HBITMAP wxCopyBmp( HBITMAP hBmp, bool flip, int nWidth, int nHeight )
{
wxCHECK_MSG( hBmp, 0, _T("invalid bitmap in wxCopyBmp") );
wxCHECK_MSG( hBmp, 0, wxT("invalid bitmap in wxCopyBmp") );
//
// Get width/height from the bitmap if not given

View File

@@ -171,7 +171,7 @@ bool wxBrush::RealizeResource()
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Unable to set current color table to RGB mode. Error: %s\n"), sError.c_str());
wxLogError(wxT("Unable to set current color table to RGB mode. Error: %s\n"), sError.c_str());
return false;
}
@@ -253,7 +253,7 @@ bool wxBrush::RealizeResource()
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Can't set Gpi attributes for an AREABUNDLE. Error: %s\n"), sError.c_str());
wxLogError(wxT("Can't set Gpi attributes for an AREABUNDLE. Error: %s\n"), sError.c_str());
}
return bOk;
}
@@ -266,35 +266,35 @@ bool wxBrush::RealizeResource()
wxColour wxBrush::GetColour() const
{
wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") );
wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid brush") );
return M_BRUSHDATA->m_vColour;
}
wxBrushStyle wxBrush::GetStyle() const
{
wxCHECK_MSG( Ok(), wxBRUSHSTYLE_INVALID, _T("invalid brush") );
wxCHECK_MSG( Ok(), wxBRUSHSTYLE_INVALID, wxT("invalid brush") );
return M_BRUSHDATA->m_nStyle;
}
wxBitmap *wxBrush::GetStipple() const
{
wxCHECK_MSG( Ok(), NULL, _T("invalid brush") );
wxCHECK_MSG( Ok(), NULL, wxT("invalid brush") );
return &(M_BRUSHDATA->m_vStipple);
}
int wxBrush::GetPS() const
{
wxCHECK_MSG( Ok(), 0, _T("invalid brush") );
wxCHECK_MSG( Ok(), 0, wxT("invalid brush") );
return M_BRUSHDATA->m_hBrush;
}
WXHANDLE wxBrush::GetResourceHandle() const
{
wxCHECK_MSG( Ok(), 0, _T("invalid brush") );
wxCHECK_MSG( Ok(), 0, wxT("invalid brush") );
return (WXHANDLE)M_BRUSHDATA->m_hBrush;
} // end of wxBrush::GetResourceHandle

View File

@@ -248,7 +248,7 @@ void wxButton::SetTmpDefault()
{
wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
wxCHECK_RET( tlw, _T("button without top level window?") );
wxCHECK_RET( tlw, wxT("button without top level window?") );
wxWindow* pWinOldDefault = tlw->GetDefaultItem();
@@ -261,7 +261,7 @@ void wxButton::UnsetTmpDefault()
{
wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
wxCHECK_RET( tlw, _T("button without top level window?") );
wxCHECK_RET( tlw, wxT("button without top level window?") );
tlw->SetTmpDefaultItem(NULL);

View File

@@ -140,7 +140,7 @@ bool wxComboBox::Create(
lSstyle |= CBS_DROPDOWN;
if (!OS2CreateControl( _T("COMBOBOX")
if (!OS2CreateControl( wxT("COMBOBOX")
,lSstyle
))
return false;

View File

@@ -106,15 +106,15 @@ bool wxControl::OS2CreateControl( const wxChar* zClassname,
if (!pParent)
return false;
if ((wxStrcmp(zClassname, _T("COMBOBOX"))) == 0)
if ((wxStrcmp(zClassname, wxT("COMBOBOX"))) == 0)
zClass = WC_COMBOBOX;
else if ((wxStrcmp(zClassname, _T("STATIC"))) == 0)
else if ((wxStrcmp(zClassname, wxT("STATIC"))) == 0)
zClass = WC_STATIC;
else if ((wxStrcmp(zClassname, _T("BUTTON"))) == 0)
else if ((wxStrcmp(zClassname, wxT("BUTTON"))) == 0)
zClass = WC_BUTTON;
else if ((wxStrcmp(zClassname, _T("NOTEBOOK"))) == 0)
else if ((wxStrcmp(zClassname, wxT("NOTEBOOK"))) == 0)
zClass = WC_NOTEBOOK;
else if ((wxStrcmp(zClassname, _T("CONTAINER"))) == 0)
else if ((wxStrcmp(zClassname, wxT("CONTAINER"))) == 0)
zClass = WC_CONTAINER;
if ((zClass == WC_STATIC) || (zClass == WC_BUTTON))
dwStyle |= DT_MNEMONIC;

View File

@@ -2160,7 +2160,7 @@ void wxPMDCImpl::DoGetTextExtent(
//
if (!m_hPS)
{
(void)wxMessageBox( _T("wxWidgets core library")
(void)wxMessageBox( wxT("wxWidgets core library")
,"Using uninitialized DC for measuring text!\n"
,wxICON_INFORMATION
);
@@ -2177,8 +2177,8 @@ void wxPMDCImpl::DoGetTextExtent(
vErrorCode = ::WinGetLastError(wxGetInstance());
sError = wxPMErrorToStr(vErrorCode);
// DEBUG
wxSprintf(zMsg, _T("GpiQueryTextBox for %s: failed with Error: %lx - %s"), rsString.c_str(), vErrorCode, sError.c_str());
(void)wxMessageBox( _T("wxWidgets core library")
wxSprintf(zMsg, wxT("GpiQueryTextBox for %s: failed with Error: %lx - %s"), rsString.c_str(), vErrorCode, sError.c_str());
(void)wxMessageBox( wxT("wxWidgets core library")
,zMsg
,wxICON_INFORMATION
);

View File

@@ -114,7 +114,7 @@ wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow* pTheCanvas) :
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Unable to create presentation space. Error: %s\n"), sError.c_str());
wxLogError(wxT("Unable to create presentation space. Error: %s\n"), sError.c_str());
}
::GpiAssociate(m_hPS, NULLHANDLE);
::GpiAssociate(m_hPS, m_hDC);
@@ -132,7 +132,7 @@ wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow* pTheCanvas) :
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Unable to set current color table (3). Error: %s\n"), sError.c_str());
wxLogError(wxT("Unable to set current color table (3). Error: %s\n"), sError.c_str());
}
::GpiCreateLogColorTable( m_hPS
,0L
@@ -182,7 +182,7 @@ void wxWindowDCImpl::DoGetSize(
, int* pnHeight
) const
{
wxCHECK_RET( m_pCanvas, _T("wxWindowDC without a window?") );
wxCHECK_RET( m_pCanvas, wxT("wxWindowDC without a window?") );
m_pCanvas->GetSize( pnWidth
,pnHeight
);
@@ -236,7 +236,7 @@ wxClientDCImpl::wxClientDCImpl( wxDC *owner, wxWindow *pTheCanvas) :
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Unable to set current color table (4). Error: %s\n"), sError.c_str());
wxLogError(wxT("Unable to set current color table (4). Error: %s\n"), sError.c_str());
}
::GpiCreateLogColorTable( m_hPS
,0L
@@ -282,7 +282,7 @@ void wxClientDCImpl::DoGetSize(
, int* pnHeight
) const
{
wxCHECK_RET( m_pCanvas, _T("wxWindowDC without a window?") );
wxCHECK_RET( m_pCanvas, wxT("wxWindowDC without a window?") );
m_pCanvas->GetClientSize( pnWidth
,pnHeight
);

View File

@@ -47,7 +47,7 @@ wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap )
wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxDC *pOldDC)
: wxPMDCImpl( owner )
{
wxCHECK_RET( pOldDC, _T("NULL dc in wxMemoryDC ctor") );
wxCHECK_RET( pOldDC, wxT("NULL dc in wxMemoryDC ctor") );
CreateCompatible(pOldDC);
Init();

View File

@@ -261,7 +261,7 @@ void wxPrinterDCImpl::DoDrawBitmap( const wxBitmap& rBmp,
wxCoord WXUNUSED(vY),
bool WXUNUSED(bUseMask))
{
wxCHECK_RET( rBmp.Ok(), _T("invalid bitmap in wxPrinterDC::DrawBitmap") );
wxCHECK_RET( rBmp.Ok(), wxT("invalid bitmap in wxPrinterDC::DrawBitmap") );
// int nWidth = rBmp.GetWidth();
// int nHeight = rBmp.GetHeight();

View File

@@ -224,7 +224,7 @@ bool wxDialog::Show( bool bShow )
//
int wxDialog::ShowModal()
{
wxASSERT_MSG( !IsModal(), _T("wxDialog::ShowModal() reentered?") );
wxASSERT_MSG( !IsModal(), wxT("wxDialog::ShowModal() reentered?") );
m_endModalCalled = false;
@@ -288,7 +288,7 @@ void wxDialog::EndModal(
int nRetCode
)
{
wxASSERT_MSG( IsModal(), _T("EndModal() called for non modal dialog") );
wxASSERT_MSG( IsModal(), wxT("EndModal() called for non modal dialog") );
m_endModalCalled = true;
SetReturnCode(nRetCode);

View File

@@ -62,7 +62,7 @@ static inline void FreeFindData(
{
if (!::DosFindClose(vFd))
{
wxLogLastError(_T("DosFindClose"));
wxLogLastError(wxT("DosFindClose"));
}
}
@@ -223,9 +223,9 @@ bool wxDirData::Read(
if ( !wxEndsWithPathSeparator(sFilespec) )
{
sFilespec += _T('\\');
sFilespec += wxT('\\');
}
sFilespec += (!m_sFilespec ? _T("*.*") : m_sFilespec.c_str());
sFilespec += (!m_sFilespec ? wxT("*.*") : m_sFilespec.c_str());
m_vFinddata = FindFirst( sFilespec
,PTR_TO_FINDDATA
@@ -263,9 +263,9 @@ bool wxDirData::Read(
//
// Don't return "." and ".." unless asked for
//
if ( zName[0] == _T('.') &&
((zName[1] == _T('.') && zName[2] == _T('\0')) ||
(zName[1] == _T('\0'))) )
if ( zName[0] == wxT('.') &&
((zName[1] == wxT('.') && zName[2] == wxT('\0')) ||
(zName[1] == wxT('\0'))) )
{
if (!(m_nFlags & wxDIR_DOTDOT))
continue;
@@ -356,9 +356,9 @@ wxString wxDir::GetName() const
if ( !name.empty() )
{
// bring to canonical Windows form
name.Replace(_T("/"), _T("\\"));
name.Replace(wxT("/"), wxT("\\"));
if ( name.Last() == _T('\\') )
if ( name.Last() == wxT('\\') )
{
// chop off the last (back)slash
name.Truncate(name.length() - 1);
@@ -384,7 +384,7 @@ bool wxDir::GetFirst(
, int nFlags
) const
{
wxCHECK_MSG( IsOpened(), false, _T("must wxDir::Open() first") );
wxCHECK_MSG( IsOpened(), false, wxT("must wxDir::Open() first") );
M_DIR->Rewind();
M_DIR->SetFileSpec(rsFilespec);
M_DIR->SetFlags(nFlags);
@@ -395,8 +395,8 @@ bool wxDir::GetNext(
wxString* psFilename
) const
{
wxCHECK_MSG( IsOpened(), false, _T("must wxDir::Open() first") );
wxCHECK_MSG( psFilename, false, _T("bad pointer in wxDir::GetNext()") );
wxCHECK_MSG( IsOpened(), false, wxT("must wxDir::Open() first") );
wxCHECK_MSG( psFilename, false, wxT("bad pointer in wxDir::GetNext()") );
return M_DIR->Read(psFilename);
} // end of wxDir::GetNext

View File

@@ -329,44 +329,44 @@ wxDataFormat wxDropTarget::GetSupportedFormat (
case wxDF_TEXT:
case wxDF_FILENAME:
case wxDF_HTML:
sMechanism = _T("DRM_OS2FILE");
sFormat = _T("DRF_TEXT");
sMechanism = wxT("DRM_OS2FILE");
sFormat = wxT("DRF_TEXT");
break;
case wxDF_OEMTEXT:
sMechanism = _T("DRM_OS2FILE");
sFormat = _T("DRF_OEMTEXT");
sMechanism = wxT("DRM_OS2FILE");
sFormat = wxT("DRF_OEMTEXT");
break;
case wxDF_BITMAP:
sMechanism = _T("DRM_OS2FILE");
sFormat = _T("DRF_BITMAP");
sMechanism = wxT("DRM_OS2FILE");
sFormat = wxT("DRF_BITMAP");
break;
case wxDF_METAFILE:
case wxDF_ENHMETAFILE:
sMechanism = _T("DRM_OS2FILE");
sFormat = _T("DRF_METAFILE");
sMechanism = wxT("DRM_OS2FILE");
sFormat = wxT("DRF_METAFILE");
break;
case wxDF_TIFF:
sMechanism = _T("DRM_OS2FILE");
sFormat = _T("DRF_TIFF");
sMechanism = wxT("DRM_OS2FILE");
sFormat = wxT("DRF_TIFF");
break;
case wxDF_SYLK:
sMechanism = _T("DRM_OS2FILE");
sFormat = _T("DRF_SYLK");
sMechanism = wxT("DRM_OS2FILE");
sFormat = wxT("DRF_SYLK");
break;
case wxDF_DIF:
sMechanism = _T("DRM_OS2FILE");
sFormat = _T("DRF_DIF");
sMechanism = wxT("DRM_OS2FILE");
sFormat = wxT("DRF_DIF");
break;
case wxDF_DIB:
sMechanism = _T("DRM_OS2FILE");
sFormat = _T("DRF_DIB");
sMechanism = wxT("DRM_OS2FILE");
sFormat = wxT("DRF_DIB");
break;
case wxDF_PALETTE:
@@ -375,13 +375,13 @@ wxDataFormat wxDropTarget::GetSupportedFormat (
case wxDF_WAVE:
case wxDF_UNICODETEXT:
case wxDF_LOCALE:
sMechanism = _T("DRM_OS2FILE");
sFormat = _T("DRF_UNKNOWN");
sMechanism = wxT("DRM_OS2FILE");
sFormat = wxT("DRF_UNKNOWN");
break;
case wxDF_PRIVATE:
sMechanism = _T("DRM_OBJECT");
sFormat = _T("DRF_UNKNOWN");
sMechanism = wxT("DRM_OBJECT");
sFormat = wxT("DRF_UNKNOWN");
break;
}
for (i = 0; i < ulItems; i++)
@@ -560,7 +560,7 @@ void wxDropSource::Init ()
,(void*)pzBuffer
);
wxStrcpy(zFormats, _T("<DRM_OS2FILE, DRF_UNKNOWN>"));
wxStrcpy(zFormats, wxT("<DRM_OS2FILE, DRF_UNKNOWN>"));
wxStrcpy(zContainer, GetDataObject()->GetPreferredFormat().GetId());
hStrRMF = ::DrgAddStrHandle((PSZ)zFormats);

View File

@@ -206,7 +206,7 @@ bool wxEventLoopImpl::SendIdleMessage()
wxGUIEventLoop::~wxGUIEventLoop()
{
wxASSERT_MSG( !m_impl, _T("should have been deleted in Run()") );
wxASSERT_MSG( !m_impl, wxT("should have been deleted in Run()") );
}
//////////////////////////////////////////////////////////////////////////////
@@ -241,7 +241,7 @@ private:
int wxGUIEventLoop::Run()
{
// event loops are not recursive, you need to create another loop!
wxCHECK_MSG( !IsRunning(), -1, _T("can't reenter a message loop") );
wxCHECK_MSG( !IsRunning(), -1, wxT("can't reenter a message loop") );
// SendIdleMessage() and Dispatch() below may throw so the code here should
// be exception-safe, hence we must use local objects for all actions we
@@ -285,7 +285,7 @@ int wxGUIEventLoop::Run()
void wxGUIEventLoop::Exit(int rc)
{
wxCHECK_RET( IsRunning(), _T("can't call Exit() if not running") );
wxCHECK_RET( IsRunning(), wxT("can't call Exit() if not running") );
m_impl->SetExitCode(rc);
@@ -304,7 +304,7 @@ bool wxGUIEventLoop::Pending() const
bool wxGUIEventLoop::Dispatch()
{
wxCHECK_MSG( IsRunning(), false, _T("can't call Dispatch() if not running") );
wxCHECK_MSG( IsRunning(), false, wxT("can't call Dispatch() if not running") );
QMSG msg;
BOOL bRc = ::WinGetMsg(vHabmain, &msg, (HWND) NULL, 0, 0);

View File

@@ -93,8 +93,8 @@ void wxFileDialog::GetPaths (
size_t nCount = m_fileNames.GetCount();
rasPaths.Empty();
if (m_dir.Last() != _T('\\'))
sDir += _T('\\');
if (m_dir.Last() != wxT('\\'))
sDir += wxT('\\');
for ( size_t n = 0; n < nCount; n++ )
{
@@ -153,21 +153,21 @@ int wxFileDialog::ShowModal()
switch (ch)
{
case _T('/'):
case wxT('/'):
//
// Convert to backslash
//
ch = _T('\\');
ch = wxT('\\');
//
// Fall through
//
case _T('\\'):
case wxT('\\'):
while (i < nLen - 1)
{
wxChar chNext = m_dir[i + 1];
if (chNext != _T('\\') && chNext != _T('/'))
if (chNext != wxT('\\') && chNext != wxT('/'))
break;
//

View File

@@ -648,7 +648,7 @@ void wxNativeFontInfo::SetStyle(
switch (eStyle)
{
default:
wxFAIL_MSG( _T("unknown font style") );
wxFAIL_MSG( wxT("unknown font style") );
// fall through
case wxFONTSTYLE_NORMAL:
@@ -668,7 +668,7 @@ void wxNativeFontInfo::SetWeight(
switch (eWeight)
{
default:
wxFAIL_MSG( _T("unknown font weight") );
wxFAIL_MSG( wxT("unknown font weight") );
// fall through
case wxFONTWEIGHT_NORMAL:
@@ -779,14 +779,14 @@ bool wxNativeFontInfo::FromString( const wxString& rsStr )
{
long lVal;
wxStringTokenizer vTokenizer(rsStr, _T(";"));
wxStringTokenizer vTokenizer(rsStr, wxT(";"));
//
// First the version
//
wxString sToken = vTokenizer.GetNextToken();
if (sToken != _T('0'))
if (sToken != wxT('0'))
return false;
sToken = vTokenizer.GetNextToken();
@@ -845,7 +845,7 @@ wxString wxNativeFontInfo::ToString() const
{
wxString sStr;
sStr.Printf(_T("%d;%ld;%ld;%ld;%d;%d;%d;%d;%d;%ld;%d;%s"),
sStr.Printf(wxT("%d;%ld;%ld;%ld;%d;%d;%d;%d;%d;%ld;%d;%s"),
0, // version, in case we want to change the format later
fm.lEmHeight,
fa.lAveCharWidth,

View File

@@ -55,7 +55,7 @@
bool wxNativeEncodingInfo::FromString( const wxString& rsStr )
{
wxStringTokenizer vTokenizer(rsStr, _T(";"));
wxStringTokenizer vTokenizer(rsStr, wxT(";"));
wxString sEncid = vTokenizer.GetNextToken();
long lEnc;
@@ -74,7 +74,7 @@ bool wxNativeEncodingInfo::FromString( const wxString& rsStr )
}
else
{
if ( wxSscanf(sTmp, _T("%u"), &charset) != 1 )
if ( wxSscanf(sTmp, wxT("%u"), &charset) != 1 )
{
// should be a number!
return FALSE;
@@ -87,11 +87,11 @@ wxString wxNativeEncodingInfo::ToString() const
{
wxString sStr;
sStr << (long)encoding << _T(';') << facename;
sStr << (long)encoding << wxT(';') << facename;
if (charset != 850)
{
sStr << _T(';') << charset;
sStr << wxT(';') << charset;
}
return sStr;
} // end of wxNativeEncodingInfo::ToString
@@ -103,7 +103,7 @@ wxString wxNativeEncodingInfo::ToString() const
bool wxGetNativeFontEncoding( wxFontEncoding vEncoding,
wxNativeEncodingInfo* pInfo )
{
wxCHECK_MSG(pInfo, FALSE, _T("bad pointer in wxGetNativeFontEncoding") );
wxCHECK_MSG(pInfo, FALSE, wxT("bad pointer in wxGetNativeFontEncoding") );
if (vEncoding == wxFONTENCODING_DEFAULT)
{
vEncoding = wxFont::GetDefaultEncoding();
@@ -509,7 +509,7 @@ void wxOS2SelectMatchingFontByName(
switch (pFont->GetWeight())
{
default:
wxFAIL_MSG(_T("unknown font weight"));
wxFAIL_MSG(wxT("unknown font weight"));
// fall through
usWeightClass = FWEIGHT_DONT_CARE;
break;

View File

@@ -281,7 +281,7 @@ void wxFrame::PositionStatusBar()
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Error setting parent for StatusBar. Error: %s\n"), sError.c_str());
wxLogError(wxT("Error setting parent for StatusBar. Error: %s\n"), sError.c_str());
return;
}
}
@@ -405,14 +405,14 @@ void wxFrame::InternalSetMenuBar()
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Error setting parent for submenu. Error: %s\n"), sError.c_str());
wxLogError(wxT("Error setting parent for submenu. Error: %s\n"), sError.c_str());
}
if (!::WinSetOwner(m_hMenu, m_hFrame))
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Error setting parent for submenu. Error: %s\n"), sError.c_str());
wxLogError(wxT("Error setting parent for submenu. Error: %s\n"), sError.c_str());
}
::WinSendMsg(m_hFrame, WM_UPDATEFRAME, (MPARAM)FCF_MENU, (MPARAM)0);
} // end of wxFrame::InternalSetMenuBar

View File

@@ -42,7 +42,7 @@ WX_DEFINE_LIST(wxGDIImageHandlerList)
class WXDLLEXPORT wxBMPFileHandler : public wxBitmapHandler
{
public:
wxBMPFileHandler() : wxBitmapHandler(_T("Windows bitmap file"), _T("bmp"),
wxBMPFileHandler() : wxBitmapHandler(wxT("Windows bitmap file"), wxT("bmp"),
wxBITMAP_TYPE_BMP)
{
}
@@ -81,7 +81,7 @@ private:
class WXDLLEXPORT wxBMPResourceHandler: public wxBitmapHandler
{
public:
wxBMPResourceHandler() : wxBitmapHandler(_T("Windows bitmap resource"),
wxBMPResourceHandler() : wxBitmapHandler(wxT("Windows bitmap resource"),
wxEmptyString,
wxBITMAP_TYPE_BMP_RESOURCE)
{
@@ -139,7 +139,7 @@ public:
)
{
wxIcon* pIcon = wxDynamicCast(pImage, wxIcon);
wxCHECK_MSG(pIcon, false, _T("wxIconHandler only works with icons"));
wxCHECK_MSG(pIcon, false, wxT("wxIconHandler only works with icons"));
return LoadIcon( pIcon
,rName
@@ -172,8 +172,8 @@ private:
class WXDLLEXPORT wxICOFileHandler : public wxIconHandler
{
public:
wxICOFileHandler() : wxIconHandler(_T("ICO icon file"),
_T("ico"),
wxICOFileHandler() : wxIconHandler(wxT("ICO icon file"),
wxT("ico"),
wxBITMAP_TYPE_ICO)
{
}
@@ -193,8 +193,8 @@ private:
class WXDLLEXPORT wxICOResourceHandler: public wxIconHandler
{
public:
wxICOResourceHandler() : wxIconHandler(_T("ICO resource"),
_T("ico"),
wxICOResourceHandler() : wxIconHandler(wxT("ICO resource"),
wxT("ico"),
wxBITMAP_TYPE_ICO_RESOURCE)
{
}

View File

@@ -294,7 +294,7 @@ int wxListBox::DoInsertItems(const wxArrayStringsAdapter & items,
n = (int)::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)lIndexType, (MPARAM)items[i].wx_str());
if (n < 0)
{
wxLogLastError(_T("WinSendMsg(LM_INSERTITEM)"));
wxLogLastError(wxT("WinSendMsg(LM_INSERTITEM)"));
n = wxNOT_FOUND;
break;
}

View File

@@ -702,7 +702,7 @@ void ConvertToOS2ListItem (
break;
default:
wxFAIL_MSG( _T("wxOS2 does not support more than 10 columns in REPORT view") );
wxFAIL_MSG( wxT("wxOS2 does not support more than 10 columns in REPORT view") );
break;
}
}
@@ -2220,7 +2220,7 @@ long wxListCtrl::InsertItem (
wxListItem& rInfo
)
{
wxASSERT_MSG( !IsVirtual(), _T("can't be used with virtual controls") );
wxASSERT_MSG( !IsVirtual(), wxT("can't be used with virtual controls") );
PFIELDINFO pFieldInfo = FindOS2ListFieldByColNum ( GetHWND()
,rInfo.GetColumn()
@@ -2440,7 +2440,7 @@ bool wxListCtrl::SortItems ( wxListCtrlCompare fn, long lData )
,(PVOID)&vInternalData
))
{
wxLogDebug(_T("CM_SORTRECORD failed"));
wxLogDebug(wxT("CM_SORTRECORD failed"));
return false;
}
return true;
@@ -2573,7 +2573,7 @@ wxString wxListCtrl::OnGetItemText (
{
// this is a pure virtual function, in fact - which is not really pure
// because the controls which are not virtual don't need to implement it
wxFAIL_MSG( _T("not supposed to be called") );
wxFAIL_MSG( wxT("not supposed to be called") );
return wxEmptyString;
} // end of wxListCtrl::OnGetItemText
@@ -2582,7 +2582,7 @@ int wxListCtrl::OnGetItemImage (
) const
{
// same as above
wxFAIL_MSG( _T("not supposed to be called") );
wxFAIL_MSG( wxT("not supposed to be called") );
return -1;
} // end of wxListCtrl::OnGetItemImage
@@ -2602,7 +2602,7 @@ wxListItemAttr* wxListCtrl::OnGetItemAttr (
) const
{
wxASSERT_MSG( lItem >= 0 && lItem < GetItemCount(),
_T("invalid item index in OnGetItemAttr()") );
wxT("invalid item index in OnGetItemAttr()") );
//
// No attributes by default
@@ -2614,7 +2614,7 @@ void wxListCtrl::SetItemCount (
long lCount
)
{
wxASSERT_MSG( IsVirtual(), _T("this is for virtual controls only") );
wxASSERT_MSG( IsVirtual(), wxT("this is for virtual controls only") );
//
// Cannot explicitly set the record count in OS/2

View File

@@ -387,7 +387,7 @@ void wxMenu::EndRadioGroup()
wxMenuItem* wxMenu::DoAppend( wxMenuItem* pItem )
{
wxCHECK_MSG( pItem, NULL, _T("NULL item in wxMenu::DoAppend") );
wxCHECK_MSG( pItem, NULL, wxT("NULL item in wxMenu::DoAppend") );
bool bCheck = false;
@@ -428,7 +428,7 @@ wxMenuItem* wxMenu::DoAppend( wxMenuItem* pItem )
}
else
{
wxFAIL_MSG( _T("where is the radio group start item?") );
wxFAIL_MSG( wxT("where is the radio group start item?") );
}
}
}

View File

@@ -146,7 +146,7 @@ void wxMenuItem::Init()
//
// Tell the owner drawing code to to show the accel string as well
//
SetAccelString(m_text.AfterFirst(_T('\t')));
SetAccelString(m_text.AfterFirst(wxT('\t')));
#endif // wxUSE_OWNER_DRAWN
} // end of wxMenuItem::Init
@@ -215,7 +215,7 @@ void wxMenuItem::SetRadioGroupStart(
)
{
wxASSERT_MSG( !m_bIsRadioGroupStart
,_T("should only be called for the next radio items")
,wxT("should only be called for the next radio items")
);
m_vRadioGroup.m_nStart = nStart;
@@ -226,7 +226,7 @@ void wxMenuItem::SetRadioGroupEnd(
)
{
wxASSERT_MSG( m_bIsRadioGroupStart
,_T("should only be called for the first radio item")
,wxT("should only be called for the first radio item")
);
m_vRadioGroup.m_nEnd = nEnd;
} // end of wxMenuItem::SetRadioGroupEnd
@@ -288,7 +288,7 @@ void wxMenuItem::Check(
int nPos = rItems.IndexOf(this);
wxCHECK_RET( nPos != wxNOT_FOUND
,_T("menuitem not found in the menu items list?")
,wxT("menuitem not found in the menu items list?")
);
//
@@ -382,9 +382,9 @@ void wxMenuItem::SetItemLabel( const wxString& rText )
OWNER_DRAWN_ONLY(wxOwnerDrawn::SetName(m_text));
#if wxUSE_OWNER_DRAWN
if (rText.IsEmpty())
SetAccelString(m_text.AfterFirst(_T('\t')));
SetAccelString(m_text.AfterFirst(wxT('\t')));
else
SetAccelString(rText.AfterFirst(_T('\t')));
SetAccelString(rText.AfterFirst(wxT('\t')));
#endif // wxUSE_OWNER_DRAWN
HWND hMenu = GetHmenuOf(m_parentMenu);

View File

@@ -73,9 +73,9 @@ wxString wxFileTypeImpl::GetCommand(const wxChar *WXUNUSED(verb)) const
wxLogNull nolog;
wxString strKey;
if ( wxRegKey(wxRegKey::HKCR, m_ext + _T("\\shell")).Exists() )
if ( wxRegKey(wxRegKey::HKCR, m_ext + wxT("\\shell")).Exists() )
strKey = m_ext;
if ( wxRegKey(wxRegKey::HKCR, m_strFileType + _T("\\shell")).Exists() )
if ( wxRegKey(wxRegKey::HKCR, m_strFileType + wxT("\\shell")).Exists() )
strKey = m_strFileType;
if ( !strKey )
@@ -85,7 +85,7 @@ wxString wxFileTypeImpl::GetCommand(const wxChar *WXUNUSED(verb)) const
}
strKey << wxT("\\shell\\") << verb;
wxRegKey key(wxRegKey::HKCR, strKey + _T("\\command"));
wxRegKey key(wxRegKey::HKCR, strKey + wxT("\\command"));
wxString command;
if ( key.Open() ) {
// it's the default value of the key
@@ -114,25 +114,25 @@ wxString wxFileTypeImpl::GetCommand(const wxChar *WXUNUSED(verb)) const
#if wxUSE_DDE
// look whether we must issue some DDE requests to the application
// (and not just launch it)
strKey += _T("\\DDEExec");
strKey += wxT("\\DDEExec");
wxRegKey keyDDE(wxRegKey::HKCR, strKey);
if ( keyDDE.Open() ) {
wxString ddeCommand, ddeServer, ddeTopic;
keyDDE.QueryValue(_T(""), ddeCommand);
ddeCommand.Replace(_T("%1"), _T("%s"));
keyDDE.QueryValue(wxT(""), ddeCommand);
ddeCommand.Replace(wxT("%1"), wxT("%s"));
wxRegKey(wxRegKey::HKCR, strKey + _T("\\Application")).
QueryValue(_T(""), ddeServer);
wxRegKey(wxRegKey::HKCR, strKey + _T("\\Topic")).
QueryValue(_T(""), ddeTopic);
wxRegKey(wxRegKey::HKCR, strKey + wxT("\\Application")).
QueryValue(wxT(""), ddeServer);
wxRegKey(wxRegKey::HKCR, strKey + wxT("\\Topic")).
QueryValue(wxT(""), ddeTopic);
// HACK: we use a special feature of wxExecute which exists
// just because we need it here: it will establish DDE
// conversation with the program it just launched
command.Prepend(_T("WX_DDE#"));
command << _T('#') << ddeServer
<< _T('#') << ddeTopic
<< _T('#') << ddeCommand;
command.Prepend(wxT("WX_DDE#"));
command << wxT('#') << ddeServer
<< wxT('#') << ddeTopic
<< wxT('#') << ddeCommand;
}
else
#endif // wxUSE_DDE

View File

@@ -219,7 +219,7 @@ bool wxPen::RealizeResource()
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Unable to set current color table to RGB mode. Error: %s\n"), sError.c_str());
wxLogError(wxT("Unable to set current color table to RGB mode. Error: %s\n"), sError.c_str());
return false;
}
if (M_PENDATA->m_nStyle == wxPENSTYLE_TRANSPARENT)
@@ -285,7 +285,7 @@ bool wxPen::RealizeResource()
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Can't set Gpi attributes for a LINEBUNDLE. Error: %s\n"), sError.c_str());
wxLogError(wxT("Can't set Gpi attributes for a LINEBUNDLE. Error: %s\n"), sError.c_str());
return false;
}
@@ -370,7 +370,7 @@ bool wxPen::RealizeResource()
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Can't set Gpi attributes for an AREABUNDLE. Error: %s\n"), sError.c_str());
wxLogError(wxT("Can't set Gpi attributes for an AREABUNDLE. Error: %s\n"), sError.c_str());
}
return (bool)bOk;

View File

@@ -83,7 +83,7 @@ bool wxRadioButton::Create( wxWindow* pParent,
if (HasFlag(wxCLIP_SIBLINGS))
lSstyle |= WS_CLIPSIBLINGS;
if (!OS2CreateControl( _T("BUTTON")
if (!OS2CreateControl( wxT("BUTTON")
,lSstyle
,rPos
,rSize
@@ -202,7 +202,7 @@ void wxRadioButton::SetValue( bool bValue )
const wxWindowList& rSiblings = GetParent()->GetChildren();
wxWindowList::compatibility_iterator nodeThis = rSiblings.Find(this);
wxCHECK_RET(nodeThis, _T("radio button not a child of its parent?"));
wxCHECK_RET(nodeThis, wxT("radio button not a child of its parent?"));
//
// If it's not the first item of the group ...

View File

@@ -260,7 +260,7 @@ bool wxRegion::DoOffset( wxCoord x, wxCoord y )
#if 0
if ( ::OffsetRgn(GetHrgn(), x, y) == ERROR )
{
wxLogLastError(_T("OffsetRgn"));
wxLogLastError(wxT("OffsetRgn"));
return false;
}
@@ -297,7 +297,7 @@ bool wxRegion::DoCombine( const wxRegion& rRegion, wxRegionOp eOp )
break;
default:
wxFAIL_MSG( _T("unknown region operation") );
wxFAIL_MSG( wxT("unknown region operation") );
// fall through
case wxRGN_AND:

View File

@@ -248,7 +248,7 @@ wxFont wxSystemSettingsNative::GetFont(
wxFONTWEIGHT_NORMAL );
break;
default:
wxFAIL_MSG( _T("stock font not found") );
wxFAIL_MSG( wxT("stock font not found") );
return GetFont(wxSYS_ANSI_VAR_FONT);
}

View File

@@ -67,7 +67,7 @@ public:
return true;
} else {
m_anotherRunning = false; // we don't know for sure in this case
wxLogLastError(_T("DosCreateMutexSem"));
wxLogLastError(wxT("DosCreateMutexSem"));
return false;
}
}
@@ -83,7 +83,7 @@ public:
{
if ( !::DosCloseMutexSem(m_hMutex) )
{
wxLogLastError(_T("DosCloseMutexSem"));
wxLogLastError(wxT("DosCloseMutexSem"));
}
}
}
@@ -107,10 +107,10 @@ bool wxSingleInstanceChecker::Create(const wxString& name,
const wxString& WXUNUSED(path))
{
wxASSERT_MSG( !m_impl,
_T("calling wxSingleInstanceChecker::Create() twice?") );
wxT("calling wxSingleInstanceChecker::Create() twice?") );
// creating unnamed mutex doesn't have the same semantics!
wxASSERT_MSG( !name.empty(), _T("mutex name can't be empty") );
wxASSERT_MSG( !name.empty(), wxT("mutex name can't be empty") );
m_impl = new wxSingleInstanceCheckerImpl;
@@ -119,7 +119,7 @@ bool wxSingleInstanceChecker::Create(const wxString& name,
bool wxSingleInstanceChecker::IsAnotherRunning() const
{
wxCHECK_MSG( m_impl, false, _T("must call Create() first") );
wxCHECK_MSG( m_impl, false, wxT("must call Create() first") );
return m_impl->IsAnotherRunning();
}

View File

@@ -296,7 +296,7 @@ wxSpinCtrl* wxSpinCtrl::GetSpinForTextCtrl(
// sanity check
wxASSERT_MSG( pSpin->m_hWndBuddy == hWndBuddy,
_T("wxSpinCtrl has incorrect buddy HWND!") );
wxT("wxSpinCtrl has incorrect buddy HWND!") );
return pSpin;
} // end of wxSpinCtrl::GetSpinForTextCtrl

View File

@@ -43,7 +43,7 @@ static wxGDIImage* ConvertImage(
if(!bIsIcon )
{
wxASSERT_MSG( wxDynamicCast(&rBitmap, wxBitmap),
_T("not an icon and not a bitmap?") );
wxT("not an icon and not a bitmap?") );
const wxBitmap& rBmp = (const wxBitmap&)rBitmap;
wxMask* pMask = rBmp.GetMask();

View File

@@ -131,7 +131,7 @@ wxSize wxStaticText::DoGetBestSize() const
if (!nHeightLineDefault)
nHeightLineDefault = nHeightLine;
if (!nHeightLineDefault)
GetTextExtent(_T("W"), NULL, &nHeightLineDefault);
GetTextExtent(wxT("W"), NULL, &nHeightLineDefault);
nHeightTextTotal += nHeightLineDefault;
}
else
@@ -162,7 +162,7 @@ wxSize wxStaticText::DoGetBestSize() const
// when it is preceded by another '~' in which case it stands for a
// literal tilde
//
if (*pc == _T('~'))
if (*pc == wxT('~'))
{
if (!bLastWasTilde)
{

View File

@@ -56,7 +56,7 @@ wxString wxStandardPaths::GetInstallPrefix() const
{
wxStandardPaths *self = const_cast<wxStandardPaths *>(this);
self->m_prefix = _T("/usr/local");
self->m_prefix = wxT("/usr/local");
}
return m_prefix;
}
@@ -77,12 +77,12 @@ wxString wxStandardPaths::GetUserConfigDir() const
wxString wxStandardPaths::GetDataDir() const
{
return GetInstallPrefix() + _T("\\data");
return GetInstallPrefix() + wxT("\\data");
}
wxString wxStandardPaths::GetUserDataDir() const
{
return AppendAppInfo(wxFileName::GetHomeDir() + _T("\\."));
return AppendAppInfo(wxFileName::GetHomeDir() + wxT("\\."));
}
wxString wxStandardPaths::GetPluginsDir() const

View File

@@ -718,7 +718,7 @@ void wxTextCtrl::MarkDirty()
::WinSendMsg(GetHwnd(), MLM_SETCHANGED, MPFROMLONG(TRUE), 0);
else
// EM controls do not have a SETCHANGED, what can we do??
wxFAIL_MSG( _T("not implemented") );
wxFAIL_MSG( wxT("not implemented") );
}
//

View File

@@ -125,7 +125,7 @@ wxMutexInternal::~wxMutexInternal()
{
if (::DosCloseMutexSem(m_vMutex))
{
wxLogLastError(_T("DosCloseMutexSem(mutex)"));
wxLogLastError(wxT("DosCloseMutexSem(mutex)"));
}
}
}
@@ -221,7 +221,7 @@ wxSemaphoreInternal::wxSemaphoreInternal(int initialcount, int maxcount)
ulrc = ::DosCreateMutexSem(NULL, &m_vMutex, 0L, FALSE);
if (ulrc != 0)
{
wxLogLastError(_T("DosCreateMutexSem()"));
wxLogLastError(wxT("DosCreateMutexSem()"));
m_vMutex = NULL;
m_vEvent = NULL;
return;
@@ -229,7 +229,7 @@ wxSemaphoreInternal::wxSemaphoreInternal(int initialcount, int maxcount)
ulrc = ::DosCreateEventSem(NULL, &m_vEvent, 0L, FALSE);
if ( ulrc != 0)
{
wxLogLastError(_T("DosCreateEventSem()"));
wxLogLastError(wxT("DosCreateEventSem()"));
::DosCloseMutexSem(m_vMutex);
m_vMutex = NULL;
m_vEvent = NULL;
@@ -244,11 +244,11 @@ wxSemaphoreInternal::~wxSemaphoreInternal()
{
if ( ::DosCloseEventSem(m_vEvent) )
{
wxLogLastError(_T("DosCloseEventSem(semaphore)"));
wxLogLastError(wxT("DosCloseEventSem(semaphore)"));
}
if ( ::DosCloseMutexSem(m_vMutex) )
{
wxLogLastError(_T("DosCloseMutexSem(semaphore)"));
wxLogLastError(wxT("DosCloseMutexSem(semaphore)"));
}
else
m_vEvent = NULL;
@@ -272,7 +272,7 @@ wxSemaError wxSemaphoreInternal::WaitTimeout(unsigned long ulMilliseconds)
return wxSEMA_TIMEOUT;
default:
wxLogLastError(_T("DosWaitEventSem(semaphore)"));
wxLogLastError(wxT("DosWaitEventSem(semaphore)"));
return wxSEMA_MISC_ERROR;
}
ulrc = :: DosRequestMutexSem(m_vMutex, ulMilliseconds);
@@ -332,7 +332,7 @@ wxSemaError wxSemaphoreInternal::Post()
return wxSEMA_OVERFLOW;
if ( ulrc != NO_ERROR && ulrc != ERROR_ALREADY_POSTED )
{
wxLogLastError(_T("DosPostEventSem(semaphore)"));
wxLogLastError(wxT("DosPostEventSem(semaphore)"));
return wxSEMA_MISC_ERROR;
}
@@ -582,7 +582,7 @@ wxThreadIdType wxThread::GetCurrentId()
bool wxThread::SetConcurrency(size_t level)
{
wxASSERT_MSG( IsMain(), _T("should only be called from the main thread") );
wxASSERT_MSG( IsMain(), wxT("should only be called from the main thread") );
// ok only for the default one
if ( level == 0 )
@@ -666,7 +666,7 @@ wxThread::ExitCode wxThread::Wait()
// although under Windows we can wait for any thread, it's an error to
// wait for a detached one in wxWin API
wxCHECK_MSG( !IsDetached(), (ExitCode)-1,
_T("can't wait for detached thread") );
wxT("can't wait for detached thread") );
ExitCode rc = (ExitCode)-1;
(void)Delete(&rc);
return(rc);

View File

@@ -935,7 +935,7 @@ void wxToolBar::SetRows(
int nRows
)
{
wxCHECK_RET( nRows != 0, _T("max number of rows must be > 0") );
wxCHECK_RET( nRows != 0, wxT("max number of rows must be > 0") );
m_maxCols = (GetToolsCount() + nRows - 1) / nRows;
Refresh();

View File

@@ -72,7 +72,7 @@ void wxToolTip::Create(
);
if (!m_hWnd)
{
wxLogError(_T("Unable to create tooltip window"));
wxLogError(wxT("Unable to create tooltip window"));
}
wxColour vColor( wxT("YELLOW") );

View File

@@ -162,7 +162,7 @@ void wxTopLevelWindowOS2::OnActivate(
//
// Restore focus to the child which was last focused
//
wxLogTrace(_T("focus"), _T("wxTLW %08lx activated."), m_hWnd);
wxLogTrace(wxT("focus"), wxT("wxTLW %08lx activated."), m_hWnd);
wxWindow* pParent = m_pWinLastFocused ? m_pWinLastFocused->GetParent()
: NULL;
@@ -200,8 +200,8 @@ void wxTopLevelWindowOS2::OnActivate(
pWin = pWin->GetParent();
}
wxLogTrace(_T("focus"),
_T("wxTLW %08lx deactivated, last focused: %08lx."),
wxLogTrace(wxT("focus"),
wxT("wxTLW %08lx deactivated, last focused: %08lx."),
m_hWnd,
m_pWinLastFocused ? GetHwndOf(m_pWinLastFocused)
: NULL);
@@ -281,7 +281,7 @@ WXHWND wxTopLevelWindowOS2::OS2GetParent() const
//
// This flag doesn't make sense then and will be ignored
//
wxFAIL_MSG( _T("wxFRAME_FLOAT_ON_PARENT but no parent?") );
wxFAIL_MSG( wxT("wxFRAME_FLOAT_ON_PARENT but no parent?") );
}
else
{
@@ -495,7 +495,7 @@ bool wxTopLevelWindowOS2::CreateFrame( const wxString& rsTitle,
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Error creating frame. Error: %s\n"), sError.c_str());
wxLogError(wxT("Error creating frame. Error: %s\n"), sError.c_str());
return false;
}
@@ -519,7 +519,7 @@ bool wxTopLevelWindowOS2::CreateFrame( const wxString& rsTitle,
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Error creating frame. Error: %s\n"), sError.c_str());
wxLogError(wxT("Error creating frame. Error: %s\n"), sError.c_str());
return false;
}
@@ -588,7 +588,7 @@ bool wxTopLevelWindowOS2::CreateFrame( const wxString& rsTitle,
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Error sizing frame. Error: %s\n"), sError.c_str());
wxLogError(wxT("Error sizing frame. Error: %s\n"), sError.c_str());
return false;
}
lStyle = ::WinQueryWindowULong( m_hWnd
@@ -1041,7 +1041,7 @@ bool wxTopLevelWindowOS2::EnableCloseButton( bool bEnable )
if (!hMenu)
{
wxLogLastError(_T("GetSystemMenu"));
wxLogLastError(wxT("GetSystemMenu"));
return false;
}
@@ -1093,7 +1093,7 @@ void wxTLWHiddenParentModule::OnExit()
{
if (!::WinDestroyWindow(m_shWnd))
{
wxLogLastError(_T("DestroyWindow(hidden TLW parent)"));
wxLogLastError(wxT("DestroyWindow(hidden TLW parent)"));
}
m_shWnd = NULL;
}
@@ -1108,7 +1108,7 @@ HWND wxTLWHiddenParentModule::GetHWND()
{
if (!m_szClassName)
{
static const wxChar* zHIDDEN_PARENT_CLASS = _T("wxTLWHiddenParent");
static const wxChar* zHIDDEN_PARENT_CLASS = wxT("wxTLWHiddenParent");
if (!::WinRegisterClass( wxGetInstance()
,(PSZ)zHIDDEN_PARENT_CLASS
@@ -1117,7 +1117,7 @@ HWND wxTLWHiddenParentModule::GetHWND()
,sizeof(ULONG)
))
{
wxLogLastError(_T("RegisterClass(\"wxTLWHiddenParent\")"));
wxLogLastError(wxT("RegisterClass(\"wxTLWHiddenParent\")"));
}
else
{
@@ -1139,7 +1139,7 @@ HWND wxTLWHiddenParentModule::GetHWND()
NULL );
if (!m_shWnd)
{
wxLogLastError(_T("CreateWindow(hidden TLW parent)"));
wxLogLastError(wxT("CreateWindow(hidden TLW parent)"));
}
}
return m_shWnd;

View File

@@ -50,8 +50,8 @@ extern "C"
#include <netbios.h>
#endif
static const wxChar WX_SECTION[] = _T("wxWidgets");
static const wxChar eHOSTNAME[] = _T("HostName");
static const wxChar WX_SECTION[] = wxT("wxWidgets");
static const wxChar eHOSTNAME[] = wxT("HostName");
// For the following functions we SHOULD fill in support
// for Windows-NT (which I don't know) as I assume it begin
@@ -81,10 +81,10 @@ bool wxGetHostName( wxChar* zBuf, int nMaxSize )
strcpy(zBuf, zServer);
#else
wxChar* zSysname;
const wxChar* zDefaultHost = _T("noname");
const wxChar* zDefaultHost = wxT("noname");
if ((zSysname = wxGetenv(_T("SYSTEM_NAME"))) == NULL &&
(zSysname = wxGetenv(_T("HOSTNAME"))) == NULL)
if ((zSysname = wxGetenv(wxT("SYSTEM_NAME"))) == NULL &&
(zSysname = wxGetenv(wxT("HOSTNAME"))) == NULL)
{
::PrfQueryProfileString( HINI_PROFILE
,(PSZ)WX_SECTION
@@ -93,7 +93,7 @@ bool wxGetHostName( wxChar* zBuf, int nMaxSize )
,(void*)zBuf
,(ULONG)nMaxSize - 1
);
zBuf[nMaxSize] = _T('\0');
zBuf[nMaxSize] = wxT('\0');
}
else
{
@@ -120,7 +120,7 @@ bool wxGetUserName( wxChar* zBuf, int nMaxSize )
#ifdef USE_NET_API
wxGetUserId( zBuf, nMaxSize );
#else
wxStrlcpy(zBuf, _T("Unknown User"), nMaxSize);
wxStrlcpy(zBuf, wxT("Unknown User"), nMaxSize);
#endif
return true;
}
@@ -138,7 +138,7 @@ int wxKill(long lPid,
//
bool wxShell( const wxString& rCommand )
{
wxChar* zShell = _T("CMD.EXE");
wxChar* zShell = wxT("CMD.EXE");
wxString sInputs;
STARTDATA SData = {0};
PSZ PgmTitle = "Command Shell";
@@ -155,7 +155,7 @@ bool wxShell( const wxString& rCommand )
SData.PgmTitle = PgmTitle;
SData.PgmName = (char*)zShell;
sInputs = _T("/C ") + rCommand;
sInputs = wxT("/C ") + rCommand;
SData.PgmInputs = (BYTE*)sInputs.wx_str();
SData.TermQ = 0;
SData.Environment = 0;
@@ -245,14 +245,14 @@ static bool wxDoSetEnv(const wxString& variable, const char *value)
#ifdef HAVE_UNSETENV
return unsetenv(variable.mb_str()) == 0;
#else
value = _T(""); // mustn't pass NULL to setenv()
value = wxT(""); // mustn't pass NULL to setenv()
#endif
}
return setenv(variable.mb_str(), value, 1 /* overwrite */) == 0;
#elif defined(HAVE_PUTENV)
wxString s = variable;
if ( value )
s << _T('=') << value;
s << wxT('=') << value;
// transform to ANSI
const char *p = s.mb_str();
@@ -314,7 +314,7 @@ void wxBell()
wxString wxGetOsDescription()
{
wxString strVer(_T("OS/2"));
wxString strVer(wxT("OS/2"));
ULONG ulSysInfo = 0;
if (::DosQuerySysInfo( QSV_VERSION_MINOR,
@@ -324,7 +324,7 @@ wxString wxGetOsDescription()
) == 0L )
{
wxString ver;
ver.Printf( _T(" ver. %d.%d"),
ver.Printf( wxT(" ver. %d.%d"),
int(ulSysInfo / 10),
int(ulSysInfo % 10)
);
@@ -416,11 +416,11 @@ wxString wxGetUserHome ( const wxString &rUser )
// Guests belong in the temp dir
if ( currentUser == "annonymous" )
{
zHome = wxGetenv(_T("TMP"));
zHome = wxGetenv(wxT("TMP"));
if ( !zHome )
zHome = wxGetenv(_T("TMPDIR"));
zHome = wxGetenv(wxT("TMPDIR"));
if ( !zHome )
zHome = wxGetenv(_T("TEMP"));
zHome = wxGetenv(wxT("TEMP"));
if ( zHome && *zHome )
return zHome;
@@ -432,7 +432,7 @@ wxString wxGetUserHome ( const wxString &rUser )
#endif
if (sUser.empty())
{
if ((zHome = wxGetenv(_T("HOME"))) != NULL)
if ((zHome = wxGetenv(wxT("HOME"))) != NULL)
{
home = zHome;
home.Replace("/", "\\");
@@ -459,7 +459,7 @@ bool wxGetDiskSpace(const wxString& path,
if (wxDirExists(fn.GetFullPath()) == false)
return false;
disknum = wxToupper(fn.GetVolume().GetChar(0)) - _T('A') + 1;
disknum = wxToupper(fn.GetVolume().GetChar(0)) - wxT('A') + 1;
rc = ::DosQueryFSInfo(disknum, // 1 = A, 2 = B, 3 = C, ...
FSIL_ALLOC, // allocation info

View File

@@ -82,7 +82,7 @@ void wxBeginBusyCursor(const wxCursor* pCursor)
void wxEndBusyCursor()
{
wxCHECK_RET( gs_wxBusyCursorCount > 0
,_T("no matching wxBeginBusyCursor() for wxEndBusyCursor()")
,wxT("no matching wxBeginBusyCursor() for wxEndBusyCursor()")
);
if (--gs_wxBusyCursorCount == 0)
@@ -116,7 +116,7 @@ bool wxCheckForInterrupt( wxWindow* pWnd )
}
else
{
wxFAIL_MSG(_T("pWnd==NULL !!!"));
wxFAIL_MSG(wxT("pWnd==NULL !!!"));
return false;//*** temporary?
}
}

View File

@@ -386,7 +386,7 @@ bool wxWindowOS2::Create( wxWindow* pParent,
// static box
//
wxASSERT_MSG( !wxDynamicCast(pParent, wxStaticBox),
_T("wxStaticBox can't be used as a window parent!") );
wxT("wxStaticBox can't be used as a window parent!") );
#endif // wxUSE_STATBOX
// Ensure groupbox backgrounds are painted
@@ -456,7 +456,7 @@ bool wxWindowOS2::Create( wxWindow* pParent,
void wxWindowOS2::SetFocus()
{
HWND hWnd = GetHwnd();
wxCHECK_RET( hWnd, _T("can't set focus to invalid window") );
wxCHECK_RET( hWnd, wxT("can't set focus to invalid window") );
if (hWnd)
::WinSetFocus(HWND_DESKTOP, hWnd);
@@ -2855,7 +2855,7 @@ void wxAssociateWinWithHandle(
{
wxString Newstr(pWin->GetClassInfo()->GetClassName());
wxString Oldstr(pOldWin->GetClassInfo()->GetClassName());
wxLogError( _T("Bug! New window of class %s has same HWND %X as old window of class %s"),
wxLogError( wxT("Bug! New window of class %s has same HWND %X as old window of class %s"),
Newstr.c_str(),
(int)hWnd,
Oldstr.c_str()
@@ -3001,7 +3001,7 @@ bool wxWindowOS2::OS2Create( PSZ zClass,
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Error creating frame. Error: %s\n"), sError.c_str());
wxLogError(wxT("Error creating frame. Error: %s\n"), sError.c_str());
return false;
}
SetSize( nX
@@ -3240,7 +3240,7 @@ bool wxWindowOS2::OS2OnDrawItem( int vId,
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Unable to set current color table (1). Error: %s\n"), sError.c_str());
wxLogError(wxT("Unable to set current color table (1). Error: %s\n"), sError.c_str());
}
//
// Set the color table to RGB mode
@@ -3255,7 +3255,7 @@ bool wxWindowOS2::OS2OnDrawItem( int vId,
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Unable to set current color table (2). Error: %s\n"), sError.c_str());
wxLogError(wxT("Unable to set current color table (2). Error: %s\n"), sError.c_str());
}
wxCHECK( pMenuItem->IsKindOf(CLASSINFO(wxMenuItem)), FALSE );