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.

55 lines
1.2 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORP., 1997
  4. *
  5. * TITLE: Util.h
  6. *
  7. * VERSION: 2.0
  8. *
  9. * AUTHOR: ReedB
  10. *
  11. * DATE: 26 Dec, 1997
  12. *
  13. * DESCRIPTION:
  14. * Declarations and definitions for the shared utility functions.
  15. *
  16. *******************************************************************************/
  17. #include <strstrea.h>
  18. #ifndef ARRAYSIZE
  19. #define ARRAYSIZE(x) (sizeof(x)/sizeof(x[0]))
  20. #endif
  21. interface IWiaItem;
  22. namespace Util
  23. {
  24. void _stdcall SetBMI(PBITMAPINFO, LONG, LONG, LONG);
  25. LONG _stdcall GetBmiSize(PBITMAPINFO);
  26. PBYTE _stdcall AllocDibFileFromBits(PBYTE, UINT, UINT, UINT);
  27. HBITMAP _stdcall DIBBufferToBMP(HDC hDC, PBYTE pDib, BOOLEAN bFlip);
  28. HRESULT _stdcall ReadDIBFile(LPTSTR pszFileName, PBYTE *ppDib);
  29. HGLOBAL _stdcall BitmapToDIB (HDC hdc, HBITMAP hBitmap);
  30. };
  31. #ifndef __WAITCURS_H_INCLUDED
  32. #define __WAITCURS_H_INCLUDED
  33. class CWaitCursor
  34. {
  35. private:
  36. HCURSOR m_hCurOld;
  37. public:
  38. CWaitCursor(void)
  39. {
  40. m_hCurOld = SetCursor( LoadCursor( NULL, IDC_WAIT ) );
  41. }
  42. ~CWaitCursor(void)
  43. {
  44. SetCursor(m_hCurOld);
  45. }
  46. };
  47. #endif