隐藏 Windows任务栏中的窗口显示

    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();
上一篇:解决MFC中因控件类多次Attch造成的销毁窗口过程中CWnd* pWnd = CWnd::FromHandlePermanent(hWnd); ASSERT(pWnd != NULL); 断言失败的


下一篇:《WINDOWS游戏编程之从零开始》第三章学习笔记