没试验过,有空再测试下!先收藏~~~
ImmInstallIME("C:/WINDOWS/system32/123.dll","扩展输入法");
typedef int (CALLBACK * IMESetPubStringFunc)(LPCTSTR tmpStr,DWORD UnloadDLL,DWORD loadNextIme,DWORD DllData1,DWORD DllData2,DWORD DllData3);
IMESetPubStringFunc IMESetPubString = NULL;
HINSTANCE hDll=LoadLibrary(_T("123.dll"));
if(0!=hDll) {
::SendMessage(m_hWnd, WM_INPUTLANGCHANGEREQUEST, 1, (LPARAM)hDll);
::SendMessage(m_hWnd, WM_INPUTLANGCHANGE, 1, (LPARAM)hDll);
IMESetPubString=(IMESetPubStringFunc)GetProcAddress(hDll,"IMESetPubString");
IMESetPubString("C:/dll.dll",0,0,0,0,0);
FreeLibrary(hDll);
} else {
AfxMessageBox(_T("获取DLL句柄失败。。"));
}
本文链接:https://it72.com/9376.htm