use only ANSI APIs and ConvertUTF8ToACP

This commit is contained in:
Chris Danford
2006-01-17 22:20:27 +00:00
parent b60126a261
commit 7b75640337
4 changed files with 8 additions and 15 deletions
@@ -80,7 +80,7 @@ static HWND GetHwnd()
#endif
}
static wstring GetWindowTitle()
static RString GetWindowTitle()
{
RString s;
#if !defined(SMPACKAGE)
@@ -88,7 +88,7 @@ static wstring GetWindowTitle()
#else
s = PRODUCT_NAME;
#endif
return RStringToWstring( s );
return s;
}
void DialogDriver_Win32::OK( RString sMessage, RString sID )
@@ -176,8 +176,7 @@ void DialogDriver_Win32::Error( RString sError, RString sID )
Dialog::Result DialogDriver_Win32::AbortRetryIgnore( RString sMessage, RString ID )
{
wstring wsMessage = RStringToWstring(sMessage);
switch( MessageBoxW(::GetHwnd(), wsMessage.c_str(), ::GetWindowTitle().c_str(), MB_ABORTRETRYIGNORE|MB_DEFBUTTON3 ) )
switch( MessageBox(::GetHwnd(), ConvertUTF8ToACP(sMessage).c_str(), ConvertUTF8ToACP(::GetWindowTitle()).c_str(), MB_ABORTRETRYIGNORE|MB_DEFBUTTON3 ) )
{
case IDABORT: return Dialog::abort;
case IDRETRY: return Dialog::retry;
@@ -188,8 +187,7 @@ Dialog::Result DialogDriver_Win32::AbortRetryIgnore( RString sMessage, RString I
Dialog::Result DialogDriver_Win32::AbortRetry( RString sMessage, RString sID )
{
wstring wsMessage = RStringToWstring(sMessage);
switch( MessageBoxW(::GetHwnd(), wsMessage.c_str(), ::GetWindowTitle().c_str(), MB_RETRYCANCEL) )
switch( MessageBox(::GetHwnd(), ConvertUTF8ToACP(sMessage).c_str(), ConvertUTF8ToACP(::GetWindowTitle()).c_str(), MB_RETRYCANCEL) )
{
case IDRETRY: return Dialog::retry;
default: ASSERT(0);