Recent

Author Topic: How to FocusedWnd get set?  (Read 4229 times)

Phil

  • Hero Member
  • *****
  • Posts: 2737
How to FocusedWnd get set?
« on: March 01, 2006, 05:20:24 pm »
I have code that calls FindControl for Msg.FocusedWnd, where Msg is type TLMKillFocus or TLMSetFocus. Msg.FocusedWnd is not 0, but FindControl always returns nil, suggesting that the value of FocusedWnd is not getting set correctly.

Even looping through the form's Components list, checking each TWinControl's Handle against Msg.FocusedWnd does not find a match, again suggesting that Msg.FocusedWnd is not the handle of one of the form's controls.

I'm clicking on various controls on the form, so the value of Msg.FocusedWnd that reaches a control's KillFocus or SetFocus handlers should be the window handle of a control on the form, right?

So my question is: how does FocusedWnd get set? I notice that it's not used at all in LCL.

Thanks.

-Phil

 

TinyPortal © 2005-2018