Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - ReportControl Context menu
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ReportControl Context menu

 Post Reply Post Reply
Author
Message
larryp View Drop Down
Groupie
Groupie


Joined: 15 January 2005
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote larryp Quote  Post ReplyReply Direct Link To This Post Topic: ReportControl Context menu
    Posted: 12 May 2005 at 4:25pm
How do I display a context menu when right-clicking on the area below the last item in the last row?

I can display two of the three context menus that I need.  I can display the one when right-clicking the group heading and the one when right-clicking an item, but not when right-clicking below the last item.  I want to do something similar to what Outlook 2003 does.

Any help would be greatly appreciated.

Larry
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2005 at 1:33pm
Hello Larry,

To have a possibility to catch this event you can patch the code of the method CXTPReportControl::OnContextMenu like following:

       // call context menu handler for report area if clicked inside
       if (m_rcReportArea.PtInRect(ptClient))
       {
                // rows processing
                CXTPReportRow* pRow = HitTest(ptClient);
                if (pRow)
                {
                       SetFocusedRow(pRow, !pRow->IsGroupRow() || pRow->IsSelected());
                       pRow->OnContextMenu(ptClient);
                }
                else
                {
                       // send process notification to the user and wait for the reaction
                       SendMessageToParent(NULL, NULL, NULL, NM_RCLICK, &ptClient);
                }

       }

And just catch the notification when pointers to row and record item are NULL's.

This patch will also be included in the next version of the library.

--
WBR,
Serge
Back to Top
larryp View Drop Down
Groupie
Groupie


Joined: 15 January 2005
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote larryp Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 2005 at 8:12am
Thanks for the reply. 

I am glad it will be included in the next version.

Larry
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.

This page was generated in 0.078 seconds.