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