Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /WinCS/MsgBox.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11 - (hide annotations) (download) (as text)
Wed Feb 10 18:21:00 2010 UTC (14 years, 2 months ago) by sho1get
File MIME type: text/x-chdr
File size: 946 byte(s)


1 sho1get 11 #pragma once
2    
3     //////////////////////////////////////////////////////////////////////////
4    
5     #define MSG_ERROR (MB_OK | MB_ICONSTOP)
6     #define MSG_EXCLAMATION (MB_OK | MB_ICONWARNING)
7     #define MSG_INFORMATION (MB_OK | MB_ICONINFORMATION)
8     #define MSG_QUESTION (MB_YESNO | MB_ICONQUESTION)
9    
10     class CMsgBox
11     {
12     public:
13     static void Error(LPTSTR szText, LPTSTR szTitle, HWND hWnd = NULL)
14     {
15     MessageBox(hWnd, szText, szTitle, MSG_ERROR);
16     }
17    
18     static void Exclamation(LPTSTR szText, LPTSTR szTitle, HWND hWnd = NULL)
19     {
20     MessageBox(hWnd, szText, szTitle, MSG_EXCLAMATION);
21     }
22    
23     static void Information(LPTSTR szText, LPTSTR szTitle, HWND hWnd = NULL)
24     {
25     MessageBox(hWnd, szText, szTitle, MSG_INFORMATION);
26     }
27    
28     static int Question(LPTSTR szText, LPTSTR szTitle, HWND hWnd = NULL)
29     {
30     return MessageBox(hWnd, szText, szTitle, MSG_QUESTION);
31     }
32     };
33    
34     //////////////////////////////////////////////////////////////////////////

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26