I have a dialog box with several combobox
es in it as a member variables. The control wizard lets me create handlers for the combobox
es for the CBN_KILLFOCUS
message. For example, one such handler is automatically called
void MyDlg::OnKillfocusMyCombo()
My expectation is that this handler would be called just as soon as I tab out of it. But it doesn't get called.
I ran into the same issue. This is a bug in MFC. (It's over 4 years later and it is still there.) Somehow
ON_CBN_KILLFOCUS
handler is never called although the Win32CBN_KILLFOCUS
notification itself is broadcast.To fix this override the
WindowProc
for the dialog manually (Win32-way):