<?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 : Find ptr to CXTPControlCheckbox on check event?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Find ptr to CXTPControlCheckbox on check event?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 06:17:20 +0000</pubDate>
  <lastBuildDate>Fri, 06 Jun 2008 10:12:15 +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=10927</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[Find ptr to CXTPControlCheckbox on check event? : Oleg, Perfect! Thanks very much...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10927&amp;PID=36355&amp;title=find-ptr-to-cxtpcontrolcheckbox-on-check-event#36355</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2435">ibmldev</a><br /><strong>Subject:</strong> 10927<br /><strong>Posted:</strong> 06 June 2008 at 10:12am<br /><br />Oleg,<br><br>&nbsp; Perfect! Thanks very much for your help!<br><br>]]>
   </description>
   <pubDate>Fri, 06 Jun 2008 10:12:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10927&amp;PID=36355&amp;title=find-ptr-to-cxtpcontrolcheckbox-on-check-event#36355</guid>
  </item> 
  <item>
   <title><![CDATA[Find ptr to CXTPControlCheckbox on check event? : Hi,  Controls always send both...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10927&amp;PID=36335&amp;title=find-ptr-to-cxtpcontrolcheckbox-on-check-event#36335</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 10927<br /><strong>Posted:</strong> 06 June 2008 at 12:52am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Controls always send both WM_COMMAND and WM_XTP_EXECUTE. So you can use second to find out what control was executed:</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;ON_XTP_EXECUTE(ID_COMBO_DATE, OnComboDate)<BR></DIV><DIV>&nbsp;</DIV><DIV>void CMainFrame::OnComboDate(NMHDR* pNMHDR, LRESULT* pResult)<BR>{<BR>&nbsp;NMXTPCONTROL* tagNMCONTROL = (NMXTPCONTROL*)pNMHDR;</DIV><DIV>&nbsp;CControlComboBoxDatePicker* pControl = DYNAMIC_DOWNCAST(CControlComboBoxDatePicker, tagNMCONTROL-&gt;pControl);<BR>&nbsp;if (pControl)<BR>&nbsp;{<BR>&nbsp;&nbsp;pGroup = pControl-&gt;GetRibbonGroup();</DIV><DIV>&nbsp; etc;<BR>&nbsp;}<BR>}<BR></DIV>]]>
   </description>
   <pubDate>Fri, 06 Jun 2008 00:52:44 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10927&amp;PID=36335&amp;title=find-ptr-to-cxtpcontrolcheckbox-on-check-event#36335</guid>
  </item> 
  <item>
   <title><![CDATA[Find ptr to CXTPControlCheckbox on check event? : A group in a tab my ribbon bar...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=10927&amp;PID=36333&amp;title=find-ptr-to-cxtpcontrolcheckbox-on-check-event#36333</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2435">ibmldev</a><br /><strong>Subject:</strong> 10927<br /><strong>Posted:</strong> 05 June 2008 at 7:01pm<br /><br />A group in a tab my ribbon bar has several controls (checkbox, button, edit box with spin ctrls, etc.). Several copies of this group are in the same tab, and the IDs of the controls are also duplicated in each group.<br><br>For example, perhaps ID_CHECKBOX = 500, ID_BUTTON = 501, ID_EDITBOX = 502, and so on. So, if there are 3 groups, there are ID_CHECKBOX, ID_BUTTON, and ID_EDITBOX in the first group, and in the second group, and in the third group.<br><br>When a control sends an event (button click, check state change, spin edit change), I need to be able to tell which group the control is in. Obviously it isn't enough to know the ID, since the ID is the same in each group. For the edit box, I can catch the notify message NMXTPUPDOWN, which has a pointer to the CXTPControlEdit sending the message. That's great, but it seems to be the only case where such a lucky message occurs. I can't even use a similar mechanism if the text is edited with the keyboard--only when the spin controls are used.<br><br>Unfortunately, there isn't such a notify for button click or check state change, is there? The most I can do is to get an event with the ID, which isn't enough, since there are several controls with this same ID, one in each group.<br><br>I don't even know how to get a check state change event--right now, I am just handling ON_COMMAND( ID_CHECKBOX, OnCheckBox ) to know that something happened to the checkbox, and that doesn't pass any other information at all (there are no arguments in the handler). I can't even tell what the state of the control is--I just blindly toggle my notion of its state each time, hoping I'm matched up. This just doesn't seem right. Isn't there an event that tells that the state actually changed to?<br><br>I don't really want to reserve a huge range of control IDs for the possibility of some large number of groups duplicating these controls, and I don't know ahead of time how many there will be (they can be added or removed by the user).<br><br>Is there a way to find the group containing the control? At present we are using GetHighlightedGroup(), but that seems very bad.<br><br>Finally, is there a way to get a pointer to a CXTPControl if I know the control's HWND ? I'm really at a loss here...<img src="http://forum.codejock.com/smileys/smiley6.gif" border="0" align="absmiddle"><br>]]>
   </description>
   <pubDate>Thu, 05 Jun 2008 19:01:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=10927&amp;PID=36333&amp;title=find-ptr-to-cxtpcontrolcheckbox-on-check-event#36333</guid>
  </item> 
 </channel>
</rss>