Print Page | Close Window

Context Help with Docking Pane

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=17098
Printed Date: 21 December 2024 at 10:06pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Context Help with Docking Pane
Posted By: kublikhan
Subject: Context Help with Docking Pane
Date Posted: 10 August 2010 at 11:52pm

Product: CodeJock Xtreme Toolkit Pro 2008 Vol 2(12.1.1)
Platform: Windows 7
Language Visual C++ 6

Hi, I am new to codejock. I am adding Docking Panes to my project. Everything is working fine except for 1 problem. Context help(f1) does not get displayed if I use pPane->AttachView(). Context help works just fine if I use pPane->Attach(). Likewise, Context help does not work if I pPane->Attach() a CFrameWnd, but works just fine if I use a CWnd. Example:


LRESULT CMainFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)
{
CXTPDockingPane* pPane = (CXTPDockingPane*)lParam;
...

//Context help works:
CWnd* pWnd = new CWnd;
pWnd->Create(NULL, NULL, WS_CHILD | WS_VISIBLE, CRect(0,0,0,0), pPane->GetParentFrame(), pPane->GetID());
pPane->Attach(pWnd);

//Context help does not work:
CFrameWnd* pWnd = new CFrameWnd;
pWnd->Create(NULL, NULL, WS_CHILD | WS_VISIBLE, CRect(0,0,0,0), pPane->GetParentFrame(), 0, 0);
pPane->Attach(pWnd);

//Context help works:
CWnd* pWnd = (CWnd*)pViewClass->CreateObject();
pWnd->Create(NULL, NULL, WS_CHILD | WS_VISIBLE, CRect(0,0,0,0), pPane->GetParentFrame(), pPane->GetID());
pPane->Attach(pWnd);

//Context help does not work:
CWnd* pWnd = pPane->AttachView(pPane->GetParentFrame(), pViewClass);

 
I found a workaround in that if I override OnHelp() to hide my main window and then show it, the context help will be displayed. But this is kind of a sucky workaround. I was hoping someone might have a better idea of what my problem is here.
Workaround:
void CMainFrame::OnHelp()
{
 UINT iActivePane = -1;
 CXTPDockingPane* pPane = m_paneManager.GetActivePane();
 if(pPane)
  iActivePane = pPane->GetID();
 CWnd* pWnd = this->GetParentOwner();
 
 if(IDS_PROBLEM_PAIN == iActivePane)
 {
  pWnd->ShowWindow(SW_HIDE);
  pWnd->ShowWindow(SW_SHOW);
 }

 CXTPFrameWnd::OnHelp();
}



-------------
Product: CodeJock Xtreme Toolkit Pro 2008 Vol 2(12.1.1)
Platform: Windows 7
Language Visual C++ 6



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net