Originally posted by: jsupper
Hello
I developed a SDI application in the Outlook-Style; That is a database based application. I have a View "COutlookView" with Buttons to the left, and to the right a CRiPaneFrame from CFrameWnd; It includes many views (some are with a StaticSplitter), they switched after klicking on buttons in COutlookView.
The switching of the Views without Data works perfect. However, as soon as I open a database the First View stay visible in the backround. And the other ones can not be paint correctly.
I don�t have so much experience with VC++; And i hope telling me, where I have to pay attention with such problems.
I thank ahead.
Originally posted by: Doda
Please let me know if you know something about it.
Thanks in advance
PS:
Hello,
a error occurrred when I was switching between the different
views. After then, when I pull the splitter bar the programm will crash. In debug-mode the error occurred in the CSplitterWnd::GetPane function (pView is NULL). It seems so that the focus of the pane was lost.
doda
Your solution is very good!!!
Originally posted by: T.S.Venkateswaran
How do I restore the control back to the first pane,
Thanks in advance
Hi
This is a very good piece of work.
I appreciate your work.
A small question.
When I select a view in the First pane Tree,
the control moves to the right side pane.
Now,when I press the down arrow key, I couldn't
scroll down to the next view in the tree control, as
the control is now on the right pane.
immmediately after creating the corresponding view in
the right pane ?
TSV
Originally posted by: zartoven
I made frame consist of EditView-right half- & Left Upper TreeView & Left lower ListView.
I successed that work with author's method.. thanks!!
But, problem is occured when I try to access of one of Views.
I tried put something on Left Upper TreeView.
But, Didn't Work.
I traced the source code.. & finally, I found out there are duplicated Views !
That is, VIEW_SPLITTER mode's Two Views are different from VIEW_EDIT & VIEW_LIST mode's two Views...
First , of cause, i think that is one view..
and I tried to access one View of SPLITTER mode's two views,
with the pointer m_pEditCtrlView(m_pListCtrlView..) of member variable of CRightPaneFrame.
but no effect..
Now, I modify the source.
In CSplitterView, I add the pointers of child views.
& In Create Function of CSplitterView, I added code.
that is
pTree=(CMyTreeView *)m_wndSplitter.GetPane(0,0);
pList=(CMyListView *)m_wndSplitter.GetPane(1,0);
Because I don't want have duplicatd views in Splitter mode & alone mode, I will delete views used in
CRightPaneFrame.
In my opinion that do not needed.
again thanks for author & codeguru.
Originally posted by: Han Seok Won
Let me tell you the step that I had.
I changed the Height of Right Down Window( Edit Ctrl Wnd )
, and then I changed the Left Pane Winow( Tree View ),
then.....
the Height of Right Down Window ( Edit Ctrl Wnd ) return to the
First default Size...
How Can you solve this problem?
Originally posted by: Minsook Lee
Dear sir
That source is very nice to me..
But while I running the program I found some critical error..
That is, If I click into Edit window or List View window
in splitter window mode
then I change to another mode and return back in spliiter window mode
I lost that pointer which indicated the Edit window or List View window..
I dont't know why..
But I want to know why this situation happen..
Reply
Originally posted by: Amnon David
VIEW_MYFORMVIEW is just a new id defined for the new view (see RightPaneFrame.h)
BOOL CRightPaneFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
((CView*) m_pMyFormView)->Create(NULL, NULL, 0L, CFrameWnd::rectDefault, this, VIEW_MYFORMVIEW,
pContext);
The assumption is that you have created a CFormView class with
the class wizard from a template using the resource editor and
the class name is CMyFormView.
{
.
. // existing code for creating CEditView, CListView etc.
.
m_pMyFormView = (CMyFormView*) (RUNTIME_CLASS(CMyFormView))->m_pfnCreateObject();
m_pMyFormView->ShowWindow(SW_HIDE);
m_pMyFormView->SetDlgCtrlID(VIEW_MYFORMVIEW);
.
.
.
}