summaryrefslogtreecommitdiff
path: root/src/common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.cpp')
-rw-r--r--src/common.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/common.cpp b/src/common.cpp
index 2c9d01f..383a773 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -34,6 +34,14 @@ void Common::Message(HWND parent, const char *msg)
// ------------------------------------------------------------
//
+void Common::Message(HWND parent, const std::string& msg)
+{
+ ::MessageBox(parent,msg.c_str(),"Message",MB_ICONINFORMATION|MB_OK);
+}
+
+
+// ------------------------------------------------------------
+//
void Common::Error(HWND parent, const char *msg)
{
::MessageBox(parent,msg,"Error",MB_ICONSTOP|MB_OK);
@@ -42,6 +50,14 @@ void Common::Error(HWND parent, const char *msg)
// ------------------------------------------------------------
//
+void Common::Error(HWND parent, const std::string& msg)
+{
+ ::MessageBox(parent,msg.c_str(),"Error",MB_ICONSTOP|MB_OK);
+}
+
+
+// ------------------------------------------------------------
+//
bool Common::Query(HWND parent, const char *msg)
{
return ::MessageBox(parent,msg,"Question",MB_ICONQUESTION|MB_YESNO)==IDOK;
@@ -50,6 +66,15 @@ bool Common::Query(HWND parent, const char *msg)
// ------------------------------------------------------------
//
+bool Common::Query(HWND parent, const std::string& msg)
+{
+ return ::MessageBox(parent,msg.c_str(),"Question",
+ MB_ICONQUESTION|MB_YESNO)==IDOK;
+}
+
+
+// ------------------------------------------------------------
+//
bool Common::OpenFile(HWND parent,
const char *title,
std::string& path,