From effc648f262bd3bd7b57d4e76db2f768510be55c Mon Sep 17 00:00:00 2001 From: Ian C Date: Tue, 29 Mar 2005 01:22:42 +0000 Subject: Tweaks to Text controls and text handling. --- src/common.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/common.cpp') diff --git a/src/common.cpp b/src/common.cpp index 2c9d01f..383a773 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -32,6 +32,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) @@ -40,6 +48,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) @@ -48,6 +64,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, -- cgit v1.2.3