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

📄 bindfiledlg.h

📁 利用vc++实现多文件合并与任意文件提取功能
💻 H
字号:
// BindFileDlg.h : 头文件
//

#pragma once
#include "afxcmn.h"
#include "afxcoll.h"
#include   <afxtempl.h>
struct MODIFY_DATA {
     ULONGLONG dwPos; // 所保存的开始位置
     ULONGLONG dwLength;      //文件长度(自身)
	 char filename[MAX_PATH];    /////文件名,用于解开后保存文件名称
};
// CBindFileDlg 对话框
class CBindFileDlg : public CDialog
{
// 构造
public:
	CBindFileDlg(CWnd* pParent = NULL);	// 标准构造函数

// 对话框数据
	enum { IDD = IDD_BINDFILE_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV 支持


// 实现
protected:
	HICON m_hIcon;

	// 生成的消息映射函数
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	// 合并后需提取的文件
	CString m_destfilestr;
	// 显示所压缩文件中的所有文件
	CListCtrl m_destfilectr;
	// 需要压缩的文件
	CListCtrl m_scrfilectr;

	// 需要合并的文件名称集
	CStringArray scrFiles;
	afx_msg void OnBnClickedButton4();
	// 合并文件模块
	bool Bind_Files(CString destFileName, bool bUp);
	// 提取合并后的文件信息
	bool GetBindFileInfo(CString bindfilename);

	// 合并后文件的信息
	CArray<MODIFY_DATA,MODIFY_DATA> bindFileInfo;
	afx_msg void OnBnClickedNewbindButton();
	afx_msg void OnBnClickedButton5();
	afx_msg void OnBnClickedLookButton();
	afx_msg void OnBnClickedUbindButton();
	/////提取文件中某一个文件信息
	bool UNBind_File(CString destFileName, ULONGLONG dwPos, ULONGLONG dwLength);
	CStringArray  tempFile;////保存所提取的零时文件;
	// 删除所产生的零时文件
	void DelTempFile(void);
	afx_msg void OnDestroy();
	afx_msg void OnBnClickedButton1();
};

⌨️ 快捷键说明

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