<?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 : Shifting Focus while Tabbing in a toolbar</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Shifting Focus while Tabbing in a toolbar]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 22 Apr 2026 04:37:22 +0000</pubDate>
  <lastBuildDate>Wed, 14 Sep 2005 05:23:00 +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=2372</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[Shifting Focus while Tabbing in a toolbar :   Fantastic !  Thank you so...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2372&amp;PID=8612&amp;title=shifting-focus-while-tabbing-in-a-toolbar#8612</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1424">g_j_a_i_n</a><br /><strong>Subject:</strong> 2372<br /><strong>Posted:</strong> 14 September 2005 at 5:23am<br /><br /><br><br>Fantastic !<br><br>Thank you so much for sharing. Thank you.<br><br>With your suggestion, the following statement has solved the problem:<br><br>return CXTPCommandBar::OnKeyDown(VK_RETURN);<br><br>The mistake I did was that I always returned TRUE.<br>I am still not sure how you got this idea. <img src="http://forum.codejock.com/smileys/smiley17.gif" border="0"><br><br>I was having problem with removing the focus from the combo box totally. What I was not able to do.<br><br>Thanks again <img src="http://forum.codejock.com/smileys/smiley9.gif" border="0"><br><br>Regards,<br>Gautam Jain<br><br>]]>
   </description>
   <pubDate>Wed, 14 Sep 2005 05:23:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2372&amp;PID=8612&amp;title=shifting-focus-while-tabbing-in-a-toolbar#8612</guid>
  </item> 
  <item>
   <title><![CDATA[Shifting Focus while Tabbing in a toolbar : For those out there, I came up...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2372&amp;PID=7957&amp;title=shifting-focus-while-tabbing-in-a-toolbar#7957</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1233">mwest</a><br /><strong>Subject:</strong> 2372<br /><strong>Posted:</strong> 01 August 2005 at 5:26pm<br /><br />For those out there, I came up with an ugly hack to get the tabbing towork (the cursor enters an edit box or a dropdown, regardless ofwhether it is inherited from CWnd or CXTPControl) without altering theCode Jock source code.&nbsp; The work-around is not pleasant, but itseems to work.&nbsp; If there is a better solution, I would love tohear it.<br><br>1)&nbsp; Because we cannot alter CXTPCommandBar and we cannot use acustom CommandBar, we need to make a new class that inherits fromCXTPToolBar.&nbsp; Call it CToolBarEx or something.<br><br>2)&nbsp; When adding the toolbar that needs the tabbing behavior inCMainFrame:: OnCreate, explicitly indicate what toolbar class to use:<br><br><table width="99%"><tr><td><pre class="BBcode">CXTPToolBar* pToolbar = (CXTPToolBar*)pCommandBars-&gt;Add(“Toolbar”, xtpBarTop, RUNTIME_CLASS(CToolBarEx));</pre></td></tr></table><br><br>3)&nbsp;&nbsp; &nbsp;In the CToolBar class, override the OnKeyDown(UINTnChar).&nbsp; Take note this is a custom Codejock method and not thestandard OnKeyDown we all know and love.<br><br>4)&nbsp;&nbsp; &nbsp;The body of the OnKeyDown should be:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>if( nChar == VK_TAB )<br>{<br>&nbsp; int nNum = m_pControls-&gt;GetNext(m_nSelected, +1);<br>&nbsp; CXTPControl* pCtrl = GetControl(nNum);<br>&nbsp; DWORD tag = pCtrl-&gt;GetTag();<br>&nbsp; if( tag == 42 )<br>&nbsp; {<br>&nbsp;&nbsp;&nbsp; SetSelected(nNum, TRUE);<br>&nbsp;&nbsp;&nbsp; SetFocusedControl(pCtrl);<br>&nbsp;&nbsp;&nbsp; return CXTPCommandBar::OnKeyDown(VK_RETURN);<br>&nbsp; }&nbsp;&nbsp;&nbsp; <br>}<br><br>return CXTPToolBar::OnKeyDown(nChar);<br></pre></td></tr></table><br><br>The code essentially sets the next control up for focus and calls anextra OnKeyDown, but with VK_ENTER so that all the codejock code willperform like normal.<br><br>The ‘if(tag == 42 )’ statement is noteworthy because we want to checkto see if this control requested the tabbing-enter (You might not wantan Enter performed on a button).<br><br>5)&nbsp; When making the control set the Tag data to flag it wants tobe a part of the tab-enter inCMainFrame::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl).<br><br><table width="99%"><tr><td><pre class="BBcode"><br>// ...Next to your<br>lpCreateControl-&gt;pControl = m_pComboUrl;<br>// ...put <br>pCreateControl-&gt;pControl-&gt;SetTag( 42 );<br></pre></td></tr></table><br><br>6)&nbsp; Test it<br>]]>
   </description>
   <pubDate>Mon, 01 Aug 2005 17:26:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2372&amp;PID=7957&amp;title=shifting-focus-while-tabbing-in-a-toolbar#7957</guid>
  </item> 
  <item>
   <title><![CDATA[Shifting Focus while Tabbing in a toolbar : It is added for 9.70 release....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2372&amp;PID=7136&amp;title=shifting-focus-while-tabbing-in-a-toolbar#7136</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 2372<br /><strong>Posted:</strong> 17 June 2005 at 7:24am<br /><br />It is added for 9.70 release. Key handled in CXTPCommandBar::OnKeyDown.]]>
   </description>
   <pubDate>Fri, 17 Jun 2005 07:24:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2372&amp;PID=7136&amp;title=shifting-focus-while-tabbing-in-a-toolbar#7136</guid>
  </item> 
  <item>
   <title><![CDATA[Shifting Focus while Tabbing in a toolbar : Will this change be in a future...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2372&amp;PID=7070&amp;title=shifting-focus-while-tabbing-in-a-toolbar#7070</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1233">mwest</a><br /><strong>Subject:</strong> 2372<br /><strong>Posted:</strong> 14 June 2005 at 9:52am<br /><br />Will this change be in a future release?&nbsp; If so, what did you do to move the focus?]]>
   </description>
   <pubDate>Tue, 14 Jun 2005 09:52:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2372&amp;PID=7070&amp;title=shifting-focus-while-tabbing-in-a-toolbar#7070</guid>
  </item> 
  <item>
   <title><![CDATA[Shifting Focus while Tabbing in a toolbar : Thank you for this good suggestion....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2372&amp;PID=7065&amp;title=shifting-focus-while-tabbing-in-a-toolbar#7065</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 2372<br /><strong>Posted:</strong> 14 June 2005 at 5:05am<br /><br />Thank you for this good suggestion. We changed this behaviour.]]>
   </description>
   <pubDate>Tue, 14 Jun 2005 05:05:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2372&amp;PID=7065&amp;title=shifting-focus-while-tabbing-in-a-toolbar#7065</guid>
  </item> 
  <item>
   <title><![CDATA[Shifting Focus while Tabbing in a toolbar : How do you shift focus along with...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2372&amp;PID=7057&amp;title=shifting-focus-while-tabbing-in-a-toolbar#7057</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1233">mwest</a><br /><strong>Subject:</strong> 2372<br /><strong>Posted:</strong> 13 June 2005 at 5:00pm<br /><br />How do you shift focus along with the selection (highlight) when tabbing through controls (like CControlComboBoxEx)?<br><br>I am having trouble getting certain notifications.<br><br>Take a look at the Custom Themes Sample.&nbsp; How can you make itenter focus into the "masked" combo box when the user tabs from aprevious control like the "new" box?<br><br>The user should be able to start typing without having to hit &lt;enter&gt; first.<br><br>Thanks.<br>]]>
   </description>
   <pubDate>Mon, 13 Jun 2005 17:00:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2372&amp;PID=7057&amp;title=shifting-focus-while-tabbing-in-a-toolbar#7057</guid>
  </item> 
 </channel>
</rss>