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.

36 lines
560 B

  1. #if !defined(INC__Gadget_h__INCLUDED)
  2. #define INC__Gadget_h__INCLUDED
  3. #pragma once
  4. // Forward declarations used in .gidl files
  5. class Visual;
  6. namespace Gdiplus
  7. {
  8. class Brush;
  9. class Font;
  10. class Pen;
  11. };
  12. // Global helper functions
  13. template <class T>
  14. inline T *
  15. BuildVisual(Visual * pgvParent)
  16. {
  17. Visual::VisualCI ci;
  18. ZeroMemory(&ci, sizeof(ci));
  19. ci.pgvParent = pgvParent;
  20. return T::Build(&ci);
  21. }
  22. inline bool IsHandled(HRESULT hr)
  23. {
  24. return (hr == DU_S_COMPLETE) || (hr == DU_S_PARTIAL);
  25. }
  26. #endif // INC__Gadget_h__INCLUDED