#pragma once #include "..\emacros.h" #include #include #include #include #pragma comment(lib, "d2d1.lib") #pragma comment(lib, "dwrite.lib") //#pragma comment(lib, "wincodec.lib") HWND &GetHWnd(); ID2D1Factory * &GetFactory(); ID2D1HwndRenderTarget * &GetRenderTarget(); ID2D1SolidColorBrush * &GetSolidColorBrush(); template inline void SafeReleaseInterface( Interface **ppInterfaceToRelease ) { if (*ppInterfaceToRelease != nullptr) { (*ppInterfaceToRelease)->Release(); (*ppInterfaceToRelease) = nullptr; } }