CXTDockWindow and views |
Post Reply |
Author | |
bobo
Newbie Joined: 13 February 2004 Status: Offline Points: 1 |
Post Options
Thanks(0)
Posted: 13 February 2004 at 9:14am |
Hi! I'm having trouble getting my CXTDockWindow to work with a view in my SDI application. I'm using the method explained in KB 005.007 to create my frame and view. I'm sharing document between the main view and the view in my docking window. All messages gets routed correctly when the window is docked, but as soon as I "undock" the window it gets silent. Any ideas? - Bobo |
|
ddyer
Groupie Joined: 01 December 2003 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
|
Hi! I have an SDI app and have views in panes. They work whether you open or close the views, etc. I stole this trick from Oleg. Below is a function to place in your mainfrm.cpp that creates a panel window based on a particular view. The view is then created and attached to your document. It will receive all your doc update messages and whatnot:
FrameWnd* CMainFrame::CreateView(CRuntimeClass *type) context.m_pNewViewClass = type; CDocManager *pManager = AfxGetApp()->m_pDocManager;
Then, to create a view in your "onDockingPaneNotify" routine, just do: switch (pPane->GetID()) { ... case IDR_PANE_MYPANE: ... }
Edited by ddyer |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |