コード例 #1
0
ファイル: Composition.cpp プロジェクト: jrywu/DIME
STDAPI CDIME::OnCompositionTerminated(TfEditCookie ecWrite, _In_ ITfComposition *pComposition)
{
	debugPrint(L"CDIME::OnCompositionTerminated()");
	HRESULT hr = S_OK;
    ITfContext* pContext = _pContext;
   
	// Clear dummy composition
	_RemoveDummyCompositionForComposing(ecWrite, pComposition);
	
    // Clear display attribute and end composition, _EndComposition will release composition for us
     if (pContext)
    {
        pContext->AddRef();
	}
	

	_EndComposition(pContext);
	_DeleteCandidateList(TRUE, pContext);
	
	if (pContext)
	{
		pContext->Release();
        pContext = nullptr;
    }
    return hr;
}
コード例 #2
0
HRESULT COVTSF::_HandleCancel(TfEditCookie ec, _In_ ITfContext *pContext)
{
    _RemoveDummyCompositionForComposing(ec, _pComposition);

    _DeleteCandidateList(FALSE, pContext);

    _TerminateComposition(ec, pContext);

    return S_OK;
}
コード例 #3
0
STDAPI CSampleIME::OnCompositionTerminated(TfEditCookie ecWrite, _In_ ITfComposition *pComposition)
{
    // Clear dummy composition
    _RemoveDummyCompositionForComposing(ecWrite, pComposition);

    // Clear display attribute and end composition, _EndComposition will release composition for us
    ITfContext* pContext = _pContext;
    if (pContext)
    {
        pContext->AddRef();
    }

    _EndComposition(_pContext);

    _DeleteCandidateList(FALSE, pContext);

    if (pContext)
    {
        pContext->Release();
        pContext = nullptr;
    }

    return S_OK;
}