0

Using BCGControlBar Pro using a wizard created app with multiple CBCGPDockingControlBar windows. My question is, how do I tell which one is active or has the focus? The normal GetForegroundWindow() and GetFocus() report the main frame.

Thanks.

user3161924
  • 1,849
  • 18
  • 33
  • By simply enumerating all your created controlbars, and test it for `GetFocus()` or similar. – Flaviu_ Aug 05 '21 at 09:12
  • Does this docking control bar has any child windows that may get a focus? – xMRi Aug 05 '21 at 09:33
  • yes the docking control bar has a child window that can get focus, one's a tree, ones property grid, another is output bar with rich text control. I guess I could setup a global static var and for each control type capture OnFocus to set which one has it. But seems like I should be able to somehow enumerate the control bars and check if it "hasfocus" but didn't see that available. – user3161924 Aug 05 '21 at 15:15
  • You don't need such a global variable. GetFocus from inside your main thread should do the work. It does so in my application. – xMRi Aug 06 '21 at 09:21

0 Answers0