Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - [SOLVED] Right click coordinates not consistent
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] Right click coordinates not consistent

 Post Reply Post Reply
Author
Message
Aaron Koolen View Drop Down
Groupie
Groupie


Joined: 22 July 2009
Status: Offline
Points: 32
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Koolen Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED] Right click coordinates not consistent
    Posted: 18 September 2011 at 8:48pm
With the upgrade to 15.1.3 we have noticed that the coordinates in the XTP_NM_REPORTRECORDITEM passed into the right click handler are not consistent between clicking on a row and in the empty area of the control.

In the latter it looks like coordinates are not translated to screen coordinates, and in the former they are (As they were in older versions).

Popup menus that are displayed on right click now appear in different positions depending on where you click.

Is there any known fix for this?

Thanks
Aaron

Product: Xtreme ToolkitPro v13.3.0 (MFC)
Platform: Windows XP (32bit) - SP 3
Language: Visual C++ 6
Back to Top
adrien View Drop Down
Senior Member
Senior Member


Joined: 30 April 2007
Location: New Zealand
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote adrien Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2011 at 11:36pm
looks like a ClientToScreen is missing at line 3528 in XTPReportControl.cpp

it should be

// Context menu
if (pBehavior->bContextMenu)
{
if (NULL != m_pSections->HitTest(point))
{
if (NULL != clickArgs.pRow)
{
clickArgs.pRow->OnContextMenu(point);
}
else
{
ClientToScreen(&point);
SendMessageToParent(NULL, NULL, NULL, NM_RCLICK, &point);
}
}
}
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 20 September 2011 at 11:54pm
Thanks, it's indeed a bug. I've added a new test to the ReportSample.

Andre

Codejock support
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 21 September 2011 at 6:03pm
This has been fixed for the next release. As a workaround you can add the following code to your handler.

#if _XTPLIB_VERSION_PREFIX==1513

XTP_NM_REPORTRECORDITEM *pItemNotify = reinterpret_cast<XTP_NM_REPORTRECORDITEM*>(pNotifyStruct);

if (NULL == pItemNotify->pRow)
{
   m_wndReportControl.ClientToScreen(&pItemNotify->pt);
}

#endif

Codejock support
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.141 seconds.