summaryrefslogtreecommitdiff
path: root/src/common.cpp
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2005-03-29 01:22:42 +0000
committerIan C <ianc@noddybox.co.uk>2005-03-29 01:22:42 +0000
commiteffc648f262bd3bd7b57d4e76db2f768510be55c (patch)
treed77a2e04e58847a3517649ffa83f86b066de08f6 /src/common.cpp
parent82f1d860690dc0a2d0210db12344f7ea5e88b6a4 (diff)
Tweaks to Text controls and text handling.
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,