I have some general modeless custom Dialog box, which may contain 2 different custom Dialog boxes (they appear exclusively – the first or the second, but not the both).
For the simplicity, assume that:
General dialog box contains only the "Close" button
First child dialog contains only the "Show" button
Second child dialog contains only some static text (no buttons)
When my general dialog box contains the first child dialog I need to set the focus on "Show" child dialog's button, whereas when the general dialog box contains the second child dialog I need to set the focus on "Close" general dialog's button.
The only possible solution, which I found is to check conditionally in OnSetFocus() of General dialog box, who is its child and to call SetFocus appropriately. However, it's not too good-looking solution especially in my case, since the general dialog and the child dialogs reside in different MSVC projects.
Thanks a lot !