windows-build-updates-20030314
[openafs.git] / src / WINNT / win9xpanel / Wait.cpp
1 /* Copyright 2000, International Business Machines Corporation and others.
2         All Rights Reserved.
3  
4         This software has been released under the terms of the IBM Public
5         License.  For details, see the LICENSE file in the top-level source
6         directory or online at http://www.openafs.org/dl/license10.html
7 */
8 // Wait.cpp : implementation file
9 //
10
11 #include "stdafx.h"
12 #include "winafsload.h"
13
14 #ifdef _DEBUG
15 #define new DEBUG_NEW
16 #undef THIS_FILE
17 static char THIS_FILE[] = __FILE__;
18 #endif
19
20 /////////////////////////////////////////////////////////////////////////////
21 // CWait
22
23 int CWait::m_RefCount=0;
24
25 CWait::CWait(LPCTSTR cursor)
26 {
27         m_RefCount++;
28         m_Cursor=SetCursor(LoadCursor(NULL,cursor));
29 }
30
31 BOOL CWait::IsBusy()
32 {
33         return (m_RefCount!=0);
34 }
35
36 CWait::~CWait()
37 {
38         SetCursor(m_Cursor);
39         m_RefCount--;
40 }
41
42
43 BEGIN_MESSAGE_MAP(CWait, CWnd)
44         //{{AFX_MSG_MAP(CWait)
45                 // NOTE - the ClassWizard will add and remove mapping macros here.
46         //}}AFX_MSG_MAP
47 END_MESSAGE_MAP()
48
49
50 /////////////////////////////////////////////////////////////////////////////
51 // CWait message handlers