2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
4 * All source code herein is the property of Volition, Inc. You may not sell
5 * or otherwise commercially exploit the source or things you created based on
10 * $Logfile: /Freespace2/code/FRED2/PrefsDlg.cpp $
15 * Fred Preferences dialog box handling code
18 * Revision 1.3 2002/06/09 04:41:16 relnev
19 * added copyright header
21 * Revision 1.2 2002/05/07 03:16:44 theoddone33
22 * The Great Newline Fix
24 * Revision 1.1.1.1 2002/05/03 03:28:08 root
28 * 2 10/07/98 6:28p Dave
29 * Initial checkin. Renamed all relevant stuff to be Fred2 instead of
30 * Fred. Globalized mission and campaign file extensions. Removed Silent
31 * Threat specific code.
33 * 1 10/07/98 3:01p Dave
35 * 1 10/07/98 3:00p Dave
37 * 3 2/17/97 5:28p Hoffoss
38 * Checked RCS headers, added them were missing, changing description to
39 * something better, etc where needed.
53 static char THIS_FILE[] = __FILE__;
56 /////////////////////////////////////////////////////////////////////////////
61 CPrefsDlg::CPrefsDlg(CWnd* pParent /*=NULL*/)
62 : CDialog(CPrefsDlg::IDD, pParent)
64 //{{AFX_DATA_INIT(CPrefsDlg)
65 m_ConfirmDeleting = TRUE;
66 m_ShowCapitalShips = TRUE;
67 m_ShowElevations = TRUE;
68 m_ShowFighters = TRUE;
70 m_ShowMiscObjects = TRUE;
72 m_ShowWaypoints = TRUE;
73 m_ShowStarfield = FALSE;
77 extern int Show_stars;
79 void CPrefsDlg::DoDataExchange(CDataExchange* pDX)
81 CDialog::DoDataExchange(pDX);
82 //{{AFX_DATA_MAP(CPrefsDlg)
83 DDX_Check(pDX, ID_CONFIRM_DELETING, m_ConfirmDeleting);
84 DDX_Check(pDX, ID_SHOW_CAPITALSHIPS, m_ShowCapitalShips);
85 DDX_Check(pDX, ID_SHOW_ELEVATIONS, m_ShowElevations);
86 DDX_Check(pDX, ID_SHOW_FIGHTERS, m_ShowFighters);
87 DDX_Check(pDX, ID_SHOW_GRID, m_ShowGrid);
88 DDX_Check(pDX, ID_SHOW_MISCOBJECTS, m_ShowMiscObjects);
89 DDX_Check(pDX, ID_SHOW_PLANETS, m_ShowPlanets);
90 DDX_Check(pDX, ID_SHOW_WAYPOINTS, m_ShowWaypoints);
91 DDX_Check(pDX, IDC_PREF_STARFIELD, m_ShowStarfield);
94 Show_stars = m_ShowStarfield;
95 // CFREDView::SetViewParms(m_ConfirmDeleting);
99 BEGIN_MESSAGE_MAP(CPrefsDlg, CDialog)
100 //{{AFX_MSG_MAP(CPrefsDlg)
101 ON_BN_CLICKED(IDC_SAVE_DEFAULT_PREFS, OnSaveDefaultPrefs)
106 /////////////////////////////////////////////////////////////////////////////
107 // CPrefsDlg message handlers
109 void CPrefsDlg::OnSaveDefaultPrefs()
111 // Put code to save user prefs here.
113 m_ConfirmDeleting = 1;
116 void CPrefsDlg::OnClose()
118 // MessageBeep((WORD) -1);
123 BOOL CPrefsDlg::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
125 // MessageBeep((WORD) -1);
127 return CDialog::Create(IDD, pParentWnd);