none
how to change other process's input methods RRS feed

  • 问题

  • my code is

    	HWND hWnd = GetForegroundWindow();   
    	ASSERT(IsWindow(hWnd));   
    	
    	// Get Target Thread ID and Attach Thread Input   
    	DWORD ProcID;   
    	DWORD ThreadID = GetWindowThreadProcessId(hWnd, &ProcID);   
    	AttachThreadInput(GetCurrentThreadId(), ThreadID, TRUE);   
    	  
    	// Get Target Window   
    	HWND hWndFocus = GetFocus();   
    	  
    	// Post Input Messages    
    	ASSERT(IsWindow(hWndFocus));   
    	 
    	if(KeyboardLayout.bChinese && bTrue)
    	// Change Input Language   
    	PostMessage(hWnd, WM_INPUTLANGCHANGEREQUEST, (WPARAM)TRUE, (LPARAM)KeyboardLayout.hChinese);   // Use Language ID 0x0804(Chinese PRC)   
    	 
    	// Detach Thread Input   
    	AttachThreadInput(GetCurrentThreadId(), ThreadID, FALSE);  
    but wince don't supported AttachThreadInput ,how to change other process's input methods?
    2012年5月30日 2:55

答案