stein_oddvar_ra
10 years agoContributor
Using AfxWnd90 or AfxWnd120 to access an MFC UI-element
I've inherited an old TestComplete suite that was developed for the testing of our applications. In one of the test projects there's some interaction with the UI-elements of an application using the alias to an AfxWnd90-object.
The problem is that this object reference is to a specific MFC version (9.0 - VS2008) - we have since started to compile our applications using 12.0 (VS2013), so the object references should be changed as well to AfxWnd120.
Is there any other way of interacting with the UI-element than actually checking if the AfxWnd90 exists, and if not, use the AfxWnd120 instead?
The problem is that this object reference is to a specific MFC version (9.0 - VS2008) - we have since started to compile our applications using 12.0 (VS2013), so the object references should be changed as well to AfxWnd120.
Is there any other way of interacting with the UI-element than actually checking if the AfxWnd90 exists, and if not, use the AfxWnd120 instead?
- Hi Stein,
Yes Aliases, allow you to simplifiy Name Mapping (NM) paths.
If you set a Name Mapping property with a wildcard, the corresponding Alias will automatically be updated.
Please find attached a screenshot of the NM tab with an example of a property WndClass with a wildcard.
Sincerely