how I can receive the name of a control which placed in other application?
comments: with "Microsoft Spy++" I can receive the "class name" of a control(for example TButton, TrzEdit, TAdvSmoothButton ... etc.) but I need to receive tha actual name of a control(for example: Button1, Button2 ... etc.).
can you help me???
Why you need the name?
Using Spy++ you can get both the dialog handle and the handle of the control you are interested in and then you can use them in your code.
e.g.
UINT WINAPI GetDlgItemText(
__in HWND hDlg,
__in int nIDDlgItem,
__out LPTSTR lpString,
__in int nMaxCount
);
Check out MSDN : http://msdn.microsoft.com/en-us/library/windows/desktop/ms645489(v=vs.85).aspx