|
#include "stdafx.h"
#include "FTPexample.h"
#include "FTPBrowseForFileAndFolder.h"
using namespace nsFTP;
using namespace nsFTP::nsView;
BEGIN_MESSAGE_MAP(CFTPBrowseForFileAndFolderDlg, CDialog)
END_MESSAGE_MAP()
IMPLEMENT_DYNAMIC(CFTPBrowseForFileAndFolderDlg, CDialog)
CFTPBrowseForFileAndFolderDlg::CFTPBrowseForFileAndFolderDlg(CWnd* pParent /*=NULL*/) :
CDialog(CFTPBrowseForFileAndFolderDlg::IDD, pParent),
m_fFiles(false)
{
}
CFTPBrowseForFileAndFolderDlg::~CFTPBrowseForFileAndFolderDlg()
{
}
void CFTPBrowseForFileAndFolderDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_FTP_TREE, m_ctrlFtpTree);
}
BOOL CFTPBrowseForFileAndFolderDlg::OnInitDialog()
{
CDialog::OnInitDialog();
m_ctrlFtpTree.DisplayTree(m_pFTP, m_pFTP->LastLogonInfo().Hostname().c_str(), _T("/"), m_fFiles);
return TRUE;
}
INT_PTR CFTPBrowseForFileAndFolderDlg::DoModal(nsFTP::CFTPClient* pFTP, bool fFiles)
{
m_pFTP = pFTP;
m_fFiles = fFiles;
return CDialog::DoModal();
}
CString CFTPBrowseForFileAndFolderDlg::GetFullPath() const
{
return m_cszFullPath;
}
void CFTPBrowseForFileAndFolderDlg::OnOK()
{
m_cszFullPath = m_ctrlFtpTree.GetFullPath(m_ctrlFtpTree.GetSelectedItem());
CDialog::OnOK();
}
|
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 member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.