<?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 : [SOLVED] Cannot hide buttons in EditListBox</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : [SOLVED] Cannot hide buttons in EditListBox]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 12 May 2026 22:01:26 +0000</pubDate>
  <lastBuildDate>Wed, 08 Jul 2020 02:59:35 +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=24015</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[[SOLVED] Cannot hide buttons in EditListBox : Hello,It known bug, and it already...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24015&amp;PID=77761&amp;title=solved-cannot-hide-buttons-in-editlistbox#77761</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9012">agontarenko</a><br /><strong>Subject:</strong> 24015<br /><strong>Posted:</strong> 08 July 2020 at 2:59am<br /><br /><div>Hello,</div><div><br></div><div>It known bug, and it already fixed.</div><div>As hotfix you need to replace <br>void CXTPEditListBoxToolBar::Initialize(bool bAutoFont /*= true*/) function in next file<br>C:\Program Files (x86)\Codejock Software\MFC\Xtreme ToolkitPro v19.2.0\Source\Controls\ListBox\XTPEditListBox.cpp<br><br>with <br></div><div><br></div><div>void CXTPEditListBoxToolBar::Initialize(bool bAutoFont /*= true*/)<br>{<br>&nbsp;&nbsp;&nbsp; // Create the ToolTip control.<br>&nbsp;&nbsp;&nbsp; m_tooltip.Create(this);<br>&nbsp;&nbsp;&nbsp; m_tooltip.Activate(TRUE);<br><br>&nbsp;&nbsp;&nbsp; for (int i = 0; i &lt; _countof(m_arButton); ++i)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if ((!m_bShowNewDeleteButtons) &amp;&amp; ((i == 0) || (i == 1)))<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; continue;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if ((!m_bShowUpDownButtons) &amp;&amp; ((i == 2) || (i == 3)))<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; continue;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (!m_arButton<em>.Create(NULL, WS_CHILD | WS_VISIBLE | BS_ICON | BS_CENTER | BS_VCENTER,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; CRect(0, 0, 0, 0), this, _arButtonID<em>))<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TRACE0("Unable to create edit button.\n");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; continue;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CString strToolTip;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPResourceManager::AssertValid(<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; XTPResourceManager()-&gt;LoadString(&amp;strToolTip, _arButtonID<em>));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // Add tooltips to group buttons.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_tooltip.AddTool(&amp;m_arButton<em>, strToolTip);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // make sure the button is Windows XP theme compatible using<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // the toolbar button theme.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (m_arButton<em>.SetTheme(xtpControlThemeFlat))<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPButtonTheme* pTheme = m_arButton<em>.GetTheme();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (pTheme)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pTheme-&gt;EnableToolbarStyle(TRUE);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_arButton<em>.SetUseVisualStyle(TRUE);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_arButton<em>.EnableMarkup();<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; if (m_bShowNewDeleteButtons)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CString xamlAdd, xamlDel;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; VERIFY(XTPResourceManager()-&gt;LoadXAML(xamlAdd, IDR_XAML_ICON_LIST_SYMBOL_ADD));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; VERIFY(XTPResourceManager()-&gt;LoadXAML(xamlDel, IDR_XAML_ICON_LIST_SYMBOL_DELETE));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GetNewButton().SetWindowText(xamlAdd);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GetDeleteButton().SetWindowText(xamlDel);<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; if (m_bShowUpDownButtons)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CString xamlUp, xamlDown;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; VERIFY(XTPResourceManager()-&gt;LoadXAML(xamlUp, IDR_XAML_ICON_LIST_SYMBOL_ARROW_UP));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; VERIFY(XTPResourceManager()-&gt;LoadXAML(xamlDown, IDR_XAML_ICON_LIST_SYMBOL_ARROW_DOWN));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GetUpButton().SetWindowText(xamlUp);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GetDownButton().SetWindowText(xamlDown);<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; // Move the buttons to their correct location.<br>&nbsp;&nbsp;&nbsp; MoveButtons();<br><br>&nbsp;&nbsp;&nbsp; // Set the font for this window.<br>&nbsp;&nbsp;&nbsp; if (bAutoFont)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SetFont(&amp;XTPAuxData().xtpFont);<br>&nbsp;&nbsp;&nbsp; }<br>}<br></div><div><br></div><div>Regards,</div><div>Artem Gontarenko<br></div>]]>
   </description>
   <pubDate>Wed, 08 Jul 2020 02:59:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24015&amp;PID=77761&amp;title=solved-cannot-hide-buttons-in-editlistbox#77761</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED] Cannot hide buttons in EditListBox : There seem to be a bug in the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24015&amp;PID=77758&amp;title=solved-cannot-hide-buttons-in-editlistbox#77758</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5742">docontrol</a><br /><strong>Subject:</strong> 24015<br /><strong>Posted:</strong> 06 July 2020 at 6:00am<br /><br />There seem to be a bug in the source code for the CXTPEditListBox control in 19.2. If I call&nbsp;SetListEditStyle with&nbsp;LBS_XTP_ONLY_UP_DOWN to hide new and delete buttons the application will still try to apply markup to the hidden buttons. I can workaround the bug by manually hiding those buttons after creation, but it seems to me that there is a bug here. What makes me in doubt is the fact the LBS_XTP_ONLY_UP_DOWN&nbsp;is not mentioned in the CodeJock help file regarding the CXTPEditListBox::SetListEditStyle method. Is that also a bug?<div><br></div><div>The bug mentioned is in XTPEditListBox.cpp on lines 866-869:</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div><div>GetNewButton().SetWindowText(xamlAdd); &lt;--- Should not be called if !m_bShowNewDeleteButtons</div></div><div><div>GetDeleteButton().SetWindowText(xamlDel); &lt;--- Should not be called if !m_bShowNewDeleteButtons</div><div>GetUpButton().SetWindowText(xamlUp);</div><div>GetDownButton().SetWindowText(xamlDown);</div></div><div></pre></td></tr></table></div><div><br></div><div>Instead of applying the markup for all buttons after the for loop on lines 824-854, I would simply move the code inside the loop and apply it using a switch statement, e.g.:</div><div><br></div><div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>CString xamlBtn;</div><div>UINT nIDResource;</div><div>switch (i)</div><div>{</div><div><span style="white-space:pre">	</span>case 0:</div><div><span style="white-space: pre;">		</span>nIDResource&nbsp;= IDR_XAML_ICON_LIST_SYMBOL_ADD;</div><div><span style="white-space:pre">		</span>break;</div><div><span style="white-space: pre;">	</span>case 1:</div><div><span style="white-space:pre">		</span>nIDResource = IDR_XAML_ICON_LIST_SYMBOL_DELETE;</div><div><span style="white-space: pre;">		</span>break;</div><div><span style="white-space: pre;">	</span>case 2:</div><div><span style="white-space: pre;">		</span>nIDResource = IDR_XAML_ICON_LIST_SYMBOL_ARROW_UP;</div><div><span style="white-space: pre;">		</span>break;</div><div><span style="white-space: pre;">	</span>case 3:</div><div><span style="white-space: pre;">		</span>nIDResource = IDR_XAML_ICON_LIST_SYMBOL_ARROW_DOWN;</div><div><span style="white-space: pre;">		</span>break;</div><div>}</div><div>VERIFY(XTPResourceManager()-&gt;LoadXAML(xamlBtn, nIDResource));</div><div>m_arButton&#091; i &#093;.SetWindowText(xamlBtn);</div><div></pre></td></tr></table></div><div><br></div></div><div id="gtx-trans" style=": ; left: 273px; top: -9px;"><div ="gtx-trans-ic&#111;n"></div></div>]]>
   </description>
   <pubDate>Mon, 06 Jul 2020 06:00:44 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24015&amp;PID=77758&amp;title=solved-cannot-hide-buttons-in-editlistbox#77758</guid>
  </item> 
 </channel>
</rss>