Skip to main content

 none
How to use "IFrameworkInputPane interface"? RRS feed

  • Question

  • Developing Win8 IME ,we should know the position of the system touch keyboard!

    In mocrosoft document "Guidelines and checklist for IME development (Metro style apps)",it tells "the IME still can use the InputPane API to get the position of the touch keyboard",InputPane refers to the interface "IFrameworkInputpane interface ",By searching many documents ,I still cant find the way to use it!Please help provide some samples or document about it.

    THX!

    Saturday, July 28, 2012 2:55 AM

Answers

  • #include <Shobjidl.h>
    #include <iostream>
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	//IFrameworkInputPane 
    	HRESULT hr = CoInitialize(NULL);
    	IFrameworkInputPane *inputPane = NULL;
    	if(SUCCEEDED(hr))
    	{
    		hr = CoCreateInstance(CLSID_FrameworkInputPane,0,CLSCTX_ALL,IID_IFrameworkInputPane,(LPVOID*)&inputPane);
    	}
    	RECT prcInputPaneScreenLocation = {1,1,1,1};
    	inputPane->Location(&prcInputPaneScreenLocation);
    	std::cout<<"<<prcInputPaneScreenLocation.top<<"\t bottom: "<<prcInputPaneScreenLocation.bottom
    		<<"\t << prcInputPaneScreenLocation.left<<"\t right: "<<prcInputPaneScreenLocation.right<<"\n";
    	CoUninitialize();
    	system("pause");
    	return 0;
    }

    You can use this interface like this. 

    You're research on the Shell dev aspect, and this forum is for Shell developers:

    http://social.msdn.microsoft.com/Forums/en-US/windowsuidevelopment/threads 

    Good day!


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us


    Monday, July 30, 2012 4:16 AM
    Moderator