-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSplashWindow.h
120 lines (101 loc) · 4.48 KB
/
SplashWindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/*
* Copyright (c) 2004 Apple Enterprises. This code is
* proprietary and a trade secret of Apple Enterprises.
*
* $Workfile: SplashWindow.h $
*
* $Creator: Chris Apple $
*
* $Description: Initial splash screen. $
*
* $Log: /AppleEnterprises/CodeExamples/SplashMFC/SplashMfcSingleDoc/SplashWindow.h $
*
* 1 4/22/09 4:11p Capple
* Initial Checkin.
*
* 1 11/05/04 1:27p Capple
* Initial Checkin.
*
* $NoKeywords: $
*/
#ifndef __SPLASHWINDOW_H__
#define __SPLASHWINDOW_H__
// Splash.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// Splash Screen class
class CSplashWindow : public CWnd
{
// Construction
protected:
CSplashWindow();
// Attributes:
public:
CBitmap m_bitmap;
// Operations
public:
static void ShowSplashScreen(CWnd* pParentWnd = NULL, LPCTSTR statusMessage = NULL, int millisecondsToDisplay=0 );
static void HideSplashScreen();
static BOOL PreTranslateAppMessage(MSG* pMsg);
static CString GetVersionNumber() { return m_versionNumberString; }
static void GetVersionStrings();
static CSize FindFontPointSize( CPaintDC &dc, LPCTSTR fontName, const CStringArray & stringsToCheck, CSize maximumWidth );
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSplashWindow)
//}}AFX_VIRTUAL
// Implementation
public:
~CSplashWindow();
virtual void PostNcDestroy();
protected:
BOOL Create(CWnd* pParentWnd = NULL);
static CSplashWindow* m_pSplashWindow;
// Generated message map functions
protected:
//{{AFX_MSG(CSplashWindow)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnPaint();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
static CString m_productNameString;
static CString m_companyNameString;
static CString m_versionNumberString;
static CString m_versionString;
static CString m_copyrightString;
static CString m_commentsString;
static CString m_statusMessage;
static int m_millisecondsToDisplay; // 0 ==> until mouse click or keystroke
// create rectangle that product name has to fit in
static const int m_productNameVerticalOffset; // empty space between top border and Product Name
static const int m_productNameVerticalHeight; // maximum height of Product Name
static const int m_productNameLeftMargin; // distance from left side to place name, company, copyright and version
static const int m_productNameRightMargin; // distance from right side to place name, company, copyright and version
static const CString m_productNameFontName; // name of font for application name
static CSize m_productNamePointSize; // point size used for the application name
static COLORREF m_productNameTextColor; // color used for text
static const BOOL m_displayCompanyName; // true if displaying companyName
static const BOOL m_displayVersion; // true if displaying version
static const BOOL m_displayCopyright; // true if displaying copyright
static const BOOL m_displayComments; // true if displaying comments
// create rectangle that strings in body have to fit in
static const int m_bodyVerticalOffset; // empty space between top border and top of body
static const int m_bodyVerticalHeight; // maximum height of body
static const int m_bodyLeftMargin; // distance from left side to place company name, copyright, version and comment
static const int m_bodyRightMargin; // distance from right side to place company name, copyright, version and comment
static const CString m_bodyFontName; // name of font for company name, copyright, version and comment
static CSize m_bodyPointSize; // point size used for company name, copyright, version and comment
static COLORREF m_bodyTextColor; // color used for company name, copyright, version and comment
// create rectangle for status line string
static const int m_statusVerticalOffset; // empty space between top border and top of status string
static const int m_statusVerticalHeight; // maximum height of status string
static const int m_statusLeftMargin; // distance from left side to place status string
static const int m_statusRightMargin; // distance from right side to place status string
static const CString m_statusMessageFontName; // name of font for status message while starting
static CSize m_statusMessagePointSize; // point size used for status message while starting
static COLORREF m_statusMessageTextColor; // color used for status message while starting
};
#endif