Click here to Skip to main content
15,895,142 members
Articles / Desktop Programming / MFC

XFolderSize - A class to determine folder size

Rate me:
Please Sign up or sign in to vote.
4.83/5 (16 votes)
11 Jun 2007CPOL1 min read 60.9K   1.5K   42  
XFolderSize is a non-MFC class that collects folder size, folder count, and file count based on starting folder.
// XFormatNumberNF.h  Version 1.0 - article available at www.codeproject.com
//
// Author:  Hans Dietrich
//          hdietrich@gmail.com
//
// License:
//     This software is released into the public domain.  You are free to use
//     it in any way you like, except that you may not sell this source code.
//
//     This software is provided "as is" with no expressed or implied warranty.
//     I accept no liability for any damage or loss of business that this 
//     software may cause.
//
///////////////////////////////////////////////////////////////////////////////

#ifndef XFORMATNUMBERNF_H
#define XFORMATNUMBERNF_H

class CXFormatNumberNF
{
// Construction
public:
	CXFormatNumberNF();

// Attributes
public:
	int FormatString(LPCTSTR lpszValue, LPTSTR lpszBuf, DWORD dwSizeBuf);
	int FormatString(DWORD dwValue, LPTSTR lpszBuf, DWORD dwSizeBuf);
	int FormatString(PLARGE_INTEGER lpValue, LPTSTR lpszStr, DWORD dwSize);

// Implementation
private:
	NUMBERFMT m_nf;
	TCHAR m_szThousandSep[20];
	TCHAR m_szDecimalSep[20];
};

#endif //XFORMATNUMBERNF_H

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 Code Project Open License (CPOL)


Written By
Software Developer (Senior) Hans Dietrich Software
United States United States
I attended St. Michael's College of the University of Toronto, with the intention of becoming a priest. A friend in the University's Computer Science Department got me interested in programming, and I have been hooked ever since.

Recently, I have moved to Los Angeles where I am doing consulting and development work.

For consulting and custom software development, please see www.hdsoft.org.






Comments and Discussions