C#求大神给看看,句柄没问题,可以SengMessage,为什么不能getGetWindowText取不到值
[DllImport("user32.dll", EntryPoint = "GetWindowText")]
public static extern int GetWindowText(IntPtr hwnd, string lpString, int cch);
private void timer1_Tick(object sender, EventArgs e)
{
string s = "";
int i = GetWindowText(curr_hWnd, s, 10);
if (s != "")
{
this.timer1.Stop();
MessageBox.Show(s);
}
}