]> git.saurik.com Git - wxWidgets.git/commitdiff
added .c_str() to wxStrlcpy() calls to fix wxUSE_STL build (closes #10252)
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 17 Dec 2008 09:49:42 +0000 (09:49 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 17 Dec 2008 09:49:42 +0000 (09:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/app.cpp
src/msw/dialup.cpp
src/msw/filedlg.cpp
src/msw/font.cpp
src/msw/fontenum.cpp
src/msw/fontutil.cpp
src/msw/listctrl.cpp
src/msw/utils.cpp

index 00f768bf6b4bf5b66bced1c76581ef6fb0f626ea..767caedf5e1d13bea5dd584c58951f38fa43fcbb 100644 (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));
index 7daa30492e09085ca27a93e2e2f1b3647a727cef..afab3e9a9dc23fd808f302c10ba5f3b72657c386 100644 (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
index 546b6c7ab05f48d5e92a600cf9b5e7ab06fa9f3d..d1bb4157092629ef348156ea617ce905186a05bb 100644 (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;
index a0403335204fb037c61074cbf9fcb00e48078bf3..ed8728be509a700253436f4bbfbfd800f3a05f7d 100644 (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;
 }
 
index 03e53b58ad457f8ffecdf79bd63897be192753ce..fe70af5e6b12332170f2cb8b8c2f9bece62489ca 100644 (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 */) ;
index 6dfb9fa207f56823bb888f58f0a75ccf0e5a8eca..22b4a6210102a77a9887ae482a38cad9570261d8 100644 (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 )
index 4e2c3de06887bd0b9828507e98c9804d0ab09897..d7bac52606a3872eae19737a5a3ec3b667de83ac 100644 (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()
index 7088abfabaceaff441e35edca8769d0eafdbe17e..f6097b58010749c10b63f4e1f38768e0e2f4deec 100644 (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;
             }