<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Left/Right Mouse Click notification on ReportCntrl</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Left/Right Mouse Click notification on ReportCntrl]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 18 Apr 2026 18:53:02 +0000</pubDate>
  <lastBuildDate>Mon, 18 May 2009 00:37:10 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=13761</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Left/Right Mouse Click notification on ReportCntrl :  ON_NOTIFY(NM_CLICK, XTP_ID_REPORT_CONTROL,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=49093&amp;title=left-right-mouse-click-notification-on-reportcntrl#49093</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13761<br /><strong>Posted:</strong> 18 May 2009 at 12:37am<br /><br /><FONT size=2><P>ON_NOTIFY(NM_CLICK, XTP_ID_REPORT_CONTROL, OnReportItemClick)</P><DIV></DIV>works for any left or both (left + right) button click.<DIV></DIV>e.g.<DIV></DIV><FONT color=#0000ff size=2><P>void</FONT><FONT size=2> CVirtualListView::OnReportItemClick(NMHDR * pNotifyStruct, LRESULT * </FONT><FONT color=#008000 size=2>/*result*/</FONT><FONT size=2>) {</P><P>CXTPReportControl&amp; wndReport = GetReportCtrl();</P><P></FONT><FONT size=2>XTP_NM_REPORTRECORDITEM* pItemNotify = (XTP_NM_REPORTRECORDITEM*) pNotifyStruct;</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (!pItemNotify-&gt;pColumn)</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2>;</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (!pItemNotify-&gt;pRow){</P><DIV>//do smth with columns - e.g. organize special sort</DIV></FONT><FONT size=2><P>}</P><P>}</P><P></FONT><FONT color=#0000ff size=2>else</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (m_bAllowDelete &amp;&amp; GetAsyncKeyState(VK_RBUTTON) &gt; 0)</P><P>{</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (AfxMessageBox(_T(</FONT><FONT color=#a31515 size=2>"Do you want to delete this record?"</FONT><FONT size=2>), MB_YESNO) == IDYES)</P><P>{</P><P></FONT><FONT color=#0000ff size=2></P><DIV>//I use it to delete record if both button used</DIV><DIV>int</FONT><FONT size=2> ind = pItemNotify-&gt;pRow-&gt;GetIndex();</DIV><P>CDBVListSet* pSet = &amp;GetDocument()-&gt;m_dBVListSet;</P><P></FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> nRecordCount = pSet-&gt;GetRecordCount();</P><P>pSet-&gt;MoveFirst();</P><P>pSet-&gt;Move(ind);</P><P>pSet-&gt;Delete();</P><P>GetReportCtrl().SetVirtualMode(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> CVirtualRecord(pSet), nRecordCount - 1, 7);</P><P>GetReportCtrl().Populate();</P><P>}</P><P>}</P><P></FONT><FONT color=#008000 size=2>//if (!pItemNotify-&gt;pRow)</P></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2>// return;</P></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2>//TRACE(_T("Click on row %d, col %d\n"),</P></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2>// pItemNotify-&gt;pRow-&gt;GetIndex(), pItemNotify-&gt;pColumn-&gt;GetItemIndex());</P></FONT><FONT size=2><P>}</P></FONT><FONT color=#0000ff size=2><P></FONT><FONT size=2>&nbsp;</P></FONT></FONT>]]>
   </description>
   <pubDate>Mon, 18 May 2009 00:37:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=49093&amp;title=left-right-mouse-click-notification-on-reportcntrl#49093</guid>
  </item> 
  <item>
   <title><![CDATA[Left/Right Mouse Click notification on ReportCntrl : Have to agree here. All this hit-testing...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=49085&amp;title=left-right-mouse-click-notification-on-reportcntrl#49085</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 13761<br /><strong>Posted:</strong> 17 May 2009 at 6:26pm<br /><br />Have to agree here. All this hit-testing should live inside the framework!]]>
   </description>
   <pubDate>Sun, 17 May 2009 18:26:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=49085&amp;title=left-right-mouse-click-notification-on-reportcntrl#49085</guid>
  </item> 
  <item>
   <title><![CDATA[Left/Right Mouse Click notification on ReportCntrl : I was assuming not deriving from...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=48864&amp;title=left-right-mouse-click-notification-on-reportcntrl#48864</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5078">Bart6</a><br /><strong>Subject:</strong> 13761<br /><strong>Posted:</strong> 11 May 2009 at 1:34pm<br /><br />I was assuming not deriving from ReportCntrl - but you are correct, it does work when deriving. Thanks for the reaction.<br /><br />-&gt;Would be nice if it would work without deriving OOTB. Codejock?<br /><br />Bart]]>
   </description>
   <pubDate>Mon, 11 May 2009 13:34:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=48864&amp;title=left-right-mouse-click-notification-on-reportcntrl#48864</guid>
  </item> 
  <item>
   <title><![CDATA[Left/Right Mouse Click notification on ReportCntrl : Not true.  You derive from CXTPReportControl...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=48859&amp;title=left-right-mouse-click-notification-on-reportcntrl#48859</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 13761<br /><strong>Posted:</strong> 11 May 2009 at 11:19am<br /><br />Not true.<DIV>&nbsp;</DIV><DIV>You derive from CXTPReportControl and add a handler for WM_CONTEXTMENU.</DIV><DIV>&nbsp;</DIV><DIV>void CReportControlEx::OnContextMenu(CWnd* pWnd, CPoint pos)<BR>{<BR>&nbsp;BOOL menuHandled = FALSE;<BR>&nbsp;<BR>&nbsp;CPoint clientPos = pos;<BR>&nbsp;ScreenToClient(&amp;clientPos);<BR>&nbsp;<BR>&nbsp;CXTPReportColumn *pColumn = GetReportHeader()-&gt;HitTest(clientPos);<BR>&nbsp;if (pColumn)<BR>&nbsp;&nbsp;menuHandled = ShowHeaderMenu(pColumn, pos);<BR>&nbsp;else if (HitTest(clientPos))<BR>&nbsp;&nbsp;menuHandled = ShowItemMenu(pos);<BR>&nbsp;<BR>&nbsp;if (!menuHandled)<BR>&nbsp;&nbsp;CXTPReportControl::OnContextMenu(pWnd, pos);<BR>}</DIV>]]>
   </description>
   <pubDate>Mon, 11 May 2009 11:19:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=48859&amp;title=left-right-mouse-click-notification-on-reportcntrl#48859</guid>
  </item> 
  <item>
   <title><![CDATA[Left/Right Mouse Click notification on ReportCntrl : No, ON_WM_CONTEXTMENU would work...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=48839&amp;title=left-right-mouse-click-notification-on-reportcntrl#48839</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5078">Bart6</a><br /><strong>Subject:</strong> 13761<br /><strong>Posted:</strong> 11 May 2009 at 3:48am<br /><br />No, ON_WM_CONTEXTMENU would work on the Dialog, not the ReportControl. We need a notification message of the right mouse button; but which one? (The ReportControl header file only mentions LBUTTONDOWN) ]]>
   </description>
   <pubDate>Mon, 11 May 2009 03:48:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=48839&amp;title=left-right-mouse-click-notification-on-reportcntrl#48839</guid>
  </item> 
  <item>
   <title><![CDATA[Left/Right Mouse Click notification on ReportCntrl : ON_WM_CONTEXTMENU()? ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=48837&amp;title=left-right-mouse-click-notification-on-reportcntrl#48837</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 13761<br /><strong>Posted:</strong> 11 May 2009 at 3:14am<br /><br />ON_WM_CONTEXTMENU()?]]>
   </description>
   <pubDate>Mon, 11 May 2009 03:14:44 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=48837&amp;title=left-right-mouse-click-notification-on-reportcntrl#48837</guid>
  </item> 
  <item>
   <title><![CDATA[Left/Right Mouse Click notification on ReportCntrl : Hi all,  Same here. i&amp;#039;m looking...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=48831&amp;title=left-right-mouse-click-notification-on-reportcntrl#48831</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5078">Bart6</a><br /><strong>Subject:</strong> 13761<br /><strong>Posted:</strong> 10 May 2009 at 4:39pm<br /><br />Hi all,<br /><br />Same here. i'm looking for the behaviour i get with XTP_NM_REPORT_LBUTTONDOWN, but then for the right mouse button.<br /><br />Bart]]>
   </description>
   <pubDate>Sun, 10 May 2009 16:39:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=48831&amp;title=left-right-mouse-click-notification-on-reportcntrl#48831</guid>
  </item> 
  <item>
   <title><![CDATA[Left/Right Mouse Click notification on ReportCntrl : Hi,is there a solution to this?...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=48745&amp;title=left-right-mouse-click-notification-on-reportcntrl#48745</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5198">SMaton</a><br /><strong>Subject:</strong> 13761<br /><strong>Posted:</strong> 07 May 2009 at 6:37am<br /><br />Hi,<br><br>is there a solution to this? I'm currently looking into this, too, but I haven't found a solution yet.<br><br>Thanks,<br>Stefan<br>]]>
   </description>
   <pubDate>Thu, 07 May 2009 06:37:19 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=48745&amp;title=left-right-mouse-click-notification-on-reportcntrl#48745</guid>
  </item> 
  <item>
   <title><![CDATA[Left/Right Mouse Click notification on ReportCntrl :   Currenty I only get a Left/Right...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=47004&amp;title=left-right-mouse-click-notification-on-reportcntrl#47004</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3411">poiser</a><br /><strong>Subject:</strong> 13761<br /><strong>Posted:</strong> 23 March 2009 at 11:29am<br /><br />Currenty I only get a Left/Right ButtonClick notification when a report item is clicked using this code:<br>&nbsp;ON_NOTIFY( NM_RCLICK,&nbsp; XTP_ID_REPORT_CONTROL, OnReportItemRClick)<br><br>How can I get mouse event notifications if any area on the report control is clicked (i.e not just report records/items).<br><br>Example: A report with only one record has a lot of empty space. Right-clicking on this empty space does not generate a mouse event. How can I get it to do so. Why is is that mouse events (left/right button click) are generated only when you right-click an item?<br>]]>
   </description>
   <pubDate>Mon, 23 Mar 2009 11:29:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13761&amp;PID=47004&amp;title=left-right-mouse-click-notification-on-reportcntrl#47004</guid>
  </item> 
 </channel>
</rss>