What am I doing?
I am automating a third-party application. The login window is as follows:

Note. A background image is embedded inside the form, and both USERNAME and PASSWORD are actually part of the image. Just in case, someone wonders why the tree below the Window Detective doesnโt have, perhaps & raquo; Label

Where I am?
I have no problem handling components. I mean, I can usually access each window / control using the FindWindowEx function.
I can implement the GetWindowTextLength and / or GetWindowText for buttons to distinguish who has a handle. Although this approach works fine with Button (. Caption), it will not work with Edit controls. It seems that the Edit controls do not have any unique properties to distinguish which one. (correct me if I am wrong) ...
Problem
Suppose I need to know at the compilation stage that Edit controls which I am going to process, so I do not send a password for the username and so on. There are only two, but, as I said, I'm not sure how to choose the right one.
I would not mind understanding this at runtime, but I'm not sure how to distinguish the difference without sending a message and actually visually determining which one ...
Current solution
I would not call this a solution, but at the moment I rely only on the fact that every time I run my code, I always get a second (password) handle to the Edit control when the first handle is returned.
Question
Can I be 100% sure that the second Edit element will always be returned first in the hierarchy returned by FindWindowEx ?
If someone can confirm my idea, if I already had a BUT solution, if I cannot always expect the second Edit element to be returned, then I would like to hear some ideas on how to deal with this situation.
Note. I did not think that any code is really required for my question, but if someone wants to see the code, please leave a comment and I will add it to the question.
Thanks so much for your time.