<?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 : activating tabs in CXTPTabControl</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : activating tabs in CXTPTabControl]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 17 Apr 2026 17:22:54 +0000</pubDate>
  <lastBuildDate>Thu, 15 Feb 2007 15:46:52 +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=6434</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[activating tabs in CXTPTabControl : I have a dialog attached to an...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6434&amp;PID=20487&amp;title=activating-tabs-in-cxtptabcontrol#20487</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2768">nadia</a><br /><strong>Subject:</strong> 6434<br /><strong>Posted:</strong> 15 February 2007 at 3:46pm<br /><br /><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman">I have a dialog attached to an XTPDockingPane.<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman">On the dialog I have several custom buttons (derived from MFC CButton) and a CXTPTabControl with corresponding dialog views (one for each button). Each view in the tab control has a number of edit controls.<o:p></o:p></FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>Clicking each custom button brings a particular tab to view. The tabs can also be selected/clicked directly from the tab control for editing.</FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman">The problem is as follows:<o:p></o:p></FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman">If I select any tab directly, it brings up the particular view and the cursor is placed in the first edit box on the view. However, if I click the custom button, the particular tab is selected and brought to view OK, but it does not place the cursor to the edit box (unless I click the tab directly).<o:p></o:p></FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman">There is OnClicked() message handler in my custom button class that posts a message to the parent dialog to select specified tab (TabControl-&gt;SetCurSel(index);)<o:p></o:p></FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>I also tried to call TabControl-&gt;SetFocus(); TabControl-&gt;SetSelectedItem(pItem); TabControl-&gt;OnItemClick(pItem); even pItem-&gt;Select() and pItem-&gt; SetVisible(); but nothing seems to programmatically set the focus to the correct spot (unless I manually click the tab)...</FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>This worked OK when I used MFC CTabCtrl class which makes me believe there is something up with CXTPTabControl…</FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>Any suggestions?</P><DIV></DIV></FONT>]]>
   </description>
   <pubDate>Thu, 15 Feb 2007 15:46:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6434&amp;PID=20487&amp;title=activating-tabs-in-cxtptabcontrol#20487</guid>
  </item> 
 </channel>
</rss>