/* * test for gdi+ */ #include "stdafx.h" #include #include "msapi/comptr.h" #define _CLN_GDIP void RemoveFromTaskBar(HWND hWnd) { CComPtr pTaskbarList; if (SUCCEEDED(pTaskbarList.CoCreateInstance(CLSID_TaskbarList, nullptr, CLSCTX_INPROC_SERVER))) if (SUCCEEDED(pTaskbarList->HrInit())) pTaskbarList->DeleteTab(hWnd); } void AddToTaskBar(HWND hWnd) { CComPtr pTaskbarList; if (SUCCEEDED(pTaskbarList.CoCreateInstance(CLSID_TaskbarList, nullptr, CLSCTX_INPROC_SERVER))) if (SUCCEEDED(pTaskbarList->HrInit())) pTaskbarList->AddTab(hWnd); }