Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Context Help with Docking Pane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Context Help with Docking Pane

 Post Reply Post Reply
Author
Message
kublikhan View Drop Down
Newbie
Newbie


Joined: 10 August 2010
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote kublikhan Quote  Post ReplyReply Direct Link To This Post Topic: Context Help with Docking Pane
    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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.