S
sbrothy
Guest
I haver a form view in my resource file. It's in the Dialog section with the ID: IDD_FORMVIEW. In this CFormView I have a button with the ID: IDC_BUTTON_SAVE.
I create the formview on the fly in another class like so
m_Dlg.Create(IDD_FORMVIEW, this);
m_Dlg.ShowWindow(SW_SHOW);
This should make this class it's parent. (Maybe this is my problem that the messages only propagate down in the class ownership chain or whatever it's called.)
I have tried to enter the proper commands manually as well as using the Resouorce view's "Add Evenhandler" menu item.
It ends up the same.
In the MESSAGEMAP:
BEGIN_MESSAGE_MAP(CMailDetailView, CDockablePane)
[...]
ON_BN_CLICKED(IDC_BUTTON_SAVE, &CMailDetailView::OnBnClickedButtonSave)
END_MESSAGE_MAP()
In header:
afx_msg void OnBnClickedButtonSave();
In source:
void CMailDetailView::OnBnClickedButtonSave()
{
UpdateData();
}
Buit it's never called. I have a breakpoint in there. Nothing. Do I have to create a CDialog for the formview just to make this one command work?
Regards & TIA,
Søren
Continue reading...
I create the formview on the fly in another class like so
m_Dlg.Create(IDD_FORMVIEW, this);
m_Dlg.ShowWindow(SW_SHOW);
This should make this class it's parent. (Maybe this is my problem that the messages only propagate down in the class ownership chain or whatever it's called.)
I have tried to enter the proper commands manually as well as using the Resouorce view's "Add Evenhandler" menu item.
It ends up the same.
In the MESSAGEMAP:
BEGIN_MESSAGE_MAP(CMailDetailView, CDockablePane)
[...]
ON_BN_CLICKED(IDC_BUTTON_SAVE, &CMailDetailView::OnBnClickedButtonSave)
END_MESSAGE_MAP()
In header:
afx_msg void OnBnClickedButtonSave();
In source:
void CMailDetailView::OnBnClickedButtonSave()
{
UpdateData();
}
Buit it's never called. I have a breakpoint in there. Nothing. Do I have to create a CDialog for the formview just to make this one command work?
Regards & TIA,
Søren
Continue reading...