#define DONT_INCLUDE_AFXTEMPL #include "CEditWFocus.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif CEditWFocus::CEditWFocus() { } /*virtual*/ CEditWFocus::~CEditWFocus() { } BEGIN_MESSAGE_MAP(CEditWFocus, CWnd) ON_WM_KILLFOCUS() ON_WM_SETFOCUS() END_MESSAGE_MAP() afx_msg void CEditWFocus::OnKillFocus(CWnd* pNewWnd) { CWnd::OnKillFocus(pNewWnd); GetParent()->SendMessage(WM_KILLFOCUS); } afx_msg void CEditWFocus::OnSetFocus(CWnd* pOldWnd) { CWnd::OnSetFocus(pOldWnd); GetParent()->SendMessage(WM_SETFOCUS); }