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.1 KiB

  1. //*****************************************************************************
  2. //
  3. // DC Cacheing - header file
  4. //
  5. // Support for misbehaved apps - which continue to use a DC that has been
  6. // Released. Well the problem is WIN30 allows it, so we need to be
  7. // compatible.
  8. //
  9. //
  10. // 03-Feb-92 NanduriR Created.
  11. //
  12. //*****************************************************************************
  13. typedef struct _DCCACHE{
  14. struct _DCCACHE FAR *lpNext;
  15. BYTE flState;
  16. HAND16 htask16;
  17. HAND16 hwnd16;
  18. HDC16 hdc16;
  19. HWND hwnd32;
  20. } DCCACHE, FAR *LPDCCACHE;
  21. extern INT iReleasedDCs;
  22. #define CACHENOTEMPTY() (BOOL)(iReleasedDCs)
  23. #define DCCACHE_STATE_INUSE 0x0001
  24. #define DCCACHE_STATE_RELPENDING 0x0002
  25. #define SRCHDC_TASK16_HWND16 0x0001
  26. #define SRCHDC_TASK16_HWND32 0x0002
  27. #define SRCHDC_TASK16 0x0004
  28. BOOL ReleaseCachedDCs(HAND16 htask16, HAND16 hwnd16, HAND16 hdc16,
  29. HWND hwnd32, UINT flSearch);
  30. BOOL StoreDC(HAND16 htask16, HAND16 hwnd16, HAND16 hdc16);
  31. BOOL CacheReleasedDC(HAND16 htask16, HAND16 hwnd16, HAND16 hdc16);
  32. BOOL FreeCachedDCs(HAND16 htask16);