<?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 : Nested CXTPTaskPanelGroup</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Task Panel : Nested CXTPTaskPanelGroup]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 14 May 2026 09:42:36 +0000</pubDate>
  <lastBuildDate>Thu, 17 Aug 2006 13:40:05 +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=4258</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[Nested CXTPTaskPanelGroup : You can :) in TakPanel sample...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4258&amp;PID=15017&amp;title=nested-cxtptaskpanelgroup#15017</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 4258<br /><strong>Posted:</strong> 17 August 2006 at 1:40pm<br /><br />You can :)<DIV>in TakPanel sample see&nbsp; Search dialog.</DIV><DIV>&nbsp;</DIV><DIV>CXTPTaskPanelGroupItem* pItem = pGroup-&gt;AddControlItem(m_dlgModified);<BR></DIV>]]>
   </description>
   <pubDate>Thu, 17 Aug 2006 13:40:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4258&amp;PID=15017&amp;title=nested-cxtptaskpanelgroup#15017</guid>
  </item> 
  <item>
   <title><![CDATA[Nested CXTPTaskPanelGroup :      oleg wrote:Hello, It...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4258&amp;PID=15016&amp;title=nested-cxtptaskpanelgroup#15016</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1305">Simon HB9DRV</a><br /><strong>Subject:</strong> 4258<br /><strong>Posted:</strong> 17 August 2006 at 1:12pm<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by oleg" alt="Originally posted by oleg" style="vertical-align: text-bottom;" /> <strong>oleg wrote:</strong><br /><br /><p>Hello,</p><p>It can't work.... You can only create another TaskPanel and insert it as control.</p><p>&nbsp;</p><p>use Search...&nbsp; I posted some sample time ago..</p><p>&nbsp;</p></td></tr></table><br>Is it possible to put a CListCtrl inside a panel / group? I guess not - the ShortcutBar is what I want anyway!<br>]]>
   </description>
   <pubDate>Thu, 17 Aug 2006 13:12:40 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4258&amp;PID=15016&amp;title=nested-cxtptaskpanelgroup#15016</guid>
  </item> 
  <item>
   <title><![CDATA[Nested CXTPTaskPanelGroup : Hello, It can&amp;#039;t work.......]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4258&amp;PID=13075&amp;title=nested-cxtptaskpanelgroup#13075</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 4258<br /><strong>Posted:</strong> 22 May 2006 at 2:36pm<br /><br /><P>Hello,</P><P>It can't work.... You can only create another TaskPanel and insert it as control.</P><P>&nbsp;</P><P>use Search...&nbsp; I posted some sample time ago..</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Mon, 22 May 2006 14:36:17 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4258&amp;PID=13075&amp;title=nested-cxtptaskpanelgroup#13075</guid>
  </item> 
  <item>
   <title><![CDATA[Nested CXTPTaskPanelGroup : Hi, I would like to have the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4258&amp;PID=13073&amp;title=nested-cxtptaskpanelgroup#13073</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2033">fbeaupre</a><br /><strong>Subject:</strong> 4258<br /><strong>Posted:</strong> 22 May 2006 at 10:26am<br /><br /><P>Hi,</P><P>I would like to have the possibility to put a CXTPTaskPanelGroup inside of a CXTPTaskPanelGroupItems class. Since CXTPTaskPanelGroup is a child of CXTPTaskPanelItem, this should be pretty straightforward. In doing so, I could have multiple levels of nested groups inside my task panels (kink of like in a treeview). Here is the code I used to nest my groups (modified version of toolbox sample) (I force the call to ResetToolboxItems at every program startup):</P><P><FONT face="Courier New, Courier, mono" color=#666666 size=2>void CMainFrame::ResetToolboxItems()<BR>{<BR>&nbsp;m_wndTaskPanel.GetGroups()-&gt;Clear(FALSE);</FONT></P><P><FONT face="Courier New, Courier, mono" color=#666666 size=2>&nbsp;CXTPTaskPanelGroup* pFolderData = CreateToolboxGroup(ID_TOOLBOXFOLDER_DATA);<BR> &nbsp;pFolderData-&gt;AddLinkItem(ID_TOOLBOXITEM_DATASET&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ,26);<BR> &nbsp;pFolderData-&gt;AddLinkItem(ID_TOOLBOXITEM_OLEDBDATAAD APTER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ,27);<BR> &nbsp;pFolderData-&gt;AddLinkItem(ID_TOOLBOXITEM_OLEDBCONNEC TION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ,28);<BR> &nbsp;pFolderData-&gt;AddLinkItem(ID_TOOLBOXITEM_OLEDBCOMMAN D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp; ,29);<BR> &nbsp;pFolderData-&gt;AddLinkItem(ID_TOOLBOXITEM_SQLDATAADAP TER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ,30);<BR> &nbsp;pFolderData-&gt;AddLinkItem(ID_TOOLBOXITEM_SQLCONNECTI ON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p; ,31);<BR> &nbsp;pFolderData-&gt;AddLinkItem(ID_TOOLBOXITEM_SQLCOMMAND& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp; ,32);<BR> &nbsp;pFolderData-&gt;AddLinkItem(ID_TOOLBOXITEM_DATAVIEW&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp; ,33);</FONT></P><P><FONT face="Courier New, Courier, mono" color=#666666 size=2>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CXTPTaskPanelGroup* pFolderGeneral = new CXTPTaskPanelGroup(&amp;m_wndTaskPanel);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CXTPTaskPanelGroupItem* pPointer = pFolderGeneral-&gt;AddLinkItem(ID_TOOLBOXITEM_POINTER, 0);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pPointer-&gt;SetItemSelected(TRUE);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pPointer-&gt;AllowDrag(FALSE);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pPointer-&gt;AllowDrop(FALSE);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pFolderGeneral-&gt;SetIconIndex(IDR_MAINFRAME);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pFolderGeneral-&gt;SetCaption( L"BOB" );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pFolderData-&gt;GetItems()-&gt;Add( pFolderGeneral, ID_TOOLBOXFOLDER_GENERAL );<BR>&nbsp;&nbsp;&nbsp; }</FONT></P><P><FONT face="Courier New, Courier, mono" color=#666666 size=2>&nbsp;pFolderData-&gt;SetExpanded(TRUE);<BR>}</FONT></P><P>With the above code, everything compiles (all I do is legal according to the class hierarchy and the documentation). The problem occurs at runtime. I get a crash in this function:</P><P><BR><FONT face="Courier New, Courier, mono" color=#666666>void CXTPTaskPanelPaintManager::DrawGroupClientItems(CDC* pDC, CXTPTaskPanelGroup* pGroup, CRect rc)<BR>{<BR>&nbsp;int nOffset = rc.top - pGroup-&gt;GetScrollOffsetPos();</FONT></P><P><FONT face="Courier New, Courier, mono" color=#666666>&nbsp;for (int i = pGroup-&gt;GetOffsetItem(); i &lt; pGroup-&gt;GetItemCount(); i++)<BR>&nbsp;{<BR>&nbsp;&nbsp;CXTPTaskPanelGroupItem* pItem = pGroup-&gt;GetAt(i);<BR>&nbsp;&nbsp;if (!pItem-&gt;IsVisible())<BR>&nbsp;&nbsp;&nbsp;continue;</FONT></P><P><FONT face="Courier New, Courier, mono" color=#666666>&nbsp;&nbsp;CRect rcItem = pItem-&gt;GetItemRect();<BR>&nbsp;&nbsp;rcItem.OffsetRect(0, nOffset);</FONT></P><P><FONT face="Courier New, Courier, mono" color=#666666>&nbsp;&nbsp;pItem-&gt;OnDrawItem(pDC, rcItem);<BR>&nbsp;}<BR>}</FONT></P><P>The problem comes from the <FONT face="Courier New, Courier, mono">GetAt</FONT>&nbsp;function which does a c static cast on the returned pointer assuming that the base class pointer is of a certain derived type (which is a bug or a lack of documentation, in my opinion) Here is the code of <FONT face="Courier New">GetAt:</FONT></P><P><FONT face="Courier New, Courier, mono" color=#666666>CXTPTaskPanelGroupItem* CXTPTaskPanelGroup::GetAt(int nIndex) const<BR>{<BR>&nbsp;return (CXTPTaskPanelGroupItem*)m_pItems-&gt;GetAt(nIndex);<BR>}</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" color=#000000>I would really appreciate if someone at codejock could tell me if you are going to support nested CXTPTaskPanelGroup in a short period of time. We would need such a feature as soon as it would be available.</FONT></P>]]>
   </description>
   <pubDate>Mon, 22 May 2006 10:26:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4258&amp;PID=13073&amp;title=nested-cxtptaskpanelgroup#13073</guid>
  </item> 
 </channel>
</rss>