|
//***************************************************************************
//*
//* File: DialogFolder.cpp
//* Description: Folder dialog
//*
//***************************************************************************
//
//--------------------------------------------------------------- PRECOMPILED
//
#include "stdafx.h"
//
//--------------------------------------------------- DECLARATION DEPENDENCIES
//
#include "SmartReplace.h"
//
//--------------------------------------------------------------- DECLARATION
//
#include "DialogFolder.h"
//
//--------------------------------------------------- DEFINITION DEPENDENCIES
//
#include "FolderDialog.h"
//
//-------------------------------------------------------------- PREPROCESSOR
//
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//
//---------------------------------------------------------------- DEFINITION
//
//
//---------------------------------------------------------------------------------------------------
//************************************* CON/DESTRUCTION *************************************
//---------------------------------------------------------------------------------------------------
//
//***************************************************************************************************
//** Constructor
//***************************************************************************************************
//** @DOC CONSTRUCTION
//** @MFUNC Default constructor
//** @PARM [in|opt] Pointer to the parent window
//** @END
//***************************************************************************************************
//inline
CDialogFolder::CDialogFolder( CWnd* pParent /*=NULL*/ )
: CDialog( CDialogFolder::IDD, pParent )
{
//{{AFX_DATA_INIT(CDialogFolder)
m_bRecurse = FALSE;
m_strPath = _T("");
//}}AFX_DATA_INIT
}
//
//---------------------------------------------------------------------------------------------------
//**************************************** VIRTUALS *****************************************
//---------------------------------------------------------------------------------------------------
//
//***************************************************************************************************
//** DoDataExchange
//***************************************************************************************************
//** @DOC VIRTUALS
//** @MFUNC Exchanges data between the dialog's members and its controls
//** @PARM [in/out] Pointer to data exchange context
//** @END
//***************************************************************************************************
//inline
void CDialogFolder::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange( pDX );
//{{AFX_DATA_MAP(CDialogFolder)
DDX_Check ( pDX, IDC_CHECK_RECURSE, m_bRecurse );
DDX_Text ( pDX, IDC_EDIT_PATH , m_strPath );
//}}AFX_DATA_MAP
}
//
//---------------------------------------------------------------------------------------------------
//**************************************** MESSAGES *****************************************
//---------------------------------------------------------------------------------------------------
//
BEGIN_MESSAGE_MAP( CDialogFolder, CDialog )
//{{AFX_MSG_MAP(CDialogFolder)
ON_BN_CLICKED( IDC_BROWSE, OnBrowse )
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
//***************************************************************************************************
//** OnOK
//***************************************************************************************************
//** @DOC MESSAGES
//** @MFUNC
//** @END
//***************************************************************************************************
//inline
void CDialogFolder::OnOK()
{
CDialog::OnOK();
}
//***************************************************************************************************
//** OnBrowse
//***************************************************************************************************
//** @DOC MESSAGES
//** @MFUNC
//** @END
//***************************************************************************************************
//inline
void CDialogFolder::OnBrowse()
{
//
// UPDATE MEMBERS FROM CONTROLS
//
this->UpdateData( TRUE );
//
// BROWSE FOLDER
//
CFolderDialog dlgFolder ( _T( "Select Search Directory" )
, _T( "Select the place where you want to start your search from the list below:" )
, this->m_strPath
);
if ( IDOK != dlgFolder.DoModal() )
{
return;
}
//
// KEEP FOLDER
//
this->m_strPath = dlgFolder.GetPath();
//
// UPDATE MEMBERS TO CONTROLS
//
this->UpdateData( FALSE );
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.