windows-nt/Source/XPSP1/NT/public/internal/multimedia/inc/ehui/gadget.h

37 lines
560 B
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
#if !defined(INC__Gadget_h__INCLUDED)
#define INC__Gadget_h__INCLUDED
#pragma once
// Forward declarations used in .gidl files
class Visual;
namespace Gdiplus
{
class Brush;
class Font;
class Pen;
};
// Global helper functions
template <class T>
inline T *
BuildVisual(Visual * pgvParent)
{
Visual::VisualCI ci;
ZeroMemory(&ci, sizeof(ci));
ci.pgvParent = pgvParent;
return T::Build(&ci);
}
inline bool IsHandled(HRESULT hr)
{
return (hr == DU_S_COMPLETE) || (hr == DU_S_PARTIAL);
}
#endif // INC__Gadget_h__INCLUDED