📄 filedlg.h
字号:
/********************************************************************
Copyright 2006-2008 ZHANG Luduo. All Rights Reserved.
Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear
in supporting documentation.
********************************************************************/
/*
代码描述:
通用对话框之[文件打开], [文件保存], [目录浏览]
关于作者:
姓名 - 张鲁夺, ZHANG Luduo
MSN - zhangluduo@msn.com
Email - zhangluduo@163.com
QQ群 - 34064264, 56918155, 56918241
网站 - http://www.oopfans.com
为所有爱我的人和我爱的人努力!
*/
#ifndef _FILEDLG_H
#define _FILEDLG_H
#include "tstring.h"
#include "Thunk.h"
#pragma comment(lib, "Thunk.lib")
#pragma warning(disable : 4786 4018 4996)
#include <vector>
using namespace std;
class FileDlg
{
public:
FileDlg();
virtual ~FileDlg();
vector<tstring> GetOpenFileName(HWND hWnd, BOOL bMultiSelect = FALSE,
TCHAR* strFilter = NULL, tstring strInitName = _T(""),
tstring strInitDir = _T(""));
tstring GetSaveFileName(HWND hWnd, BOOL bAutoAddExtName = TRUE,
TCHAR* strFilter = NULL, tstring strInitName = _T(""),
tstring strInitDir = _T(""));
tstring GetBrowseForFolder(HWND hWnd, tstring strInitDir = _T(""));
void SetBufferSize(DWORD dwBufferSize);
DWORD GetBufferSize();
protected:
OPENFILENAME m_OFNOpen;
OPENFILENAME m_OFNSave;
BROWSEINFO m_BIFBrowse;
protected:
virtual UINT_PTR OpenProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
virtual UINT_PTR SaveProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
virtual int BrowseProc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
private:
Thunk m_lpOpenProc;
Thunk m_lpSaveProc;
Thunk m_lpBrowseProc;
tstring m_InitName;
tstring m_InitDir;
TCHAR* m_NameBuf;
DWORD m_dwBufferSize;
BOOL m_bBrowseInit;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -