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.

41 lines
1.3 KiB

  1. //---------------------------------------------------------------------------
  2. // ThemeFile.h - manages loaded theme files
  3. //---------------------------------------------------------------------------
  4. #pragma once
  5. //---------------------------------------------------------------------------
  6. class CUxThemeFile // changed from "CThemeFile" to avoid conflict with
  7. { // class of same name in themeui
  8. //---- methods ----
  9. public:
  10. CUxThemeFile();
  11. ~CUxThemeFile();
  12. HRESULT CreateFile(int iLength, BOOL fReserve = FALSE);
  13. HRESULT CreateFromSection(HANDLE hSection);
  14. HRESULT OpenFromHandle(HANDLE handle, BOOL fCleanupOnFailure = FALSE);
  15. HRESULT ValidateThemeData(BOOL fFullCheck);
  16. bool IsReady();
  17. bool IsGlobal();
  18. bool HasStockObjects();
  19. HANDLE Handle()
  20. {
  21. if (this)
  22. return _hMemoryMap;
  23. return NULL;
  24. }
  25. DWORD DataCheckSum();
  26. void CloseFile();
  27. void Reset();
  28. HANDLE Unload();
  29. BOOL ValidateObj();
  30. //---- data ----
  31. char _szHead[8];
  32. BYTE *_pbThemeData; // ptr to shared memory block
  33. HANDLE _hMemoryMap; // handle to memory mapped file
  34. char _szTail[4];
  35. };
  36. //---------------------------------------------------------------------------