This commit is contained in:
2024-08-07 09:16:27 -04:00
parent fdfadd5c7e
commit 5f971cf684
5200 changed files with 731717 additions and 0 deletions

47
guitar/MessageBox.hpp Normal file
View File

@@ -0,0 +1,47 @@
#ifndef _GUITAR_MESSAGE_HPP_
#define _GUITAR_MESSAGE_HPP_
#ifndef _COMMON_WINDOWS_HPP_
#include <common/windows.hpp>
#endif
#ifndef _COMMON_GUIWINDOW_HPP_
#include <common/guiwnd.hpp>
#endif
#ifndef _COMMON_VERSIONINFO_HPP_
#include <common/versioninfo.hpp>
#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