Hi,
I have a MDI program with child windows of different views. I need each view to know when it is in focus. I have tried to overload the OnActivateView() function in my View class to no avail:
Code:
void CG3::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView)
{
if(m_oldActive != NULL) {
if(*m_oldActive != *pActivateView) {
theG3->setSerial(m_serial);
}
}
// Set old view equal to new view
m_oldActive = pActivateView;
theG3->setSerial(m_serial);
CView::OnActivateView(bActivate, pActivateView, pDeactiveView);
}
Can anybody figure out why it is not working. Thanks
Amish