//传递消息到指定窗口 public static void CallWindowProcHandle(IntPtr hwnd) { DEFWNDPROC callback = new DEFWNDPROC(MainWindowsProc); //int result=CallWindowProc(callback,hwnd,Msg, wParam,IParam); //GC.KeepAlive(callback); //if (result==0 && Marshal.GetLastWin32Error() == 0) //{ //} }
public static extern int CallWindowProc(DEFWNDPROC lpPrevWndFunc,IntPtr hWnd,int Msg, uint wParam,uint IParam);