I have a split screen application with two panes. I would like to assign different views to each pane. I created the application using th wizard, which created a class called CSplitMFCView, a subclass of CView.
I added the following two lines in the OnCreateClient function of MainFrm.cpp
In order to differentiate between the two views, I modified the OnDraw function of CSplitMFCView so that it prints a red rectangle in the view. I added those lines:
What I thought would happen is that the first pane would have the red rectangle, and the second pane would be the default CView pane, which should be white. This was not the case, both panes have the red rectangle.
How can I fix this?
Thanks.
I added the following two lines in the OnCreateClient function of MainFrm.cpp
Code:
m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CSplitMFCView), CSize(1, 1), pContext); m_wndSplitter.CreateView(1, 0, RUNTIME_CLASS(CView), CSize(10, 10), pContext);
Code:
pDC->SetBkColor(RGB(152,0,0)); pDC->FillSolidRect(1, 1, 200, 200, RGB(255,0,0));
How can I fix this?
Thanks.
Comment