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

📄 projectzipbase.cpp

📁 壓縮及解壓縮的原始碼(Microsoft visual c++)
💻 CPP
字号:
// ProjectZipBase.cpp: implementation of the CProjectZipBase class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "ProjectZipBase.h"

#include "optionsdlg.h"
#include "selectfiledlg.h"

#include "..\shared\folderdialog.h"
#include "..\zipunzip\zipper.h"

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

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

enum { PZIP_OK, PZIP_CREATEFILE, PZIP_CANCELLED };

CProjectZipBase::CProjectZipBase(LPCTSTR szProjectFilePath, HWND hwndParent)
	 : m_sProjectPath(szProjectFilePath), m_hwndParent(hwndParent)
{
	m_sProjectPath.TrimLeft();
	m_sProjectPath.TrimRight();

	if (GetFileAttributes(m_sProjectPath) == 0xffffffff)
		m_sProjectPath.Empty();
}

CProjectZipBase::~CProjectZipBase()
{

}

BOOL CProjectZipBase::Open(LPTSTR szFilePath, LPTSTR szOutputPath, BOOL bErrorMsgs)
{
	ASSERT (szFilePath);

	if (!szFilePath)
		return -1;

	CString sZipFilePath(szFilePath);
	CString sOutputPath(szOutputPath);
	char szFileTitle[_MAX_FNAME];

	if (sZipFilePath.IsEmpty())
	{
		CFileDialog dialog(TRUE, "zip", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST, 
							"Zip Files (*.zip)|*.zip||", ParentWnd());

		dialog.m_ofn.lpstrTitle = "ProjectZip 

⌨️ 快捷键说明

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