Print Page | Close Window

[SOLVED] 15.1.3. Two message on right click

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=18995
Printed Date: 16 November 2024 at 5:23pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED] 15.1.3. Two message on right click
Posted By: aceproof
Subject: [SOLVED] 15.1.3. Two message on right click
Date Posted: 28 September 2011 at 10:15am

When I right click on the report row, at first I receive NM_CLICK notification, then NM_RCLICK

XTPReportControl.cpp:

void CXTPReportControl::OnButton(UINT nFlags, CPoint point,
	    CXTPReportBehaviorRowMouseButton* pBehavior)
{

     ...

     if (NULL != clickArgs.pRow)
{
...
if (!bHandled)
{
...
// Row click
if (pBehavior->bClick)
{
clickArgs.pRow->OnClick(point); // NM_CLICK if (pBehavior->bCheckSelectedRows && clickArgs.pItem) { SetSelectionState(clickArgs.pItem->GetIndex(), clickArgs.pItem->GetCheckedState()); } }
} // !bHandled
}
else if (m_bFastDeselectMode) { if (!bKeyControl && !bKeyShift) { m_pSelectedRows->Clear(); } } // Context menu if (pBehavior->bContextMenu) { if (NULL != m_pSections->HitTest(point)) { if (NULL != clickArgs.pRow) { clickArgs.pRow->OnContextMenu(point) // NM_RCLICK } else { SendMessageToParent(NULL, NULL, NULL, NM_RCLICK, &point); // NM_RCLICK } } }
}


If it is made to select row by right click, may be, do it without a sending the message NM_CLICK?




Replies:
Posted By: ABuenger
Date Posted: 28 September 2011 at 1:11pm
Hi,

the behavior is correct here. You can always set bClick to FALSE. Then the row will be selected, but no click will be performed. If you set bClick to FALSE, then you can for example not check a checkbox with the right mouse button.

Andre



-------------
Codejock support


Posted By: aceproof
Date Posted: 29 September 2011 at 2:43am
Thanks :-)



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