Print Page | Close Window

CXTPDockContext not accessible :(

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=17175
Printed Date: 21 November 2024 at 6:52pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPDockContext not accessible :(
Posted By: znakeeye
Subject: CXTPDockContext not accessible :(
Date 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/



Replies:
Posted By: znakeeye
Date 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/



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