/**************************************************************************** * [S]imulated [M]edieval [A]dventure multi[U]ser [G]ame | * * -----------------------------------------------------------| \\._.// * * SmaugWiz (C) 1998 by Russ Pillsbury (Windows NT version) | (0...0) * * -----------------------------------------------------------| ).:.( * * SMAUG (C) 1994, 1995, 1996 by Derek Snider | {o o} * * -----------------------------------------------------------| / ' ' \ * * SMAUG code team: Thoric, Altrag, Blodkai, Narn, Haus, |~'~.VxvxV.~'~* * Scryn, Swordbearer, Rennard, Tricops, and Gorog. | * * ------------------------------------------------------------------------ * * Merc 2.1 Diku Mud improvments copyright (C) 1992, 1993 by Michael * * Chastain, Michael Quan, and Mitchell Tse. * * Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, * * Michael Seifert, Hans Henrik Staerfeldt, Tom Madsen, and Katja Nyboe. * ****************************************************************************/ // FilesDlg.cpp : implementation file #include "stdafx.h" #include "SmaugWiz.h" #include "FilesDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CFilesDlg dialog CFilesDlg::CFilesDlg(CWnd* pParent /*=NULL*/) : CDialog(CFilesDlg::IDD, pParent) { //{{AFX_DATA_INIT(CFilesDlg) m_FileRoot = _T(""); //}}AFX_DATA_INIT } void CFilesDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CFilesDlg) DDX_Text(pDX, IDC_EDIT_FILE, m_FileRoot); DDV_MaxChars(pDX, m_FileRoot, 79); DDX_Control(pDX, IDC_BROWSE, m_BrowseCtrl); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CFilesDlg, CDialog) //{{AFX_MSG_MAP(CFilesDlg) ON_WM_HELPINFO() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CFilesDlg message handlers BOOL CFilesDlg::OnHelpInfo(HELPINFO* pHelpInfo) { if (pHelpInfo->iContextType == HELPINFO_WINDOW) { AfxGetApp()->WinHelp( pHelpInfo->dwContextId, HELP_CONTEXTPOPUP); } return TRUE; } BOOL CFilesDlg::OnInitDialog () { CDialog::OnInitDialog (); m_BrowseCtrl.SetDirsOnly (TRUE); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CFilesDlg::OnClickBrowse () { CString s = m_BrowseCtrl.GetResult (); if (! s.IsEmpty ()) m_FileRoot = s; UpdateData (FALSE); } BEGIN_EVENTSINK_MAP(CFilesDlg, CDialog) //{{AFX_EVENTSINK_MAP(CFilesDlg) ON_EVENT(CFilesDlg, IDC_BROWSE, -600 /* Click */, OnClickBrowse, VTS_NONE) //}}AFX_EVENTSINK_MAP END_EVENTSINK_MAP()