In my MFC application I used CSplitterWnd to create two panes and each pane is a CFormView dialog box. When run this GUI application the splitter is working and both panes are showing but all controls (button, edit box, combo box...) are disabled. Both dialog boxes have property of 'child' and 'no border'.
Did I miss something to enable all those conntrols on the pane view?
Thanks a lot for help.
CK
/////////// Header file
class CParentSelectionDlg : public CFormView
{
protected:
CParentSelectionDlg(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CParentSelectionDlg)
// Form Data
public:
//{{AFX_DATA(CParentSelectionDlg)
enum { IDD = IDD_PARENT_SELECTION };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CParentSelectionDlg)
public:
virtual void OnInitialUpdate();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
virtual ~CParentSelectionDlg();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
//{{AFX_MSG(CParentSelectionDlg)
afx_msg void OnButtonSave();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////// CPP
IMPLEMENT_DYNCREATE(CParentSelectionDlg, CFormView)
CParentSelectionDlg::CParentSelectionDlg()
: CFormView(CParentSelectionDlg::IDD)
{
//{{AFX_DATA_INIT(CParentSelectionDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
CParentSelectionDlg::~CParentSelectionDlg()
{
}
void CParentSelectionDlg::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CParentSelectionDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CParentSelectionDlg, CFormView)
//{{AFX_MSG_MAP(CParentSelectionDlg)
ON_BN_CLICKED(IDC_BUTTON_SAVE, OnButtonSave)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CParentSelectionDlg diagnostics
#ifdef _DEBUG
void CParentSelectionDlg::AssertValid() const
{
CFormView::AssertValid();
}
void CParentSelectionDlg::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
#endif //_DEBUG
void CParentSelectionDlg::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
}
/////////////////////////////////////////////////////////////////////////////
// CParentSelectionDlg message handlers
void CParentSelectionDlg::OnButtonSave()
{
// TODO: Add your control notification handler code here
}
/// Thanks a lot
I bet your message map isn't set up correctly.
Can you post your code?