|
- CoInitialize(NULL);
- ITaskbarList* pTaskBarList = NULL;
- HRESULT hr = CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void**)&pTaskBarList);
- if (SUCCEEDED(hr))
- {
- pTaskBarList->HrInit();
- if (Show)
- {
- pTaskBarList->AddTab(m_hWnd);
- }
- else
- {
- pTaskBarList->DeleteTab(m_hWnd);
- }
- pTaskBarList->Release();
- }
- CoUninitialize();
复制代码 |
|