The name is not used at MS Windows level. The only thing which is the ID, so if you use fixed unique IDs (as opposed to specifying wxID_ANY
when creating your windows), you should be able to find the window during run-time from them.
Edit: The ID can be queried from UIA using the AutomationIdProperty
, like so:
string id = (string)widget.GetCurrentPropertyValue(AutomationElement.AutomationIdProperty);
Usually the string is a decimal number, but not always.