Controlling input focus in an application with several kinds of MFC SDI

We have a relatively large MFC application that uses SDI to host several dynamically created views based on CView. The main structure of the application is somewhat similar to Outlook (tree view on the left, dynamic view on the right).

I was looking for the right way to handle focus changes in an application. For example, I would like to hit the tab while the focus is in the tree view (left view) and move the focus to the correct view. Although I could grab the tab key in the ctrl tree and manually switch to the appropriate view, we have many different types (some based on CFormView) and many splitter controls, and I'm not sure if there is a more general way to handle this.

I know that setting focus in CDialog or CFormView is simple (just using the built-in tab order manager in Visual Studio), but an application that contains several types and separators, etc. is much more complicated. For example, if the focus is currently in form view mode, when I find a tab at the end of the form display order, how do I determine if I need to change the input focus to another (dynamic) view?

Greetings and thanks to all.

Darren.

+3
source share
1 answer

One obvious answer would be to simplify the user interface itself.

"" , ; , ( , , 1, Alt-V-1).

- , : Tab .

0

Source: https://habr.com/ru/post/1714141/


All Articles