Just the windows text box surprised me a lot today.
I have two unrelated text fields inside the application. I can enter a text box and switch focus by clicking on them. Then some event X occurs which I cannot describe here for the reasons given below. After this event, the two text fields become "entangled" in an almost quantum way.
Say text box A was focused before X happened. When I press text box B to enter text, new text appears in text box A, while the blinking cursor moves happily in text box B through the void, as if the text was there.
No clicking on text fields can solve this problem. The cursor will always remain in B, while the text will always be displayed on A.
A spying message shows that after event X, the text fields lose the ability to lose or gain focus. When I click on B, WM_LOSE_FOCUS does not come to A, and WM_SET_FOCUS does not come to B. (The rectangles and the visibility of the boxes are fine.)
The same thing happens in Windows XP and Windows 7.
Now event X: this is a big event in a third-party user interface library that I cannot immediately rebuild. (Namely, docking the panel in wxAUI.)
I am sure that this behavior is the result of incorrect WinAPI calls to text fields (garbage in garbage). I would like to know what might cause such a "sending text fields" to find out where to start looking for errors.
Thank!