如何识别编辑控件的唯一实例,我可以设置一些属性吗? [英] How can I identfy unique instances of edit controls, is there some attribute I can set?

查看:72
本文介绍了如何识别编辑控件的唯一实例,我可以设置一些属性吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的软件允许用户创建任意数量的win32编辑控件。 这些控件可能包含几乎任何文本(用户输入内容)。

Our software allows one to create frames with any number of win32 edit controls.  These controls may contain pretty much any text (the user enters the contents).

我们的客户希望使用测试工具(如TestComplete)测试这些应用程序。 他们遇到的问题是它们似乎不是一个可以设置编辑控件名称的属性。 当
创建编辑控件窗口时使用的WindowName参数我怀疑不起作用,因为我认为它设置了编辑控件内容。

Our clients would like to test these applications using testing tools such as TestComplete.  The problem they are having is that their doesn't seem to be an attribute where you can set the Edit control's name.  The WindowName argument used when creating the Edit Control window I suspect will not work, as I believe it sets the Edit control content.

是否有另一个属性(属性)可以设置/使用?

Is there another attribute (property) that can be set/used?

推荐答案

每个子控件都有一个可以使用 GetWindowLong(GWL_ID)。

您还可以使用 SetProp GetProp 函数处理属性。它们需要
HANDLE 值,但我认为您可以指定任何数字。

You can also deal with properies using SetProp and GetProp functions. They require HANDLE values, but I think that you can specify any number.


这篇关于如何识别编辑控件的唯一实例,我可以设置一些属性吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆