rpcs3/Utilities/rMsgBox.cpp

36 lines
809 B
C++
Raw Normal View History

#include "stdafx.h"
#include "restore_new.h"
2015-01-25 16:23:24 +00:00
#pragma warning(disable : 4996)
#include <wx/msgdlg.h>
#include "define_new_memleakdetect.h"
2014-08-22 14:21:55 +00:00
#include "rMsgBox.h"
2014-07-11 17:06:59 +00:00
#ifndef QT_UI
rMessageDialog::rMessageDialog(void *parent, const std::string& msg, const std::string& title , long style )
{
handle = reinterpret_cast<void*>(new wxMessageDialog(
reinterpret_cast<wxWindow*>(parent)
, fmt::FromUTF8(msg)
, fmt::FromUTF8(title)
, style
));
}
rMessageDialog::~rMessageDialog()
{
delete reinterpret_cast<wxMessageDialog*>(handle);
}
long rMessageDialog::ShowModal()
{
return reinterpret_cast<wxMessageDialog*>(handle)->ShowModal();
}
long rMessageBox(const std::string& message, const std::string& title, long style)
{
return wxMessageBox(fmt::FromUTF8(message), fmt::FromUTF8(title),style);
}
2014-07-11 17:06:59 +00:00
#endif