End Google Ads 201810 - BS.net 01 --> Hi,
I have created MFC application.I am having 2 Dialog boxes.If I click "Add" button(push button) on first Dialog second dialog will open.After canceling of second dialog once again focus is coming on Add Button.At that time I need to ******* my list box,which is on first dialog.

I need to get focus of Add button.So I have created small program like this

BEGIN_MESSAGE_MAP(CMyThreadDlg, CDialog)
ON_BN_SETFOCUS(IDC_BUTTON2, &CMyThreadDlg::OnBnSetfocusButton2)
END_MESSAGE_MAP()

void CMyThreadDlg::OnBnSetfocusButton2()
{
// TODO: Add your control notification handler code here
MessageBox(_T("Focus"));
}

If I click on that button focus is coming but function is not calling.Can anyone help me.