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.

48 lines
1.4 KiB

  1. //---------------------------------------------------------------------------
  2. // eosint.cpp
  3. //---------------------------------------------------------------------------
  4. // Copyright (c) 1997, Microsoft Corporation
  5. // All Rights Reserved
  6. // Information Contained Herein Is Proprietary and Confidential.
  7. //---------------------------------------------------------------------------
  8. //
  9. // This module contains code to supplement the WinCE OS for compatibility.
  10. //
  11. //---------------------------------------------------------------------------
  12. #include <adcg.h>
  13. #define TRC_GROUP TRC_GROUP_CORE
  14. #define TRC_FILE "eosint"
  15. #include <atrcapi.h>
  16. #include <wince.h>
  17. #include <eosint.h>
  18. // Object which does the work, only one is meant to exist
  19. CHatchBrush vchb;
  20. // WinCE replacement for CreateHatchBrush
  21. WINGDIAPI HBRUSH WINAPI CreateHatchBrush(int fnStyle, COLORREF clrref)
  22. {
  23. return vchb.CreateHatchBrush(fnStyle, clrref);
  24. }
  25. // Constructor only NULLs out members
  26. CHatchBrush::CHatchBrush()
  27. {
  28. int i;
  29. DC_BEGIN_FN("CC_Event");
  30. TRC_ERR((TB, _T("Illegal hatched brush style")));
  31. for (i = 0; i < HS_LAST; i++) {
  32. m_hbmBrush[i] = NULL;
  33. }
  34. }
  35. // Destructor deletes any objects that were created
  36. CHatchBrush::~CHatchBrush()
  37. {
  38. int i;
  39. for (i = 0; i < HS_LAST; i++) {
  40. if (NULL != m_hbmBrush[i])
  41. DeleteObject(m_hbmBrush);
  42. }
  43. }