Objective Grid: Handling OnKillFocus()

Article ID: 441
Last updated: 27 Apr, 2018
Article ID: 441
Last updated: 27 Apr, 2018
Revision: 4
Views: 2642
Posted: 24 Jan, 2001
by Meltreger B.
Updated: 27 Apr, 2018
by Meltreger B.

Problem


How can I process OnKillFocus( ) for the grid when a cell is active?


Cause



Action


When a current cell is active and receives the WM_KILLFOCUS message, it sends a WM_KILLFOCUS to the grid.

So, you can process the WM_KILLFOCUS message in your grid, even if a control was active. But, you should check the m_bIgnoreFocus flag. This is set when the focus is set to a current cell.
 

void CMyGridWnd::OnKillFocus(CWnd* pNewWnd)
{
if (!m_bIgnoreFocus)
{
// do your processing
}

CGXGridWnd::OnKillFocus(pNewWnd);

}


 

This article was:   Helpful | Not helpful
Report an issue
Article ID: 441
Last updated: 27 Apr, 2018
Revision: 4
Views: 2642
Posted: 24 Jan, 2001 by Meltreger B.
Updated: 27 Apr, 2018 by Meltreger B.

Others in this category