本文整理汇总了C++中ITfKeystrokeMgr::UnpreserveKey方法的典型用法代码示例。如果您正苦于以下问题:C++ ITfKeystrokeMgr::UnpreserveKey方法的具体用法?C++ ITfKeystrokeMgr::UnpreserveKey怎么用?C++ ITfKeystrokeMgr::UnpreserveKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITfKeystrokeMgr
的用法示例。
在下文中一共展示了ITfKeystrokeMgr::UnpreserveKey方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _UninitPreservedKey
void CTextService::_UninitPreservedKey()
{
ITfKeystrokeMgr *pKeystrokeMgr;
if (_pThreadMgr->QueryInterface(IID_ITfKeystrokeMgr, (void **)&pKeystrokeMgr) != S_OK)
return;
pKeystrokeMgr->UnpreserveKey(GUID_PRESERVEDKEY_BURGLISH, &c_pkeyburglish);
pKeystrokeMgr->UnpreserveKey(GUID_PRESERVEDKEY_BURMESE, &c_pkeyburmese);
pKeystrokeMgr->Release();
}
示例2: _UninitPreservedKey
void CTextService::_UninitPreservedKey()
{
ITfKeystrokeMgr *pKeystrokeMgr;
if (_pThreadMgr->QueryInterface(IID_ITfKeystrokeMgr, (void **)&pKeystrokeMgr) != S_OK)
return;
pKeystrokeMgr->UnpreserveKey(GUID_PRESERVEDKEY_ONOFF, &c_pkeyOnOff0);
pKeystrokeMgr->UnpreserveKey(GUID_PRESERVEDKEY_ONOFF, &c_pkeyOnOff1);
pKeystrokeMgr->UnpreserveKey(GUID_PRESERVEDKEY_F6, &c_pkeyF6);
pKeystrokeMgr->Release();
}
示例3: _UninitPreservedKey
void CTextService::_UninitPreservedKey(int onoff)
{
HRESULT hr;
if(onoff != 0 && onoff != 1)
{
return;
}
ITfKeystrokeMgr *pKeystrokeMgr;
if(_pThreadMgr->QueryInterface(IID_PPV_ARGS(&pKeystrokeMgr)) == S_OK)
{
for(int i = 0; i < MAX_PRESERVEDKEY; i++)
{
if(preservedkey[onoff][i].uVKey == 0 && preservedkey[onoff][i].uModifiers == 0)
{
break;
}
hr = pKeystrokeMgr->UnpreserveKey(c_guidPreservedKeyOnOff[onoff], &preservedkey[onoff][i]);
}
SafeRelease(&pKeystrokeMgr);
}
}
示例4: _UninitPreservedKey
void CTextService::_UninitPreservedKey()
{
ITfKeystrokeMgr *pKeystrokeMgr;
if(_pThreadMgr->QueryInterface(IID_PPV_ARGS(&pKeystrokeMgr)) == S_OK)
{
for(int i = 0; i < MAX_PRESERVEDKEY; i++)
{
if(preservedkey[i].uVKey == 0 && preservedkey[i].uModifiers == 0)
{
break;
}
pKeystrokeMgr->UnpreserveKey(c_guidPreservedKeyOnOff, &preservedkey[i]);
}
SafeRelease(&pKeystrokeMgr);
}
}
示例5: removePreservedKey
void TextService::removePreservedKey(const GUID& guid) {
vector<PreservedKey>::iterator it;
for(it = preservedKeys_.begin(); it != preservedKeys_.end(); ++it) {
PreservedKey& preservedKey = *it;
if(::IsEqualIID(preservedKey.guid, guid)) {
if(threadMgr_) { // our text service is activated
ITfKeystrokeMgr *keystrokeMgr;
if (threadMgr_->QueryInterface(IID_ITfKeystrokeMgr, (void **)&keystrokeMgr) == S_OK) {
keystrokeMgr->UnpreserveKey(preservedKey.guid, &preservedKey);
keystrokeMgr->Release();
}
}
preservedKeys_.erase(it);
break;
}
}
}