mydlg.h
来自「自定义修改打开文件对话框」· C头文件 代码 · 共 41 行
H
41 行
////////////////////////////////////////////////////////////////
// If this code works, it was written by Paul DiLascia.
// If not, I don't know who wrote it.
// Compiles with Visual C++ 6.0 for Windows XP and probably Windows 2000 too.
//
#include "FileDlgHelper.h"
//////////////////
// My open dialog -- customized to add preview, debug panes, and Select All
// button.
//
class CMyOpenDlg : public CFileDialog {
protected:
CFileDlgHelper m_dlghelper; // helper for file dialogs
CEdit m_edit1; // edit control for preview
CEdit m_edit2; // another for debug info
// Heplers
CString GetTextPreview(LPCTSTR pszPath);
void AddText(CEdit& wndEdit, LPCTSTR lpText, BOOL bClear=FALSE);
void ShowFileInfo();
public:
CMyOpenDlg();
// Handle CDN_ notifications
virtual void OnFileNameChange();
virtual void OnFolderChange();
virtual void OnTypeChange();
// Command/message/UI handlers/overrides
virtual int DoModal();
virtual BOOL OnInitDialog();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnSelectAll();
afx_msg void OnUpdateSelectAll(CCmdUI* pCmdUI);
DECLARE_DYNAMIC(CMyOpenDlg)
DECLARE_MESSAGE_MAP()
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?