-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathGamePropertiesDialog.cpp
More file actions
64 lines (52 loc) · 2.04 KB
/
GamePropertiesDialog.cpp
File metadata and controls
64 lines (52 loc) · 2.04 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
// GamePropertiesDialog.cpp : implementation file
//
#include "stdafx.h"
#include "SCIPicEditor.h"
#include "GamePropertiesDialog.h"
// CGamePropertiesDialog dialog
CGamePropertiesDialog::CGamePropertiesDialog(CWnd* pParent /*=NULL*/)
: CExtNCW<CExtResizableDialog>(CGamePropertiesDialog::IDD, pParent)
{
}
CGamePropertiesDialog::~CGamePropertiesDialog()
{
}
void CGamePropertiesDialog::DoDataExchange(CDataExchange* pDX)
{
ShowSizeGrip(FALSE);
CExtResizableDialog::DoDataExchange(pDX);
DDX_Check(pDX, IDC_RADIOCPP, _fCPPSyntax);
DDX_Check(pDX, IDC_RADIOSCISTUDIO, _fSCIStudioSyntax);
DDX_Text(pDX, IDC_EDITGAMENAME, _strGameName);
DDX_Text(pDX, IDC_EDITEXECUTABLE, _strGameExecutable);
DDX_Text(pDX, IDC_EDITEXECUTABLEPARAMETERS, _strGameExecutableParameters);
DDX_Control(pDX, IDC_BUTTONBROWSE, m_wndBrowse);
DDX_Control(pDX, IDOK, m_wndOk);
DDX_Control(pDX, IDCANCEL, m_wndCancel);
DDX_Control(pDX, IDC_RADIOCPP, m_wndRadioCpp);
DDX_Control(pDX, IDC_RADIOSCISTUDIO, m_wndRadioSCIStudio);
DDX_Control(pDX, IDC_STATICSCRIPTLANG, m_wndLanguage);
DDX_Control(pDX, IDC_STATICGENERAL, m_wndGeneral);
DDX_Control(pDX, IDC_STATICGAMENAME, m_wndGameName);
DDX_Control(pDX, IDC_STATICEXE, m_wndExe);
DDX_Control(pDX, IDC_STATICEXEPARAM, m_wndExeParam);
}
void CGamePropertiesDialog::OnBrowse()
{
CFileDialog fileDialog(TRUE,
NULL,
NULL,
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
TEXT("Programs|*.exe;*.cmd;*.bat|All files|*.*||"));
std::string gameFolder = theApp.GetResourceMap().GetGameFolder();
fileDialog.m_pOFN->lpstrInitialDir = gameFolder.c_str();
if (IDOK == fileDialog.DoModal())
{
// Transfer the filename to the editbox.
SetDlgItemText(IDC_EDITEXECUTABLE, fileDialog.GetFileName());
}
}
BEGIN_MESSAGE_MAP(CGamePropertiesDialog, CExtNCW<CExtResizableDialog>)
ON_COMMAND(IDC_BUTTONBROWSE, OnBrowse)
END_MESSAGE_MAP()
// CGamePropertiesDialog message handlers