|
|
|
date: Wed, 20 Aug 2008 17:59:41 +0100,
group: microsoft.public.win32.programmer.ui
back
GetWindowLongPtr(hwnd, GWL_ID); and .net forms
Hello All,
I have a tester appliaction that tests our MFC application by pushing
buttons and filling editboxes, etc. automatically. It identifies the
control windows by the control id, that can be retrieved by
GetWindowLongPtr(hwnd, GWL_ID);
Our application also has a complicated .net dialog written in vb.net. When I
tried to implement some testcases for this dialog, I found out (to my
amazement) that the control ids of the .net controls become different when
the
dialog gets destroyed and created again. Now my question is:
Is there a reliable way how I could find the HWND of a .NET control using
win32 calls?
For buttons it is ok, they have unique windownames (that is the label on
them), so I do not strictly need the ctrl id. But the windowname of an
editbox is its content, that is not unique on this complicated dialog.
I do have access to the vb.net code, so I can do modifications if that can
help my situation, but I do not want e.g. a COM interface that returns the
HWND
for the requested control, I hope there is a solution more elegant than
that.
Do you have any sugestions other than the COM interface or to find a control
by its position?
Thank you!!
Best regards,
Jozsi
date: Wed, 20 Aug 2008 17:59:41 +0100
author: Jozsef Bekes
|
|