//---------------------------------------------------------------------------- // Laser Guard Ltd. // Copyright © 2000-2002. All Rights Reserved. // Version 1.0 01/01/2000 // Last modification: 08/10/2003 // PROJECT: // SUBSYSTEM: // FILE: MessageBox.h // AUTHOR: Sergey Chizhevskiy // OVERVIEW // ~~~~~~~~ // Header file of MessageBox.h //---------------------------------------------------------------------------- // MessageBox.h: interface for the CMessageBox class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_MESSAGEBOX_H__950AF360_57CE_11D5_99E3_8309131E3F42__INCLUDED_) #define AFX_MESSAGEBOX_H__950AF360_57CE_11D5_99E3_8309131E3F42__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "Dialog.h" class CMessageBox : protected CDialog { protected: CMessageBox( LPCTSTR pTemplateName ); virtual ~CMessageBox(); public: static int MessageBox( HWND hParent, LPCTSTR pText, LPCTSTR pCaption, UINT uType ); private: virtual BOOL DialogProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); private: BOOL OnInitDialog( HWND hWnd, WPARAM wParam, LPARAM lParam ); BOOL OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam ); private: LPCTSTR m_pText; LPCTSTR m_pCaption; UINT m_uType; }; inline int CMessageBox::MessageBox( HWND hParent, LPCTSTR pText, LPCTSTR pCaption, UINT uType ) { CMessageBox mb( (LPCTSTR)IDD_MESSAGE_BOX_DLG ); mb.m_pText = pText; mb.m_pCaption = pCaption; mb.m_uType = uType; return mb.DoModal( hParent ); } #endif // !defined(AFX_MESSAGEBOX_H__950AF360_57CE_11D5_99E3_8309131E3F42__INCLUDED_)