<?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 : Display issue with captions</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Task Panel : Display issue with captions]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 14 May 2026 10:09:25 +0000</pubDate>
  <lastBuildDate>Tue, 26 Aug 2008 20:59:14 +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=9567</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[Display issue with captions : HI, rdhd,  How to make the horizontal...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9567&amp;PID=40445&amp;title=display-issue-with-captions#40445</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4483">ricyang</a><br /><strong>Subject:</strong> 9567<br /><strong>Posted:</strong> 26 August 2008 at 8:59pm<br /><br />HI, rdhd,<DIV>&nbsp;</DIV><DIV>How to make the horizontal center aligning for the icon and text of each gruop items?</DIV><DIV>&nbsp;</DIV><DIV>Thank you very much?</DIV><DIV>&nbsp;</DIV><DIV>Ric</DIV>]]>
   </description>
   <pubDate>Tue, 26 Aug 2008 20:59:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9567&amp;PID=40445&amp;title=display-issue-with-captions#40445</guid>
  </item> 
  <item>
   <title><![CDATA[Display issue with captions : As a matter of fact someone did...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9567&amp;PID=31183&amp;title=display-issue-with-captions#31183</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 9567<br /><strong>Posted:</strong> 14 February 2008 at 10:23am<br /><br />As a matter of fact someone did write a custom theme for us and sure enough when asked to measure (draw is false) they were not checking the cpation visibility (but did when draw was true). I have found and modified the code appropriately.<DIV>&nbsp;</DIV><DIV>Thanks for the tip.</DIV>]]>
   </description>
   <pubDate>Thu, 14 Feb 2008 10:23:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9567&amp;PID=31183&amp;title=display-issue-with-captions#31183</guid>
  </item> 
  <item>
   <title><![CDATA[Display issue with captions : Hello,  In all default themes...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9567&amp;PID=31138&amp;title=display-issue-with-captions#31138</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 9567<br /><strong>Posted:</strong> 13 February 2008 at 1:20am<br /><br />Hello,<DIV>&nbsp;</DIV><DIV>In all default themes we have</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;if (!pGroup-&gt;IsCaptionVisible())<BR>&nbsp;&nbsp;&nbsp;return 0;</DIV><DIV>&nbsp;</DIV><DIV>in DrawGroupCaption. Maybe you added custom theme and don't return 0 if caption is hidden ?</DIV>]]>
   </description>
   <pubDate>Wed, 13 Feb 2008 01:20:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9567&amp;PID=31138&amp;title=display-issue-with-captions#31138</guid>
  </item> 
  <item>
   <title><![CDATA[Display issue with captions : It&amp;#039;s pretty simple to duplicate....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9567&amp;PID=31117&amp;title=display-issue-with-captions#31117</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 9567<br /><strong>Posted:</strong> 12 February 2008 at 4:05pm<br /><br />It's pretty simple to duplicate. Simply add a group using an ID that happens to match the ID of a string in&nbsp;your string table. When the Group ID is set, the code ends up asking MFC to load a string&nbsp;the given ID.<DIV>&nbsp;</DIV><DIV>After adding the Group, call ShowCaption(FALSE).</DIV><DIV>&nbsp;</DIV><DIV>Here are two images from slightly different commands that show the task panel has what appears to be different margins at the top but in reality is due to a difference in loaded modules that have string tables. Both Groups were created with an ID of one. The image on the left is the result of the attempt to load a string with ID of one failing.&nbsp;The one on the right is the result of a string being loaded (the string&nbsp;loaded was&nbsp;actually a filter list for a "file open" dialog box that happens to have an ID of one). To "fix" the issue I now always call SetCaption("") along with ShowCaption(FALSE) after adding a group (and item) when I am not specifically trying to set the caption.</DIV><DIV>&nbsp;</DIV><DIV>I have found I have to be super careful when working with CJ code due to all the attempts to automatically retrieve strings from a resource file. The other day I had to track down where a tooltip and button caption was coming from for an item added to the ribbon bar.&nbsp;I found that the string was not in the current MFC module state data's resource handle (the one obtained by calling AfxGetResourceHandle) so the system started walking all the modules loaded into the application and eventually found a string with the ID in a module loaded by an add-in that just happened to have a string with the same ID that was meant for a control on one of the add-in's dialog boxes!!</DIV><DIV>&nbsp;</DIV><DIV><img src="https://forum.codejock.com/uploads/20080212_155017_panel.bmp" border="0"></DIV>]]>
   </description>
   <pubDate>Tue, 12 Feb 2008 16:05:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9567&amp;PID=31117&amp;title=display-issue-with-captions#31117</guid>
  </item> 
  <item>
   <title><![CDATA[Display issue with captions : Hi,  too odd. Please attach...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9567&amp;PID=31108&amp;title=display-issue-with-captions#31108</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 9567<br /><strong>Posted:</strong> 12 February 2008 at 12:26pm<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>too odd. Please attach screenshot what do you see.</DIV>]]>
   </description>
   <pubDate>Tue, 12 Feb 2008 12:26:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9567&amp;PID=31108&amp;title=display-issue-with-captions#31108</guid>
  </item> 
  <item>
   <title><![CDATA[Display issue with captions : I noticed an inconsistent margin...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9567&amp;PID=31098&amp;title=display-issue-with-captions#31098</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 9567<br /><strong>Posted:</strong> 12 February 2008 at 8:58am<br /><br />I noticed an inconsistent margin at the top of my task panel that changed with the command I am running (my commands insert groups into the task panel). It turns out that if a group has a caption, but ShowCaption(FALSE) has been called, DrawGroupCaption will return the height of the caption even though the caption is not drawn.<DIV>&nbsp;</DIV><DIV>Then when the group is drawn, the top of the group is offset from the top of the task panel by the height of the non-displayed text.</DIV><DIV>&nbsp;</DIV><DIV>It looks like a bug in the calculation of the (top) group's offset or the panels client area where the group caption height is taken into account even though it is not displayed.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>To avoid this display anomoly I am calling SetCaption("") when I don't have a caption to display.</DIV><DIV>&nbsp;</DIV><DIV>Unbeknown to me was that when a group or item is added, CJ uses the ID and looks up a string in the resource file and then uses any found string as the caption. I was not calling SetCaption("") when I did not want a group header to display and was simply calling ShowCaption(FALSE). Now I know both calls are necessary. To be safe I also call SetCaption("") for an item added to a group since CJ automatically adds the item with an ID of zero and again can find a string in the resource file.</DIV>]]>
   </description>
   <pubDate>Tue, 12 Feb 2008 08:58:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9567&amp;PID=31098&amp;title=display-issue-with-captions#31098</guid>
  </item> 
 </channel>
</rss>