I have CMainFrame class for my main window, and CChildView class for my view as generated by AppWizard. I have created two CChildView objects to represent two different view (client area Panels for controls) using m_wndView1.Create() and m_wndView2.Create(). but the ID used in the Create() function seem to be a problem. If its not AFX_IDW_PANE_FIRST the view does not display. Please I need a pointer to learn about the ID and how to solve the problem. Thanks.
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
m_wndView1.Create(NULL, NULL, AFX_WS_DEFAULT_VIEW,
CRect(0, 0, 0, 0), this, AFX_IDW_PANE_FIRST, NULL);
m_wndView2.Create(NULL, NULL, AFX_WS_DEFAULT_VIEW,
CRect(0, 0, 0, 0), this, AFX_IDW_PANE_FIRST+1, NULL);
pM_wndView1 = &m_wndView1;
pM_wndView2 = &m_wndView2;
RECT rect1;
rect1.left = 20; rect1.top = 100; rect1.right = 95; rect1.bottom = 125;
myButton.Create(_T("First"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, rect1, pM_wndView1, B_ID);
m_wndView2.ShowWindow(SW_SHOW); return 0;
}