but hIMC always return 0,how can i get notepad 's ImmGetContext,anyone can help me?VB Code:
Private Declare Function ImmGetContext Lib "imm32.dll" (ByVal hwnd As Long) As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long Private Sub Command1_Click() dim hwnd as long,hIMC as long hwnd = FindWindow("Notepad", vbnullstring) if hwnd<>0 then hIMC=ImmGetContext(hwnd) msgbox hIMC end if end sub![]()




Reply With Quote