MFC Support for Direct2D – Composite Effects

We can combine two or more images and/or effects by using the composite effect. Here is an example. Drawing shadows using Direct2D composite effects void CD2DStaticCtrl::_DrawImageWithShadow(CHwndRenderTarget* pRenderTarget) { ASSERT(pRenderTarget && pRenderTarget->IsValid()); ASSERT(m_pBitmap && m_pBitmap->IsValid()); // get ID2D1DeviceContext interface; note: must include <d2d1_1.h> CComQIPtr<ID2D1DeviceContext> spDeviceContext = pRenderTarget->GetRenderTarget(); // create shadow effect and set the input image … Read more

Using Direct2D for Rendering WIC Bitmap Sources

Once having a WIC (Windows Imaging Component) source, we can render it by using GDI, GDI+ or Direct2D. There are many examples over the internet including MSDN Library that describes how to perform this. This article describes how to use WIC Wrapper Library, which is designed for using WIC without worrying about directly deal with COM interfaces. … Read more

Multiple-View File Explorer

File Explorer (aka Windows Explorer) is a well known and commonly used file manager application, shipped since early Windows 95 operating system. There are also other replacements that can be found over the Internet, however, let’s see how can we make our own file manager, having multiple (tabbed) views. A brief tour of possible ways … Read more

Listing Windows Known Folders

If the target system is Windows Vista, Windows Server 2008 or newer, enumerating known folders (formerly known as special folders) like Desktop, Documents, Program Files, etc is quite easy by calling GetFolderIds method of IKnownFolderManager interface. It gets an array of all registered known folder IDs (KNOWNFOLDERID). Once having a folder ID, we can call IKnownFolderManager::GetFolder … Read more