CFormView in docking pane, with command bars |
Post Reply |
Author | |
Smucker
Senior Member Joined: 02 February 2008 Status: Offline Points: 156 |
Post Options
Thanks(0)
Posted: 30 March 2008 at 5:08am |
I have embedded a CFormView that includes a CSyntaxEditCtrl in a docking pane with some success. (I intend this for script editing, so it's not the main focus of the application. I really want to use a docking pane rather than a separate top-level window.)
However, I'm facing a couple of problems:
void CPythonEditor::OnInitialUpdate() { CFormView::OnInitialUpdate(); m_pCommandBars = (CXTPCommandBars*)RUNTIME_CLASS(CXTPCommandBars)->CreateObject(); ASSERT(m_pCommandBars); m_pCommandBars->SetSite(GetParent()); m_pCommandBars->EnableDocking(); m_pCommandBars->SetMenu(_T("Menu Bar"), MENU_PYTEXT); CXTPToolBar* pCommandBar = (CXTPToolBar*)m_pCommandBars->Add(_T("Standard"), xtpBarTop); if (!pCommandBar || !pCommandBar->LoadToolBar(MENU_PYTEXT)) { TRACE0("Failed to create toolbar\n"); return; } ... I am creating the CFormView-derived pane in OnDockingPaneNotify() as follows: case IDR_PANE_PYTHON: pPane->AttachView(this, RUNTIME_CLASS(CPythonEditor)); break; |
|
Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)
Platform: Windows 200x/XP/Vista/Win7 (32/64 bit) Language: Visual C++ 9.0 (Studio 2008) |
|
franji1
Groupie Joined: 28 June 2005 Status: Offline Points: 70 |
Post Options
Thanks(0)
|
I am having a similar problem. The Active MDI frame has accelerator keys for normal ASCII characters like '=' and '!' (it's a graphical editor, not text). But then I have a docking pane that has a grid view with an edit control, so I am unable to enter these key strokes because the active MDI is "translating" these key strokes for ITS purpose (MDI view does NOT have focus, the edit contol in my docking pane does).
Also, when the user switches the active MDI child to a different type that DOESN'T have this accelerator table, the edit control in the docking pane behaves properly.
|
|
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 |