|
///////////////////////////////////////////////////////////////////////////////
//
// Module: Utility.h
//
// Desc: Misc static helper methods
//
// Copyright (c) 2003 Michael Carruth
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _UTILITY_H_
#define _UTILITY_H_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "stdafx.h"
#include <atlmisc.h> // CString
////////////////////////////// Class Definitions /////////////////////////////
// ===========================================================================
// CUtility
//
// See the module comment at top of file.
//
class CUtility
{
public:
//-----------------------------------------------------------------------------
// getLastWriteFileTime
// Returns the time the file was last modified in a FILETIME structure.
//
// Parameters
// sFile Fully qualified file name
//
// Return Values
// FILETIME structure
//
// Remarks
//
static
FILETIME
getLastWriteFileTime(
CString sFile
);
//-----------------------------------------------------------------------------
// getAppName
// Returns the application module's file name
//
// Parameters
// none
//
// Return Values
// File name of the executable
//
// Remarks
// none
//
static
CString
getAppName();
//-----------------------------------------------------------------------------
// getSaveFileName
// Presents the user with a save as dialog and returns the name selected.
//
// Parameters
// none
//
// Return Values
// Name of the file to save to, or "" if the user cancels.
//
// Remarks
// none
//
static
CString
getSaveFileName();
//-----------------------------------------------------------------------------
// getTempFileName
// Returns a generated temporary file name
//
// Parameters
// none
//
// Return Values
// Temporary file name
//
// Remarks
//
static
CString
getTempFileName();
};
#endif // #ifndef _UTILITY_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.
I have been developing Windows applications professionally since 1998. I currently live and work near Seattle, WA.