Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Suggestion:  please add XTP_NM_REPORT_GROUPBY_...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Suggestion: please add XTP_NM_REPORT_GROUPBY_...

 Post Reply Post Reply
Author
Message
Fredrik View Drop Down
Senior Member
Senior Member


Joined: 22 June 2005
Status: Offline
Points: 235
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fredrik Quote  Post ReplyReply Direct Link To This Post Topic: Suggestion: please add XTP_NM_REPORT_GROUPBY_...
    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
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.156 seconds.