How to set text on “another” win32 application

作者: admin 分类: 屏幕取词 发布时间: 2013-05-15 10:22 ė1,804 浏览数 6没有评论
文章转自王牌软件
站长推荐:NSetup一键部署软件
一键式完成美化安装包制作,自动增量升级,数据统计,数字签名。应对各种复杂场景,脚本模块化拆分,常规复杂的脚本代码,图形化设置。无需专业的研发经验,轻松完成项目部署。(www.nsetup.cn)

I am using spy++ and see that the control I have has the decimal that matches the hex(after conversion of course) in spy++ and I see the parent window matches as well so I have the IntPtr for a Label and IntPtr for the form/window but my SendMessage is not working to change the text in the target application.

Another approach may be may be to do something like this post but what is the control id and how do I get that SetText of textbox in external app. Win32 API

I assume the hWnd here needs to be the controls hWnd, correct?

I notice that getting the text IS WORKING

and I notice that I get the test, see the correct value, set the text yet it doesn’t change and then get the text again using SendMessage AND it is the new value but the application still shows the wrong value….hmmm, do I need to send a repaint message maybe and if so, what is the code for that?

 

You don’t send a window message to force repaint, instead you call InvalidateRect(hWnd, NULL, TRUE).

 

http://stackoverflow.com/questions/8888710/how-to-set-text-on-another-win32-application



只回答业务咨询点击这里给我发消息 点击这里给我发消息

王牌软件,兼职软件设计,软件修改,毕业设计。

本文出自 王牌软件,转载时请注明出处及相应链接。

本文永久链接: http://www.softwareace.cn/?p=420

0

发表评论

电子邮件地址不会被公开。 必填项已用*标注

您可以使用这些HTML标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">


Ɣ回顶部

无觅相关文章插件,快速提升流量