added .c_str() to wxStrlcpy() calls to fix wxUSE_STL build (closes #10252)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-12-17 09:49:42 +00:00
parent 6124b13407
commit 64accea5fa
8 changed files with 13 additions and 13 deletions

View File

@@ -654,7 +654,7 @@ const wxChar *wxApp::GetRegisteredClassName(const wxChar *name,
for ( size_t n = 0; n < count; n++ )
{
if ( gs_regClassesInfo[n].basename == name )
return gs_regClassesInfo[n].regname;
return gs_regClassesInfo[n].regname.c_str();
}
// we need to register this class
@@ -696,7 +696,7 @@ const wxChar *wxApp::GetRegisteredClassName(const wxChar *name,
{
wxLogLastError(wxString::Format(wxT("RegisterClass(%s)"),
regClass.regname));
::UnregisterClass(regClass.regname, wxhInstance);
::UnregisterClass(regClass.regname.c_str(), wxhInstance);
return NULL;
}
@@ -728,13 +728,13 @@ void wxApp::UnregisterWindowClasses()
for ( size_t n = 0; n < count; n++ )
{
const ClassRegInfo& regClass = gs_regClassesInfo[n];
if ( !::UnregisterClass(regClass.regname, wxhInstance) )
if ( !::UnregisterClass(regClass.regname.c_str(), wxhInstance) )
{
wxLogLastError(wxString::Format(wxT("UnregisterClass(%s)"),
regClass.regname));
}
if ( !::UnregisterClass(regClass.regnameNR, wxhInstance) )
if ( !::UnregisterClass(regClass.regnameNR.c_str(), wxhInstance) )
{
wxLogLastError(wxString::Format(wxT("UnregisterClass(%s)"),
regClass.regnameNR));

View File

@@ -807,7 +807,7 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP,
RASDIALPARAMS rasDialParams;
rasDialParams.dwSize = sizeof(rasDialParams);
wxStrlcpy(rasDialParams.szEntryName, entryName, RAS_MaxEntryName);
wxStrlcpy(rasDialParams.szEntryName, entryName.c_str(), RAS_MaxEntryName);
// do we have the username and password?
if ( !username || !password )
@@ -829,8 +829,8 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP,
}
else
{
wxStrlcpy(rasDialParams.szUserName, username, UNLEN);
wxStrlcpy(rasDialParams.szPassword, password, PWLEN);
wxStrlcpy(rasDialParams.szUserName, username.c_str(), UNLEN);
wxStrlcpy(rasDialParams.szPassword, password.c_str(), PWLEN);
}
// default values for other fields

View File

@@ -494,7 +494,7 @@ int wxFileDialog::ShowModal()
//=== Setting defaultFileName >>=========================================
wxStrlcpy(fileNameBuffer, m_fileName, WXSIZEOF(fileNameBuffer));
wxStrlcpy(fileNameBuffer, m_fileName.c_str(), WXSIZEOF(fileNameBuffer));
of.lpstrFile = fileNameBuffer; // holds returned filename
of.nMaxFile = wxMAXPATH;

View File

@@ -618,7 +618,7 @@ void wxNativeFontInfo::SetUnderlined(bool underlined)
bool wxNativeFontInfo::SetFaceName(const wxString& facename)
{
wxStrlcpy(lf.lfFaceName, facename, WXSIZEOF(lf.lfFaceName));
wxStrlcpy(lf.lfFaceName, facename.c_str(), WXSIZEOF(lf.lfFaceName));
return true;
}

View File

@@ -166,7 +166,7 @@ void wxFontEnumeratorHelper::DoEnumerate()
#else // __WIN32__
LOGFONT lf;
lf.lfCharSet = (BYTE)m_charset;
wxStrlcpy(lf.lfFaceName, m_facename, WXSIZEOF(lf.lfFaceName));
wxStrlcpy(lf.lfFaceName, m_facename.c_str(), WXSIZEOF(lf.lfFaceName));
lf.lfPitchAndFamily = 0;
::EnumFontFamiliesEx(hDC, &lf, (wxFONTENUMPROC)wxFontEnumeratorProc,
(LPARAM)this, 0 /* reserved */) ;

View File

@@ -162,7 +162,7 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& info)
wxZeroMemory(lf); // all default values
lf.lfCharSet = (BYTE)info.charset;
wxStrlcpy(lf.lfFaceName, info.facename, WXSIZEOF(lf.lfFaceName));
wxStrlcpy(lf.lfFaceName, info.facename.c_str(), WXSIZEOF(lf.lfFaceName));
HFONT hfont = ::CreateFontIndirect(&lf);
if ( !hfont )

View File

@@ -2486,7 +2486,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
if ( lvi.mask & LVIF_TEXT )
{
wxString text = OnGetItemText(item, lvi.iSubItem);
wxStrlcpy(lvi.pszText, text, lvi.cchTextMax);
wxStrlcpy(lvi.pszText, text.c_str(), lvi.cchTextMax);
}
// see comment at the end of wxListCtrl::GetColumn()

View File

@@ -218,7 +218,7 @@ bool wxGetFullHostName(wxChar *buf, int maxSize)
if ( !host.empty() )
{
wxStrlcpy(buf, host, maxSize);
wxStrlcpy(buf, host.c_str(), maxSize);
return true;
}