<?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 : ShortcutBar with a DockingPane</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Shortcut Bar : ShortcutBar with a DockingPane]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 22:06:23 +0000</pubDate>
  <lastBuildDate>Thu, 21 Jun 2012 10:35: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=19872</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[ShortcutBar with a DockingPane : Hi again,I&amp;#039;ve a similar problem...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19872&amp;PID=68476&amp;title=shortcutbar-with-a-dockingpane#68476</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=7520">alt</a><br /><strong>Subject:</strong> 19872<br /><strong>Posted:</strong> 21 June 2012 at 10:35am<br /><br /><div><br></div><div>Hi again,&nbsp;</div><div><br></div><div>I've a similar problem with the shortcut caption as the one with the shortcutbar described here.</div><div><br></div><div>What I'm trying to do is to add a shortcut caption onto a window where I can't use the method : this.Controls.Add(shortcutCaption), doing this my shortcut caption never gets a handles value as for the shortcut bar.</div><div><br></div><div>So I've subclassed the shortcut caption and I add it to a .Net user control that I manage only internally in the subclassed class. Here some code:</div><div><br></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>public class CJXSPShortcutCaption : AxShortcutCaption</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; private UserControl containerUserControl = null;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; public CJXSPShortcutCaption()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.BeginInit();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; containerUserControl = new UserControl();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; containerUserControl.BackColor = Color.Red;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; containerUserControl.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; containerUserControl.Controls.Add(this);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.EndInit();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; public new IntPtr Handle</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return &nbsp;base.Handle;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; }</div><div><br></div><div><br></div><div>Next I'm pinvoking SetParent to tell to my custom shortcut caption who is his parent.</div><div><br></div><div><br></div><div>This works but I've refresh problem. For example, when I'm resizing only the height of the window, the new size is set correctly but when I'm resizing only the width of the window, the new size is not set correctly (it keeps smaller).</div><div><br></div><div>So, can you help me, by explaining me how to add a shortcut caption onto a window without having to use the "this.Controls.Add(shortcutCaption)" method?</div><div><br></div><div>Thank you in advance</div><div><br></div>]]>
   </description>
   <pubDate>Thu, 21 Jun 2012 10:35:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19872&amp;PID=68476&amp;title=shortcutbar-with-a-dockingpane#68476</guid>
  </item> 
  <item>
   <title><![CDATA[ShortcutBar with a DockingPane : Ok guys,I&amp;#039;ve gone a step...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19872&amp;PID=68463&amp;title=shortcutbar-with-a-dockingpane#68463</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=7520">alt</a><br /><strong>Subject:</strong> 19872<br /><strong>Posted:</strong> 19 June 2012 at 11:06am<br /><br /><div>Ok guys,</div><div><br></div><div>I've gone a step further with this problem.</div><div><br></div><div>I've made a lot of tests trying adding the shortcut bar in the pane in several different ways.</div><div><br></div><div>What I've noticed, is that the handle of the shortcut bar is always 0.&nbsp;</div><div><br></div><div>The only way I've found to have the handle of the shortcut bar set properly is when I add it on a Windows Form:</div><div><br></div><div>// This line initialize the Handle of the shortcut bar</div><div>this.Controls.Add(this.shortcutBar)</div><div><br></div><div>According the MSDN documentation, to force the creation of the handle for a control, it's enough to acces the Handle property of the control:</div><div><br></div><div>// This SHOULD initialize the handle of the shortcut bar</div><div>IntPtr tempHandle = this.shortcutBar.Handle</div><div><br></div><div>However, when accessing the property the handle still equals zero.</div><div><br></div><div><br></div><div>What I've done as a workaround is a class inheriting from the shortcut bar and in this class I use a container form where I'm adding the shortcut bar but I was thinking&nbsp;</div><div>that there certainly is another way to set the handle for the shortcut bar? No?</div><div><br></div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Tue, 19 Jun 2012 11:06:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19872&amp;PID=68463&amp;title=shortcutbar-with-a-dockingpane#68463</guid>
  </item> 
  <item>
   <title><![CDATA[ShortcutBar with a DockingPane :   Hello,I&amp;#039;m trying to add...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19872&amp;PID=68453&amp;title=shortcutbar-with-a-dockingpane#68453</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=7520">alt</a><br /><strong>Subject:</strong> 19872<br /><strong>Posted:</strong> 18 June 2012 at 4:22am<br /><br /><div>Hello,</div><div>&nbsp;</div><div>I'm trying to add a docking pane and a shortcut bar in the docking pane on a Win32 dialog. I can add the docking pane and create a pane. But when I'm trying to add the shortcut bar in my pane... Nothing happens. Any help, suggestion, solution will be really appreciated.</div><div>&nbsp;</div><div>Here the relevant code (translated to c#)&nbsp;:</div><div>&nbsp;</div><div>&nbsp;<br><font face="Courier New, Courier, mono">// Create and initialize the docking pane<br>// The docking pane and the panes are correctly display on the win32 dialog<br>this.dockingPane = new AxDockingPane();<br>this.dockingPane.CreateControl();<br>this.dockingPane.AttachToWindow((int)this.Handle());<br>this.dockingPane.SetCommandBars(this.commandBars.GetDispatch());</font></div><div><font face="Courier New, Courier, mono"></font>&nbsp;</div><div><font face="Courier New, Courier, mono">// Create our left and 2 right panes - works ok<br>this.paneFuncsLib = this.dockingPane.CreatePane(AntiguaVODefines.PKL_DP_FUNCSLIB_ID, 300, 500, DockingDirection.DockLeftOf);<br>this.paneScheduler = this.dockingPane.CreatePane(AntiguaVODefines.PKL_DP_SCHEDULER_ID, 300, 500, DockingDirection.DockRightOf);<br>this.paneTipDay = this.dockingPane.CreatePane(AntiguaVODefines.PKL_DP_TIPDAY_ID, 300, 500, DockingDirection.DockRightOf);</font></div><div><font face="Courier New, Courier, mono"></font>&nbsp;</div><div><font face="Courier New, Courier, mono">// Create and initialize the shortcut bar<br>this.shortcutBarFuncsLib = new AxShortcutBar();<br>this.shortcutBarFuncsLib.CreateControl();</font></div><div><font face="Courier New, Courier, mono"></font>&nbsp;</div><div><font face="Courier New, Courier, mono">// Create one of our Win32 form that SHOULD be displayed in the shortcutbar<br>this.funcsLibFolders = new FuncsLibFolders(this, nullValue);<br>hWnd = (int)this.funcsLibFolders.Handle();</font></div><div><font face="Courier New, Courier, mono"></font>&nbsp;</div><div><font face="Courier New, Courier, mono">// Add a shortcut bar item and bind it to the form<br>this.shortcutBarItemFolders = this.shortcutBarFuncsLib.AddItem(AntiguaVODefines.PKL_SCB_FOLDERS_ID, "Caption",&nbsp; hWnd);<br>this.shortcutBarItemFolders.IconId = PKLClassesDefines.PKL_ICO_DOSSIERS_ID;</font></div><div><font face="Courier New, Courier, mono"></font>&nbsp;</div><div><font face="Courier New, Courier, mono">// here we add several other panes the same way -&gt; add item, hwnd</font></div><div><font face="Courier New, Courier, mono">// try to show the shortcutbar, this doesn't work<br>this.shortcutBarFuncsLib.Show();</font></div><div><font face="Courier New, Courier, mono"></font>&nbsp;</div><div><font face="Courier New, Courier, mono">// try to assign the shortcut bar to the pane on left -&gt; doesn't work but for other pane that doesn't contains shortcut bar<br>// but contains Win32 dialog, docking pane and pane are working ok<br>this.paneFuncsLib.SetHandle(this.shortcutBarFuncsLib.hWnd);</font></div>]]>
   </description>
   <pubDate>Mon, 18 Jun 2012 04:22:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19872&amp;PID=68453&amp;title=shortcutbar-with-a-dockingpane#68453</guid>
  </item> 
 </channel>
</rss>