日期:2014-05-17  浏览次数:20789 次

SendMessage使用时的转换问题
private static extern int SendMessage(IntPtr hwnd, uint wMsg, int wParam, int lParam);

我用SendMessage(hwndThree, 0x0102, 'T', 0); 能够把T写到文本框里
但是如果使用变量 int iat = Convert.ToInt32( strAT.Substring(1,1));
SendMessage(hwndThree, 0x0102, iat, 0); 这样的话就不行 是不是需要iat什么特殊转换
求高手

------解决方案--------------------
不应该啊,怎么个不行 'T'是char类型,其实就是取得asic码
------解决方案--------------------
探讨
private static extern int SendMessage(IntPtr hwnd, uint wMsg, int wParam, int lParam);

我用SendMessage(hwndThree, 0x0102, 'T', 0); 能够把T写到文本框里
但是如果使用变量 int iat = Convert.ToInt32( strAT.Substring(1,1)……