EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

ITfLanguageProfileNotifySink interface

The ITfLanguageProfileNotifySink interface is implemented by an application to receive notifications when the language profile changes.

To install this advise sink, obtain an ITfSource object from an ITfInputProcessorProfiles object by calling ITfInputProcessorProfiles::QueryInterface with IID_ITfSource. Then call ITfSource::AdviseSink with IID_ITfLanguageProfileNotifySink.

Members

The ITfLanguageProfileNotifySink interface inherits from the IUnknown interface. ITfLanguageProfileNotifySink also has these types of members:

Methods

The ITfLanguageProfileNotifySink interface has these methods.

MethodDescription
OnLanguageChange

Called when the language profile is about to change.

OnLanguageChanged

Called after the language profile has changed.

 

Examples



HRESULT hr;
ITfInputProcessorProfiles *pProfiles;

//Create the object and obtain the pointer. 
hr = CoCreateInstance(  CLSID_TF_InputProcessorProfiles, 
                        NULL, 
                        CLSCTX_INPROC_SERVER, 
                        IID_ITfInputProcessorProfiles, 
                        (LPVOID*)&pProfiles);

if(SUCCEEDED(hr))
{
    ITfSource *pSource;

    hr = pProfiles->QueryInterface(IID_ITfSource, (LPVOID*)&pSource);
    if(SUCCEEDED(hr))
    {
        hr = pSource->AdviseSink(IID_ITfLanguageProfileNotifySink, 
                (ITfLanguageProfileNotifySink*)this,
                &m_dwCookie);

        // Releasing pSource can disconnect the advise sink. 
        // There is a single instance of this COM object per thread, 
        // and if the count goes down to 0, the advise sink is 
        // disconnected. To guarantee that the advise sink is not 
        // disconnected until you want it disconnected, you can 
        // maintain a reference to the object instead of releasing 
        // pSource.
        pSource->Release();
    }
    
    pProfiles->Release();
}


Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Redistributable

TSF 1.0 on Windows 2000 Professional

Header

Msctf.h

IDL

Msctf.idl

DLL

Msctf.dll

See also

ITfInputProcessorProfiles
ITfSource
ITfSource::AdviseSink

 

 

커뮤니티 추가 항목

추가
표시:
© 2014 Microsoft