Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.5 KiB

  1. // stdafx.h : include file for standard system include files,
  2. // or project specific include files that are used frequently,
  3. // but are changed infrequently
  4. #if !defined(AFX_STDAFX_H__ECCDF539_45CC_11CE_B9BF_0080C87CDBA6__INCLUDED_)
  5. #define AFX_STDAFX_H__ECCDF539_45CC_11CE_B9BF_0080C87CDBA6__INCLUDED_
  6. #if _MSC_VER >= 1000
  7. #pragma once
  8. #endif // _MSC_VER >= 1000
  9. #define STRICT
  10. #define _ATL_APARTMENT_THREADED
  11. #include <atlbase.h>
  12. //You may derive a class from CComModule and use it if you want to override
  13. //something, but do not change the name of _Module
  14. extern CComModule _Module;
  15. #include <atlcom.h>
  16. #include <shellapi.h>
  17. #include <atlwin.h>
  18. #include <commctrl.h> // For using controls
  19. #include <shlobj.h>
  20. // CWaitCursor: A class that sets the cursor to wait in the ctor and arrow in the dtor
  21. class CWaitCursor
  22. {
  23. public:
  24. HRESULT SetStandardCursor(IN LPCTSTR i_lpCursorName)
  25. {
  26. if (NULL == i_lpCursorName)
  27. return(E_INVALIDARG);
  28. HCURSOR m_hcur = ::LoadCursor(NULL, i_lpCursorName);
  29. if (NULL == m_hcur)
  30. return(E_INVALIDARG);
  31. // Hide the cursor, change it and show it again
  32. ::ShowCursor(FALSE);
  33. SetCursor(m_hcur);
  34. ::ShowCursor(TRUE);
  35. return S_OK;
  36. }
  37. CWaitCursor() { SetStandardCursor(IDC_WAIT); };
  38. ~CWaitCursor() { SetStandardCursor(IDC_ARROW); };
  39. };
  40. //{{AFX_INSERT_LOCATION}}
  41. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  42. #endif // !defined(AFX_STDAFX_H__ECCDF539_45CC_11CE_B9BF_0080C87CDBA6__INCLUDED)