void wxSafeShowMessage(const wxString& title, const wxString& text)
{
#ifdef __WINDOWS__
- ::MessageBox(NULL, text.c_str(), title.c_str(), MB_OK | MB_ICONSTOP);
+ ::MessageBox(NULL, text.t_str(), title.t_str(), MB_OK | MB_ICONSTOP);
#else
wxFprintf(stderr, wxS("%s: %s\n"), title.c_str(), text.c_str());
fflush(stderr);
return;
}
- ::MessageBox(NULL, str.c_str(), NULL, MB_ICONINFORMATION | MB_OK);
+ ::MessageBox(NULL, str.t_str(), NULL, MB_ICONINFORMATION | MB_OK);
#else // !__WINDOWS__
// TODO: use the native message box for the other ports too
wxMessageOutputStderr::Output(str);
wxString out(AppendLineFeedIfNeeded(str));
out.Replace(wxT("\t"), wxT(" "));
out.Replace(wxT("\n"), wxT("\r\n"));
- ::OutputDebugString(out.c_str());
+ ::OutputDebugString(out.t_str());
#else
// TODO: use native debug output function for the other ports too
wxMessageOutputStderr::Output(str);
wxString ver;
if ( m_dll.IsLoaded() )
{
- wxChar *pc = wx_const_cast(wxChar *, (const wxChar*) filename.c_str());
+ wxChar *pc = wx_const_cast(wxChar *, (const wxChar*) filename.t_str());
DWORD dummy;
DWORD sizeVerInfo = m_pfnGetFileVersionInfoSize(pc, &dummy);
wxDllType
wxDynamicLibrary::RawLoad(const wxString& libname, int WXUNUSED(flags))
{
- return ::LoadLibrary(libname.c_str());
+ return ::LoadLibrary(libname.t_str());
}
/* static */
m_dwLastError = ::RegOpenKeyEx
(
(HKEY) m_hRootKey,
- m_strKey.wc_str(),
+ m_strKey.t_str(),
RESERVED,
mode == Read ? KEY_READ : KEY_ALL_ACCESS,
&tmpKey
&tmpKey,
&disposition);
#else
- m_dwLastError = RegCreateKey((HKEY) m_hRootKey, m_strKey.c_str(), &tmpKey);
+ m_dwLastError = RegCreateKey((HKEY) m_hRootKey, m_strKey.t_str(), &tmpKey);
#endif
if ( m_dwLastError != ERROR_SUCCESS ) {
wxLogSysError(m_dwLastError, _("Can't create registry key '%s'"),
// now delete this key itself
Close();
- m_dwLastError = RegDeleteKey((HKEY) m_hRootKey, m_strKey.c_str());
+ m_dwLastError = RegDeleteKey((HKEY) m_hRootKey, m_strKey.t_str());
// deleting a key which doesn't exist is not considered an error
if ( m_dwLastError != ERROR_SUCCESS &&
m_dwLastError != ERROR_FILE_NOT_FOUND ) {
#ifndef __WXWINCE__
if ( (dwType == REG_EXPAND_SZ) && !raw )
{
- DWORD dwExpSize = ::ExpandEnvironmentStrings(strValue.c_str(), NULL, 0);
+ DWORD dwExpSize = ::ExpandEnvironmentStrings(strValue.t_str(), NULL, 0);
bool ok = dwExpSize != 0;
if ( ok )
{
wxString strExpValue;
- ok = ::ExpandEnvironmentStrings(strValue.c_str(),
+ ok = ::ExpandEnvironmentStrings(strValue.t_str(),
wxStringBuffer(strExpValue, dwExpSize),
dwExpSize
) != 0;
if ( ::RegOpenKeyEx
(
(HKEY)hRootKey,
- szKey.c_str(),
+ szKey.t_str(),
RESERVED,
KEY_READ, // we might not have enough rights for rw access
&hkeyDummy
inline const wxChar *RegValueStr(const wxString& szValue)
{
- return szValue.empty() ? (const wxChar*)NULL : szValue.c_str();
+ return szValue.empty() ? (const wxChar*)NULL : szValue.t_str();
}
#endif // wxUSE_REGKEY
bool Create(const wxString& name)
{
- m_hMutex = ::CreateMutex(NULL, FALSE, name.c_str());
+ m_hMutex = ::CreateMutex(NULL, FALSE, name.t_str());
if ( !m_hMutex )
{
wxLogLastError(_T("CreateMutex"));
return false;
#else // Win32
// first get the size of the buffer
- DWORD dwRet = ::GetEnvironmentVariable(var.c_str(), NULL, 0);
+ DWORD dwRet = ::GetEnvironmentVariable(var.t_str(), NULL, 0);
if ( !dwRet )
{
// this means that there is no such variable
if ( value )
{
- (void)::GetEnvironmentVariable(var.c_str(),
+ (void)::GetEnvironmentVariable(var.t_str(),
wxStringBuffer(*value, dwRet),
dwRet);
}
// no environment variables under CE
return false;
#else
- if ( !::SetEnvironmentVariable(var.c_str(), value) )
+ if ( !::SetEnvironmentVariable(var.t_str(), value) )
{
wxLogLastError(_T("SetEnvironmentVariable"));
bool wxSetEnv(const wxString& variable, const wxString& value)
{
- return wxDoSetEnv(variable, value.c_str());
+ return wxDoSetEnv(variable, value.t_str());
}
bool wxUnsetEnv(const wxString& variable)