以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 高级功能研发区 (http://weistock.com/bbs/list.asp?boardid=5) ---- GetWindowText (http://weistock.com/bbs/dispbbs.asp?boardid=5&id=87617) |
-- 作者:jifeiran -- 发布时间:2015/11/23 13:23:20 -- GetWindowText Set Wrap = CreateObject("DynamicWrapper")Wrap.Register "user32.dll","FindWindow","i=ss","f=s", "r=l"Wrap.Register "user32.dll","GetWindowText","i=lsl","f=s", "r=l"hwd = Wrap.FindWindow(vbNullString, "期货交易")Dim strText Dim lngResultstrText =String(255,vbNullChar)L=len(strText)lngResult =Wrap.GetWindowText(hwd,strText,256)MsgBox(strText)问题如下:hwd正确获得了,lngResult得返回值为8,但输出的strText为空字符。是何原因呢?谢谢 |