ScummVM API documentation
cmessbox.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef HODJNPODJ_HNPLIBS_CMESSBOX_H
23 #define HODJNPODJ_HNPLIBS_CMESSBOX_H
24 
25 #include "bagel/afxwin.h"
26 #include "bagel/hodjnpodj/hnplibs/cbofdlg.h"
27 #include "bagel/hodjnpodj/hnplibs/text.h"
28 
29 namespace Bagel {
30 namespace HodjNPodj {
31 
32 #define TEXT_COLOR RGB(0, 0, 0) // displayed text color
33 
34 #define MESSAGE_COL 16 // first message box positioning
35 #define MESSAGE_ROW 60
36 
37 #define MESSAGE_WIDTH 186 // standard message box dims
38 #define MESSAGE_HEIGHT 20
39 
40 #define MESSAGE2_ROW_OFFSET ( MESSAGE_HEIGHT + 4 ) // Row offset from first
41 // message box
42 
43 #define IDD_GAMEOVER 201
44 
45 class CMessageBox : public CBmpDialog {
46 private:
47  CText *m_cTextMessage1, *m_cTextMessage2;
48  const char *m_pMessage1, *m_pMessage2;
49 
50 public:
51  // standard constructor
52  CMessageBox(CWnd *pParent, CPalette *pPalette, const char *msg1, const char *msg2 = nullptr, const int dx = -1, const int dy = -1);
53 
54  void ClearDialogImage();
55 
56  // Dialog Data
57  //{{AFX_DATA(CMessageBox)
58  enum { IDD = IDD_GAMEOVER };
59  // NOTE: the ClassWizard will add data members here
60  //}}AFX_DATA
61 
62 protected:
63  // Implementation
64  virtual void DoDataExchange(CDataExchange* pDX) override; // DDX/DDV support
65 
66  // Generated message map functions
67  //{{AFX_MSG(CMessageBox)
68  afx_msg void OnPaint();
69  virtual void OnOK() override;
70  virtual void OnCancel() override;
71  virtual bool OnInitDialog() override;
72  afx_msg void OnDestroy();
73  afx_msg bool OnEraseBkgnd(CDC *pDC);
74  //}}AFX_MSG
75  DECLARE_MESSAGE_MAP()
76 };
77 
78 } // namespace HodjNPodj
79 } // namespace Bagel
80 
81 #endif
Definition: afxwin.h:1141
Definition: minwindef.h:292
Definition: afxwin.h:667
Definition: afxwin.h:721
Definition: cbofdlg.h:31
Definition: afxwin.h:27
Definition: text.h:62
Definition: cmessbox.h:45