// LimitedFileDialog.cpp : implementation file
//

#include "stdafx.h"
#include "TCTb.h"
#include "LimitedFileDialog.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CLimitedFileDialog

IMPLEMENT_DYNAMIC(CLimitedFileDialog, CFileDialog)

CLimitedFileDialog::CLimitedFileDialog(BOOL bOpenFileDialog, LPCTSTR lpszDefExt, LPCTSTR lpszFileName,
									   DWORD dwFlags, LPCTSTR lpszFilter, CWnd* pParentWnd) :
CFileDialog(bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd)
{
}


BEGIN_MESSAGE_MAP(CLimitedFileDialog, CFileDialog)
//{{AFX_MSG_MAP(CLimitedFileDialog)
	ON_WM_CREATE()
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


void CLimitedFileDialog::OnFolderChange()
{
}

void CLimitedFileDialog::SetDir(CString &dir)
{
	Path=dir;
}

int CLimitedFileDialog::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CFileDialog::OnCreate(lpCreateStruct) == -1)
		return -1;
	// TODO: Add your specialized creation code here
	
	return 0;
}

BOOL CLimitedFileDialog::OnInitDialog() 
{
	CFileDialog::OnInitDialog();
	SetWindowText(wstr);	
	
	// TODO: Add extra initialization here
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CLimitedFileDialog::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	// TODO: Add your message handler code here
	SetWindowText(wstr);	
	
	// Do not call CFileDialog::OnPaint() for painting messages
}
