Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - CXTPDockContext not accessible :(
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPDockContext not accessible :(

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: CXTPDockContext not accessible :(
    Posted: 31 August 2010 at 4:25am
I want to put a "dead" label on my toolbar. To get the desired behavior, I override CXTPToolBar::OnLButtonDown as shown below. The problem is that I get this compilation error:
error C2027: use of undefined type 'CXTPDockContext'
 
Is there a workaround?
 
 
 
void CMyToolBar::OnLButtonDown(UINT nFlags, CPoint point)
{
 if (m_barPosition == xtpBarFloating)
  SetWindowPos(&CWnd::wndTop, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);

 CXTPControl *pControl = m_pControls->HitTest(point);
 if (pControl == NULL || pControl->GetFlags() & xtpFlagSkipFocus)
 {
  m_pCommandBars->ClosePopups();

  if (m_pDockContext && ((m_dwFlags & (xtpFlagAlignAny | xtpFlagFloating)) != 0))
  {
   ClientToScreen(&point);
   m_pDockContext->StartDrag(point);
  }
 }
 else
 {
  CXTPCommandBar::OnLButtonDown(nFlags, point);
 }
}

PokerMemento - http://www.pokermemento.com/
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 31 August 2010 at 5:15am
Had to change CommandBars\Includes.h:
 
#include "XTPFrameWnd.h"
#include "XTPDockBar.h"
#include "XTPDockContext.h"
#include "XTPCommandBars.h"
PokerMemento - http://www.pokermemento.com/
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.145 seconds.