blob: 789f599d34c75d25d4f4b0e206fbdd6349ea2afb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/*
* test for gdi+
*/
#include "stdafx.h"
#include <shobjidl.h>
#include "msapi/comptr.h"
#define _CLN_GDIP
void RemoveFromTaskBar(HWND hWnd)
{
CComPtr<ITaskbarList> pTaskbarList;
if (SUCCEEDED(pTaskbarList.CoCreateInstance(CLSID_TaskbarList, nullptr, CLSCTX_INPROC_SERVER)))
if (SUCCEEDED(pTaskbarList->HrInit()))
pTaskbarList->DeleteTab(hWnd);
}
void AddToTaskBar(HWND hWnd)
{
CComPtr<ITaskbarList> pTaskbarList;
if (SUCCEEDED(pTaskbarList.CoCreateInstance(CLSID_TaskbarList, nullptr, CLSCTX_INPROC_SERVER)))
if (SUCCEEDED(pTaskbarList->HrInit()))
pTaskbarList->AddTab(hWnd);
}
|