Click here to Skip to main content
15,894,291 members
Articles / Programming Languages / C++

Win32 Wrapper classes for Gilles Volant's Zip/Unzip API

Rate me:
Please Sign up or sign in to vote.
4.87/5 (33 votes)
27 Jul 2003CC (ASA 2.5)3 min read 465.4K   17.6K   102  
High level wrapping of the zlib library to make easy work of zipping and unzipping files and folders
// UnzipDlg.h : header file
//

#if !defined(AFX_UNZIPDLG_H__C451CE7F_7A6A_4FA3_8523_7240856DBAA1__INCLUDED_)
#define AFX_UNZIPDLG_H__C451CE7F_7A6A_4FA3_8523_7240856DBAA1__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CUnzipDlg dialog

#include "..\zipunzip\Unzipper.h"

class CUnzipDlg : public CDialog
{
// Construction
public:
	CUnzipDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CUnzipDlg)
	enum { IDD = IDD_UNZIP_DIALOG };
	CListCtrl	m_lcDetails;
	CString	m_sZipPath;
	int		m_nFileCount;
	int		m_nFolderCount;
	DWORD	m_nTotalCompSize;
	DWORD	m_nTotalUncompSize;
	CString	m_sFileExt;
	BOOL	m_bIgnorePath;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CUnzipDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	CUnzipper m_uz;

	// Generated message map functions
	//{{AFX_MSG(CUnzipDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnBrowse();
	afx_msg void OnUnzip();
	afx_msg void OnUpdatedetails();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

protected:
	void ShowDetails();
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_UNZIPDLG_H__C451CE7F_7A6A_4FA3_8523_7240856DBAA1__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Creative Commons Attribution-ShareAlike 2.5 License


Written By
Software Developer Maptek
Australia Australia
.dan.g. is a naturalised Australian and has been developing commercial windows software since 1998.

Comments and Discussions