Leaked source code of windows server 2003
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.

33 lines
766 B

  1. #ifndef _CWAITCUR_H
  2. #define _CWAITCUR_H
  3. // ----------------------------------------------------------------------------
  4. // CWaitCursor()
  5. // ----------------------------------------------------------------------------
  6. class CWaitCursor
  7. {
  8. public:
  9. CWaitCursor() : m_hOldCursor(NULL)
  10. {
  11. m_hWaitCursor = ::LoadCursor(NULL, IDC_WAIT);
  12. if (!m_hWaitCursor)
  13. return;
  14. m_hOldCursor = ::SetCursor(m_hWaitCursor);
  15. }
  16. ~CWaitCursor()
  17. {
  18. if( m_hOldCursor )
  19. {
  20. ::SetCursor(m_hOldCursor);
  21. }
  22. }
  23. private:
  24. HCURSOR m_hOldCursor;
  25. HCURSOR m_hWaitCursor;
  26. };
  27. #endif