⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myfiledialog1.cpp

📁 这是书上的代码
💻 CPP
字号:
// MyFileDialog1.cpp : implementation file
//

#include "stdafx.h"
#include "const.h"
#include "paintobj.h"
#include "MyFileDialog1.h"
#include <DLGS.H>

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

/////////////////////////////////////////////////////////////////////////////
// CMyFileDialog1

IMPLEMENT_DYNAMIC(CMyFileDialog1, CFileDialog)

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


BEGIN_MESSAGE_MAP(CMyFileDialog1, CFileDialog)
	//{{AFX_MSG_MAP(CMyFileDialog1)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


void CMyFileDialog1::OnTypeChange()
{	
/*	m_filetitle=CFileDialog::GetFileTitle();
	m_fileextname=CFileDialog::GetFileExt();		
	CFileDialog::OnTypeChange();
	UINT a=CFileDialog::m_ofn.nFilterIndex;
	CWnd* pFD = GetParent();
	switch(a)
	{
		case 1:
		//	AfxMessageBox("0!");
			break;
		case 2:
		//	AfxMessageBox("1!");
			
		//	pFD->GetDlgItem(edt1)->SetWindowText(ss+".bin1");
		//	pFD->GetDlgItem(edt1)->GetWindowText(ss);
			//AfxMessageBox(ss);
		//	m_fileextname="bin1";
			break;
		case 3:
		//	AfxMessageBox("2!");
		//	pFD->GetDlgItem(edt1)->SetWindowText(ss+".bin2");
		//	pFD->GetDlgItem(edt1)->GetWindowText(ss);
			//AfxMessageBox(ss);
		//	m_fileextname="bin2";
			break;	
		case 4:
		//	AfxMessageBox("4!");
			break;

	}
*/	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -