Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.7 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: MessageBox.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of MessageBox.h
  13. //----------------------------------------------------------------------------
  14. // MessageBox.h: interface for the CMessageBox class.
  15. //
  16. //////////////////////////////////////////////////////////////////////
  17. #if !defined(AFX_MESSAGEBOX_H__950AF360_57CE_11D5_99E3_8309131E3F42__INCLUDED_)
  18. #define AFX_MESSAGEBOX_H__950AF360_57CE_11D5_99E3_8309131E3F42__INCLUDED_
  19. #if _MSC_VER > 1000
  20. #pragma once
  21. #endif // _MSC_VER > 1000
  22. #include "Dialog.h"
  23. class CMessageBox :
  24. protected CDialog
  25. {
  26. protected:
  27. CMessageBox( LPCTSTR pTemplateName );
  28. virtual ~CMessageBox();
  29. public:
  30. static int MessageBox( HWND hParent, LPCTSTR pText, LPCTSTR pCaption, UINT uType );
  31. private:
  32. virtual BOOL DialogProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
  33. private:
  34. BOOL OnInitDialog( HWND hWnd, WPARAM wParam, LPARAM lParam );
  35. BOOL OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam );
  36. private:
  37. LPCTSTR m_pText;
  38. LPCTSTR m_pCaption;
  39. UINT m_uType;
  40. };
  41. inline int CMessageBox::MessageBox( HWND hParent, LPCTSTR pText, LPCTSTR pCaption, UINT uType )
  42. {
  43. CMessageBox mb( (LPCTSTR)IDD_MESSAGE_BOX_DLG );
  44. mb.m_pText = pText;
  45. mb.m_pCaption = pCaption;
  46. mb.m_uType = uType;
  47. return mb.DoModal( hParent );
  48. }
  49. #endif // !defined(AFX_MESSAGEBOX_H__950AF360_57CE_11D5_99E3_8309131E3F42__INCLUDED_)