-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTabHelp.cpp
More file actions
109 lines (85 loc) · 2.37 KB
/
TabHelp.cpp
File metadata and controls
109 lines (85 loc) · 2.37 KB
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
// TabHelp.cpp : implementation file
//
#include "stdafx.h"
#include "launcher.h"
#include "TabHelp.h"
#include "Win32func.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTabHelp dialog
CTabHelp::CTabHelp(CWnd* pParent /*=NULL*/)
: CDialog(CTabHelp::IDD, pParent)
{
//{{AFX_DATA_INIT(CTabHelp)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CTabHelp::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTabHelp)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTabHelp, CDialog)
//{{AFX_MSG_MAP(CTabHelp)
ON_BN_CLICKED(IDC_GAME_README, OnReadme)
ON_BN_CLICKED(IDC_GOTO_FORUM, OnGotoForum)
ON_BN_CLICKED(IDC_REPORT_BUG, OnReportBug)
ON_BN_CLICKED(IDC_FEATURES_ON, OnFeaturesOn)
ON_BN_CLICKED(IDC_FEATURES_OFF, OnFeaturesOff)
ON_BN_CLICKED(IDC_CUSTOM, OnCustom)
ON_BN_CLICKED(IDC_REGISTER_BUTTON, OnRegisterButton)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTabHelp message handlers
void CTabHelp::OnReadme()
{
OpenInternetPage("http://www.hard-light.net/wiki/index.php/Main_Page");
}
void CTabHelp::OnGotoForum()
{
OpenInternetPage("http://www.hard-light.net/forums/index.php/board,50.0.html");
}
void CTabHelp::OnReportBug()
{
OpenInternetPage("http://scp.indiegames.us/mantis/main_page.php");
}
void CTabHelp::OpenInternetPage(char *path)
{
open_web_page(path);
}
void CTabHelp::OnFeaturesOn()
{
}
void CTabHelp::OnFeaturesOff()
{
}
void CTabHelp::OnCustom()
{
}
BOOL CTabHelp::OnInitDialog()
{
CDialog::OnInitDialog();
srand( (unsigned)time( NULL ) );
GetDlgItem(IDC_LOGO1)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_LOGO2)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_LOGO3)->ShowWindow(SW_HIDE);
switch(rand() % 3)
{
case 0: GetDlgItem(IDC_LOGO1)->ShowWindow(SW_SHOW); break;
case 1: GetDlgItem(IDC_LOGO2)->ShowWindow(SW_SHOW); break;
case 2: GetDlgItem(IDC_LOGO3)->ShowWindow(SW_SHOW); break;
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CTabHelp::OnRegisterButton()
{
OpenInternetPage("http://www.game-warden.com/forum/showthread.php?t=267");
}