16,473
社区成员
发帖
与我相关
我的任务
分享
ITfUIElementMgr *puiem;
ITfUIElement *pElement = NULL;
ITfThreadMgrEx* m_tm;
HRESULT hr;
hr = CoCreateInstance(CLSID_TF_ThreadMgr , NULL, CLSCTX_INPROC_SERVER, __uuidof(ITfThreadMgrEx), (void**)&m_tm);
if (hr != S_OK)
{
return FALSE;
}
if (SUCCEEDED(m_tm->QueryInterface(__uuidof(ITfUIElementMgr), (void **)&puiem)))
{
puiem->GetUIElement(0, &pElement);
puiem->Release();
}
ITfCandidateListUIElement *pcandidate = NULL;
if(FAILED(pElement->QueryInterface(__uuidof(ITfCandidateListUIElement),(void **)&pcandidate)))
{
return 0;
}