#ifndef _GUITAR_MESSAGE_HPP_ #define _GUITAR_MESSAGE_HPP_ #ifndef _COMMON_WINDOWS_HPP_ #include #endif #ifndef _COMMON_GUIWINDOW_HPP_ #include #endif #ifndef _COMMON_VERSIONINFO_HPP_ #include #endif class MessageBox { public: static LRESULT messageBox(GUIWindow &parent,const String &strCaption,const String &strText,UINT type=MB_OK); static LRESULT messageBox(const String &strCaption,const String &strText,UINT type=MB_OK); private: MessageBox(); static String getProductVersion(const VersionInfo &versionInfo); }; inline MessageBox::MessageBox() { } inline LRESULT MessageBox::messageBox(GUIWindow &parent,const String &strCaption,const String &strText,UINT type) { VersionInfo versionInfo; return ::MessageBox(parent,strText,getProductVersion(versionInfo)+String(" ")+strCaption,type); } inline LRESULT MessageBox::messageBox(const String &strCaption,const String &strText,UINT type) { VersionInfo versionInfo; return ::MessageBox(0,strText,getProductVersion(versionInfo)+String(" ")+strCaption,type); } inline String MessageBox::getProductVersion(const VersionInfo &versionInfo) { return String("[")+versionInfo.getProductNameString()+String(" ")+versionInfo.getProductVersion()+String("]"); } #endif