Re: problems in creating file dialog in tab control
The fact that it is a MFC DLL doesn't really tell me much.
Is the parent of the Tab control a CWnd class or a CDialog class?
If so then add this line to the message map
ON_NOTIFY(TCN_SELCHANGE, IDC_TABCTRL,OnTcnSelChangeTabCtrl)
and this method
void CMyWnd::OnTcnSelChangeTabCtrl(NMHDR *,LRESULT *pResult)
{
here you can ask the tab control which tab is selected.
}
and this to your header
afx_msg void OnTcnSelChangeTabCtrl(NMHDR *,LRESULT *pResult);
When I was coming up with the message map I was looking for the control ID
of the tab control in your code, and I realized that you are not passing a
valid control id to it. Pass it a control id instead of NULL. It's the 10th
parameter of CreateWindow (HMENU hMenu), this parameter is the control ID
instead of menu handle when you are creating controls.
Use the same id in the message map.
If you are not using CWnd or CDialog as the parent of the tab control let me
know
AliR.
"lfsym" <clamayi@gmail.com> wrote in message
news:1154536654.205661.321660@h48g2000cwc.googlegroups.com...
Hi AliR,
I am developing a MFC DLL project. I don't know how to catch
TCN_SELCHANGE notification. Could you give me some ideas?
David