/* * test for gdi+ */ #include #include #define _CLN_GDIP #undef Translate void RemoveFromTaskBar(HWND hWnd) { ITaskbarList *pTaskbarList = NULL; if (SUCCEEDED(CoCreateInstance(CLSID_TaskbarList, 0, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void **)(&pTaskbarList))) && pTaskbarList != NULL) { if (SUCCEEDED(pTaskbarList->HrInit())) { pTaskbarList->DeleteTab(hWnd); } pTaskbarList->Release(); } } void AddToTaskBar(HWND hWnd) { ITaskbarList *pTaskbarList = NULL; if (SUCCEEDED(CoCreateInstance(CLSID_TaskbarList, 0, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void **)(&pTaskbarList))) && pTaskbarList != NULL) { if (SUCCEEDED(pTaskbarList->HrInit())) { pTaskbarList->AddTab(hWnd); } pTaskbarList->Release(); } }