myfiledlg.cpp
来自「中国象棋网络版」· C++ 代码 · 共 51 行
CPP
51 行
// myfiledlg.cpp : implementation file
//
#include "stdafx.h"
#include "chineseqi.h"
#include "myfiledlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// myfiledlg
IMPLEMENT_DYNAMIC(myfiledlg, CFileDialog)
myfiledlg::myfiledlg(BOOL bOpenFileDialog, LPCTSTR lpszDefExt, LPCTSTR lpszFileName,
DWORD dwFlags, LPCTSTR lpszFilter, CWnd* pParentWnd) :
CFileDialog(bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd)
{
m_ofn.Flags |= (OFN_EXPLORER | OFN_ENABLETEMPLATE);
m_ofn.lpTemplateName = MAKEINTRESOURCE(PREVIEWFILE);
}
BEGIN_MESSAGE_MAP(myfiledlg, CFileDialog)
//{{AFX_MSG_MAP(myfiledlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BOOL myfiledlg::OnInitDialog()
{
CFileDialog::OnInitDialog();
// TODO: Add extra initialization here
m_static.SubclassDlgItem(BMPREVIEW,this);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void myfiledlg::OnFileNameChange()
{
m_static.draw(GetPathName());
}
void myfiledlg::OnFolderChange()
{
m_static.clear();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?