Print Page | Close Window

Suggestion: please add XTP_NM_REPORT_GROUPBY_...

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=19677
Printed Date: 16 November 2024 at 12:53pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Suggestion: please add XTP_NM_REPORT_GROUPBY_...
Posted By: Fredrik
Subject: Suggestion: please add XTP_NM_REPORT_GROUPBY_...
Date Posted: 22 April 2012 at 8:07am
Hi, 

Please add a XTP_NM_REPORT_GROUPBY_RCLICK (or similar) notification message for when the user right-clicks on the Group By area. 

Also, I wouldn't mind if
static BOOL CXTPReportHeader::s_bSendContextMenuForWholeHeaderArea
become a member instead and that there were set functions to set it.

Something like this?
void CXTPReportHeader::OnContextMenu(CPoint ptClick)
{
   CPoint ptClient(ptClick);
   if (!m_pControl || !m_pControl->GetMouseMode() != xtpReportMouseNothing)
      return;

   if (m_pControl->m_rcHeaderArea.PtInRect(ptClient))
   {
      // mark the column as clicked at by the dragging
      CXTPReportColumn* pColumn = HitTest(ptClient);
      if (pColumn || m_bSendContextMenuForWholeHeaderArea)
      {
         m_pControl->ClientToScreen(&ptClick);
         // send process notification to the user and wait for the reaction
         m_pControl->SendMessageToParent(NULL, NULL, pColumn, XTP_NM_REPORT_HEADER_RCLICK, &ptClick);

         m_pControl->RedrawControl();
      }
   }
   else if (m_pControl->m_rcGroupByArea.PtInRect(ptClient))
   {
      m_pControl->ClientToScreen(&ptClick);
      // send process notification to the user and wait for the reaction
      m_pControl->SendMessageToParent(NULL, NULL, NULL, XTP_NM_REPORT_GROUPBY_RCLICK, &ptClick);

      m_pControl->RedrawControl();
   }
}


-------------
Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0



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