Knowing when a button is highlighted (but not clicked)
Posted on 1998-12-08
This is a good one. I have a button on a dialog; naturally, It gets clicked, but when its not clicked, the focus HAS to stay on a different control. The problem: if you click on a button in Windows and move the mouse off the button and release mouse, the focus STAYS on the button. Even if the button is not in the Z order.
I'm using VC++ 6.0 and MFC. I've tried overriding OnLButtonUp on the dialog (actually its a formview), but apparently the message never leaves the button. How can I let the formview know the button "stole" the focus so I can reset the focus back to a different control?