"Mark Salsbery [MVP]" <MarkSalsbery[MVP]@newsgroup.nospam> wrote in
message news:040BA94B-8E19-4343-BA8D-02CA0CD1DDA0@microsoft.com...
Hmm, then what window has the focus after a static control is clicked?
Whatever window had the focus - the focus doesn't change (I just tried it
on Vista)
With another app having the focus, I clicked on a static control in a
modal dialog of another app; the result was identical to clicking on the
title bar of the dialog; i.e. the first control in the Z-order (other than
the static control) got the focus.
If this is the behavior, I think perhaps in the OP's case, the CMainFrame
is getting the focus when the static control is clicked on. I typically
handle this something like:
CMainFrame::OnSetFocus(...)
{
// Give the view first crack at keyboard messages
GetActiveView()->SetFocus();
}
Maybe this is what is needed.
Could be. That's what CFrameWnd::OnSetFocus() does...