C++ MFC - DatePickerControl - DTN_DATETIMECHANGE event getting triggered twice when c
In a form, I am having a message map at the Tab-level like below:
ON_NOTIFY_RANGE(DTN_DATETIMECHANGE, DLG_CTRLBASE, DLG_CTRLBASE + DLG_MAXITEMS_CTRL, OnDateTimeChange)
From TabCtrl::OnDateTimeChange(), I have a call to next level DataFormDlg::OnDateTimeChange
TabCtrl::OnDateTimeChange
{
DataFormDlg->OnDateTimeChange;
}
Inside DataFormDlg, I have another message map as below
ON_NOTIFY_RANGE(DTN_DATETIMECHANGE, DLG_CTRLBASE, DLG_CTRLBASE + DLG_MAXITEMS_CTRL, OnDateTimeChange) and the function is
DataFormDlg::OnDateTimeChange ()
{
//body
}
Now when I click at the datepicker control, the DTN_DATETIMECHANGE event is triggering twice. So, the TabCtrl -> DataFormDlg -> OnDateTimeChange() is executing twice.
Could you please help me finding what is going wrong here?
Thanks,
Re: C++ MFC - DatePickerControl - DTN_DATETIMECHANGE event getting triggered twice wh
I have a problem understanding your post.
Your problem description uses terms that only you can understand:
What is a Tab-level in a map at the Tab-level?
What do you mean I have a call to next level DataFormDlg?
How DataFormDlg is related to a Tab-level?
Could you please rewrite a post and describe what are you doing assuming that we do not have a crystal ball nor can we read your mind?