|
使用C# 2005开发WINCE下一个程序
为什么焦点在按钮上,按回车键却不触发CLICK事件?
如果通过消息来触发,SendMessage或PostMessage 该如何定义啊?
const int WM_LBUTTONDOWN = 0x0201;
const int WM_LBUTTONUP = 0x0202;
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
private static extern IntPtr PostMessage(IntPtr hwnd, int wMsg, IntPtr wParam, IntPtr lParam);
PostMessage(btn.Handle, WM_LBUTTONDOWN, new IntPtr(0), new IntPtr(0));
PostMessage(btn.Handle, WM_LBUTTONUP, new IntPtr(0), new IntPtr(0));
上面执行没效果?找不到user32.dll?
|
|