/////////////////////////////////////////////////////////////////////////////
//
//	Copyright (c) 1996-1997 Microsoft Corporation
//
//	Module Name:
//		WaitCrsr.h
//
//	Abstract:
//		Definition of the CWaitCursor class for changing the cursor to
//		an hourglass for the lifetime of the instantiation of the class.
//		Needed this because ATL doesn't provide it.
//
//	Author:
//		David Potter (davidp)	November 11, 1997
//
//	Revision History:
//
//	Notes:
//
/////////////////////////////////////////////////////////////////////////////

#ifndef __WAITCRSR_H_
#define __WAITCRSR_H_

/////////////////////////////////////////////////////////////////////////////
// Forward Class Declarations
/////////////////////////////////////////////////////////////////////////////

class CWaitCursor;

/////////////////////////////////////////////////////////////////////////////
// External Class Declarations
/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////
// Include Files
/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////
// class CWaitCursor
/////////////////////////////////////////////////////////////////////////////

class CWaitCursor
{
public:
	CWaitCursor(LPCTSTR lpCursorName = IDC_WAIT)
	{
		m_curOld = SetCursor(LoadCursor(NULL, lpCursorName));
	}

	~CWaitCursor(void)
	{
		SetCursor(m_curOld);
	}

protected:
	HCURSOR	m_curOld;

}; // class CWaitCursor

/////////////////////////////////////////////////////////////////////////////

#endif // __WAITCRSR_H_