#include "pch.h"
#include "BKMessageBox.h"

const CString CBKMessageBox::m_strCaption = _T("BKEmu сообщает");

int CBKMessageBox::Show(CString strText, UINT nType, UINT nIDHelp)
{
	return MessageBox(m_hwnd, strText.GetString(), m_strCaption.GetString(), nType | MB_SETFOREGROUND);
}

int CBKMessageBox::Show(LPCTSTR lpszText, UINT nType, UINT nIDHelp)
{
	// return AfxMessageBox(lpszText, nType | MB_SETFOREGROUND, nIDHelp);
	return MessageBox(m_hwnd, lpszText, m_strCaption.GetString(), nType | MB_SETFOREGROUND);
}

int CBKMessageBox::Show(UINT strID, UINT nType, UINT nIDHelp)
{
	CString strMessage;
	BOOL bValid = strMessage.LoadString(strID);

	if (!bValid)
	{
		strMessage.Format(_T("Неверный ID %#0X сообщения."), strID);
	}

	return Show(strMessage.GetString(), nType, nIDHelp);
}


CBKMessageBox g_BKMsgBox;

