声明两个SendMessage函数
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, string lParam);
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, string lParam);
http://community.csdn.net/Expert/topic/3708/3708210.xml?temp=.6918299
你的问题 属于 pinvoke(平台调用) 的一类问题另外,楼上的方法 应该已经可以解决问题了
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, string lParam);
这样还是不行,请问还有什么办法??
我知道用SendMessage(hWndEdit,WM_SETTEXT,0,&sMess);
但是在C#里面到底如何调用,我这样调用老不行。