<?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 : ProgressControl on CommandBar</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : ProgressControl on CommandBar]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 12 Jun 2026 03:30:00 +0000</pubDate>
  <lastBuildDate>Fri, 24 Jul 2009 04:12:36 +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=14798</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[ProgressControl on CommandBar : Hi,  Check \Samples\CommandBars\CommonControls...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14798&amp;PID=51250&amp;title=progresscontrol-on-commandbar#51250</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 14798<br /><strong>Posted:</strong> 24 July 2009 at 4:12am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Check \Samples\CommandBars\CommonControls&nbsp; - shows how add standard controls to toolbar.</DIV>]]>
   </description>
   <pubDate>Fri, 24 Jul 2009 04:12:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14798&amp;PID=51250&amp;title=progresscontrol-on-commandbar#51250</guid>
  </item> 
  <item>
   <title><![CDATA[ProgressControl on CommandBar : I can easily add progress control...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14798&amp;PID=51193&amp;title=progresscontrol-on-commandbar#51193</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3516">securigy</a><br /><strong>Subject:</strong> 14798<br /><strong>Posted:</strong> 22 July 2009 at 10:06pm<br /><br />I can easily add progress control to command ba like shown in the example: <DIV>&nbsp;</DIV><FONT size=2><P></FONT><FONT size=2><FONT size=2>CXTPToolBar* pToolBarProgress = pCommandBars-&gt;Add(_T("Progress"), xtpBarTop);</P></FONT></FONT><FONT size=2><P></FONT><FONT size=2><FONT size=2>pToolBarProgress-&gt;GetControls()-&gt;Add(xtpControlLabel, 0)-&gt;SetCaption(_T("CXTPControlProgress:"));</P></FONT></FONT><FONT size=2><P>m_pToolbarProgressCtrl = </FONT><FONT size=2><FONT size=2>new</FONT></FONT><FONT size=2> CXTPControlProgress(); </P><DIV></FONT><FONT size=2>m_pProjectWizBar-&gt;GetControls()-&gt;Add((CXTPControl*)m_pToolbarProgressCtrl);</DIV><P>BOOL bVista = ((CBluetoothControllerApp*)AfxGetApp())-&gt;IsVista();</P><P>m_pToolbarProgressCtrl-&gt;Init(bVista, TRUE, bVista ? 10 : 30, 100, 1);</P><DIV></DIV><P>However I can't make it Marquee style since the CXTPControlProgress class is derived from CXTPControl and others that are not derived from CWnd and therefore cannot be used to send windows message that sets the marquee style:</P><DIV></DIV><FONT size=2><P>HWND hWnd = GetSafeHwnd();</P><P>LONG_PTR dwLong = GetWindowLongPtr(hWnd, GWL_STYLE);</P><P>LONG_PTR dwNewLong = dwLong | PBS_MARQUEE;</P><P>dwLong = SetWindowLongPtr(hWnd, GWL_STYLE, (LONG)dwNewLong);</P><DIV></DIV><FONT size=2><P>LRESULT lResult = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>this</FONT></FONT><FONT size=2>-&gt;SendMessage((UINT)PBM_SETMARQUEE,</FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// message ID</P></FONT></FONT><FONT size=2><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P>(WPARAM)TRUE, </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// set to marqee</P></FONT></FONT><FONT size=2><P>(LPARAM) m_nMarqueeDelay); </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// time in milisec between update</P></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE><DIV dir=ltr></DIV><FONT color=#0033cc>I tried to derive my own progress ctrl from CProgressControl but then the following line crashes (not sure why I was expecting a miracle)</FONT> <DIV></DIV><DIV><FONT color=#0033cc></FONT></DIV><DIV><FONT size=2><FONT color=#000000>m_pProjectWizBar-&gt;GetControls()-&gt;Add((CXTPControl*)m_pToolbarProgressCtrl);</FONT></FONT></DIV><DIV><FONT size=2><FONT color=#000000></FONT></FONT>&nbsp;</DIV><DIV><FONT size=2><FONT color=#000000>Is there any other way to make progress control marquee-style on the command bar ?</FONT></DIV></FONT></FONT></FONT></FONT></FONT>]]>
   </description>
   <pubDate>Wed, 22 Jul 2009 22:06:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14798&amp;PID=51193&amp;title=progresscontrol-on-commandbar#51193</guid>
  </item> 
 </channel>
</rss>