onkillfocus

OnKillFocus() override in MFC triggering at odd times.

I need to know when my Window goes out of input focus, so I overloaded the OnKillFocus() method of the CWnd. However it doesn't invoke this method when I focus another application (alt+tab), or even minimize the window. But it DOES invoke the method when I restore it from being minimized. Are these the intended times for it to trigger ...

MFC CComboBox OnKillFocus/ShowDropDown after SetCurSel on Windows 7

As you may know a CComboBox (DropDownList style) only selects properly by typing if you don't let it autosort it's content. Here an example of what i mean: You type A and then B. If it is not on autosort it will first select the next entry beginning with A and then the next entry beginning with B. If it is sorted it will select the next...