<?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</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Last 10 Posts]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 11 Jul 2026 12:11:26 +0000</pubDate>
  <lastBuildDate>Tue, 30 Jun 2026 03:29:07 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>30</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_topic_feed.asp</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[Command Bars : Problem with shortcut assignment]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24632&amp;PID=79420&amp;title=problem-with-shortcut-assignment#79420</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9012">agontarenko</a><br /><strong>Subject:</strong> Problem with shortcut assignment<br /><strong>Posted:</strong> 30 June 2026 at 3:29am<br /><br /><div>Hello,</div><div><br></div><div>I can't to run your project</div><div><br></div><div><div>Regards,</div><div>Artem Gontarenko</div><br></div>]]>
   </description>
   <pubDate>Tue, 30 Jun 2026 03:29:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24632&amp;PID=79420&amp;title=problem-with-shortcut-assignment#79420</guid>
  </item> 
  <item>
   <title><![CDATA[Command Bars : Problem with shortcut assignment]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24632&amp;PID=79419&amp;title=problem-with-shortcut-assignment#79419</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9740">mgregory8</a><br /><strong>Subject:</strong> Problem with shortcut assignment<br /><strong>Posted:</strong> 29 June 2026 at 3:52am<br /><br />I don't know how to get the problem to occur with your sample. I provided a test project which I hoped you would use. We run this on Windows Server 2016.]]>
   </description>
   <pubDate>Mon, 29 Jun 2026 03:52:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24632&amp;PID=79419&amp;title=problem-with-shortcut-assignment#79419</guid>
  </item> 
  <item>
   <title><![CDATA[Command Bars : Problem with shortcut assignment]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24632&amp;PID=79418&amp;title=problem-with-shortcut-assignment#79418</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9012">agontarenko</a><br /><strong>Subject:</strong> Problem with shortcut assignment<br /><strong>Posted:</strong> 29 June 2026 at 3:41am<br /><br /><div>Hello,</div><div><br></div><div>I've checked our VB sample and key assign problem not found. May be I need to do additional some actions?&nbsp;</div><div>I've checked with VB6 ActionsSample.</div><div><br></div><div>Regards,</div><div>Artem Gontarenko</div>]]>
   </description>
   <pubDate>Mon, 29 Jun 2026 03:41:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24632&amp;PID=79418&amp;title=problem-with-shortcut-assignment#79418</guid>
  </item> 
  <item>
   <title><![CDATA[Command Bars : Can&#039;t resize PictureBox in MDI Frame window]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24647&amp;PID=79417&amp;title=cant-resize-picturebox-in-mdi-frame-window#79417</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4827">DaveH</a><br /><strong>Subject:</strong> Can&#039;t resize PictureBox in MDI Frame window<br /><strong>Posted:</strong> 25 June 2026 at 5:48pm<br /><br /><div>Hi, I have a VB6 MDIForm with a CommandBars control, and have aligned a PictureBox on the left. In the CommandBars_RepositionAlignedControls event handle, I call CommandBars.MoveAlignedControl on the PictureBox, and everything looks good.</div><div><br></div><div>However, I want to change the width of the PictureBox at runtime. If the CommandBars isn't on the form, it works as expected. However, when the CommandBars is on the form, changing the Width property of the PictureBox doesn't do anything: no visible change, and if I set the Width, then read it back, it's unchanged.</div><div><br></div><div>A small project that demonstrates the problem: Create a new VB6 project that contains an MDIForm. On the MDIForm, put a CommandBars control named CommandBars and a PictureBox named Picture1. Set the Align of Picture1 to Align Left and the Width to 2000. Put a CommandButton named Command1 inside Picture1, near the upper-left.</div><div><br></div><div><font face="Courier New, Courier, mono">Private Sub Command1_Click()<br>&nbsp; Dim NewWidth As Single<br>&nbsp;&nbsp;<br>&nbsp; NewWidth = IIf(Picture1.Width &gt; 1000, 1000, 2000)<br>&nbsp; Picture1.Width = NewWidth<br>&nbsp; Debug.Print "Set to " &amp; NewWidth &amp; ", actual width is " &amp; Picture1.Width</font></div><div><font face="Courier New, Courier, mono">&nbsp; ' Trying RecalcLayout to see if it helps, but it doesn't.</font></div><div><font face="Courier New, Courier, mono">&nbsp; ' It does cause the RepositionAlignedControl event to fire though.<br>&nbsp; CommandBars.RecalcLayout<br>End Sub<br><br>Private Sub CommandBars_RepositionAlignedControls(Left As Long, Top As Long, Right As Long, Bottom As Long)<br>&nbsp; CommandBars.MoveAlignedControl Picture1, Left, Top, Right, Bottom<br>End Sub</font><br><br></div><div>If you remove the CommandBars from the form and comment out the lines that reference it, it works as expected: Clicking the button toggles the PictureBox width between two sizes. With CommandBars, clicking the button doesn't do anything, and the Debug message says "Set to 1000, actual width is 2004"</div><div><br></div><div>SuitePro 22.0.0 on Windows 11.</div>]]>
   </description>
   <pubDate>Thu, 25 Jun 2026 17:48:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24647&amp;PID=79417&amp;title=cant-resize-picturebox-in-mdi-frame-window#79417</guid>
  </item> 
  <item>
   <title><![CDATA[Toolkit Pro : Toolset update]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24643&amp;PID=79416&amp;title=toolset-update#79416</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=66">zaksoft</a><br /><strong>Subject:</strong> Toolset update<br /><strong>Posted:</strong> 23 June 2026 at 2:33pm<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by jw_statica" alt="Originally posted by jw_statica" style="vertical-align: text-bottom;" /> <strong>jw_statica wrote:</strong><br /><br />Can you tell us (approximately) when the new version will be released?</td></tr></table><div><br></div><div>I's very important also for us, we have to plan 2026 porting.</div><div><br></div><div>TIA</div><div><br></div><div>Davide</div>]]>
   </description>
   <pubDate>Tue, 23 Jun 2026 14:33:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24643&amp;PID=79416&amp;title=toolset-update#79416</guid>
  </item> 
  <item>
   <title><![CDATA[Toolkit Pro : Toolset update]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24643&amp;PID=79415&amp;title=toolset-update#79415</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9273">jw_statica</a><br /><strong>Subject:</strong> Toolset update<br /><strong>Posted:</strong> 23 June 2026 at 10:40am<br /><br />Can you tell us (approximately) when the new version will be released?]]>
   </description>
   <pubDate>Tue, 23 Jun 2026 10:40:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24643&amp;PID=79415&amp;title=toolset-update#79415</guid>
  </item> 
  <item>
   <title><![CDATA[Toolkit Pro : Memory bug in XTPMarkupStatic]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24646&amp;PID=79414&amp;title=memory-bug-in-xtpmarkupstatic#79414</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2876">DavidH</a><br /><strong>Subject:</strong> Memory bug in XTPMarkupStatic<br /><strong>Posted:</strong> 15 June 2026 at 4:08pm<br /><br /><div>In Source/Controls/Static/XTPMarkupStatic.cpp, a growing buffer is not reallocated correctly.</div><div><br></div><div><font face="Courier New, Courier, mono">template&lt;class T&gt;<br>AFX_INLINE BOOL XTPStrPushChr(T*&amp; pStr, T ch, SIZE_T&amp; nPos, SIZE_T&amp; nSize)<br>{<br>&nbsp; &nbsp; if (NULL == pStr)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; nSize = 0x100;<br>&nbsp; &nbsp; &nbsp; &nbsp; pStr&nbsp; = (T*)malloc(nSize * sizeof(T));<br>&nbsp; &nbsp; &nbsp; &nbsp; if (NULL == pStr)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return FALSE;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; *pStr = T('\0');<br>&nbsp; &nbsp; &nbsp; &nbsp; nPos&nbsp; = 0;<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; pStr&#091;nPos&#093; = ch;<br>&nbsp; &nbsp; if (++nPos == nSize)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; nSize *= 2;<br><b>&nbsp; &nbsp;// ---&gt;&gt;&gt;&gt;&nbsp; &nbsp; &nbsp;pStr = (T*)realloc(pStr, nSize);</b></font></div><div><b><font face="Courier New, Courier, mono">&nbsp; &nbsp;// Should be:</font></b></div><div><font face="Courier New, Courier, mono"><b>&nbsp; &nbsp; &nbsp; &nbsp; pStr = (T*)realloc(pStr, nSize * sizeof(T));</b><br>&nbsp; &nbsp; &nbsp; &nbsp; if (NULL == pStr)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return FALSE;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; pStr&#091;nPos&#093; = T('\0');<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; return TRUE;<br>}</font></div>]]>
   </description>
   <pubDate>Mon, 15 Jun 2026 16:08:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24646&amp;PID=79414&amp;title=memory-bug-in-xtpmarkupstatic#79414</guid>
  </item> 
  <item>
   <title><![CDATA[Skin Framework : Menu won&#039;t draw.]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24642&amp;PID=79413&amp;title=menu-wont-draw#79413</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> Menu won&#039;t draw.<br /><strong>Posted:</strong> 10 June 2026 at 3:26pm<br /><br />I'm guessing that if I had added this code in a ribbon sample where command bar hooks would disable xtpSkinApplyFrame duplication would have been much easier. But, then I wouldn't have found out about the apply to menu option/bit contribution to the issue. I might want to revisit CJ code changes I made to get the menu to work. Or ... take the easy way out and hope y'all see the issue and make the real fix!]]>
   </description>
   <pubDate>Wed, 10 Jun 2026 15:26:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24642&amp;PID=79413&amp;title=menu-wont-draw#79413</guid>
  </item> 
  <item>
   <title><![CDATA[Skin Framework : Menu won&#039;t draw.]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24642&amp;PID=79412&amp;title=menu-wont-draw#79412</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> Menu won&#039;t draw.<br /><strong>Posted:</strong> 10 June 2026 at 3:21pm<br /><br /><div>I didn't duplicate this in the SkinMDISample. At first. But I saw and unchecked the Apply menus check box on the Skins and Themes window and the sample has problems. They are a bit different from our app in as clicking the system menu shows the app menu but the issue where the app menu shows up but doesn't work. The different behaviors turned out to me due to us using command bars. Below is code I added to use the help about command to show the problem. Ignore commented code and ignore the filtering I added just to verify it works when skinning is disabled for the window. Sorry for the big code drop but I don't see an "attach file" here.</div><div><br></div><div>// App command to run the dialog<br>// NOTE: Set this to 0 to demonstrate the menu bar NOT appearing (the bug)<br>//&nbsp; &nbsp; &nbsp; &nbsp;Set this to 1 to show the workaround (filtering the window class)<br>#define USE_WINDOW_FILTER_WORKAROUND 0<br><br>static const TCHAR s_szAddInManagerDialogClass&#091;&#093; = TEXT("AddInManagerDialogClass");<br>static const TCHAR s_szMenuWindowClass&#091;&#093; = TEXT("MenuWindowClass");<br>static const TCHAR s_szAddInManagerMenuText&#091;&#093; = TEXT("Item 1");<br>static const UINT s_nAddInManagerMenuItem = 1001;<br>static const UINT s_nAddInManagerPopupCmd = 50001;<br>static HBITMAP s_hAddInManagerMenuBitmap = NULL;<br><br>//static LRESULT CALLBACK MenuWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)<br>//{<br>//&nbsp; &nbsp; switch (message)<br>//&nbsp; &nbsp; {<br>//&nbsp; &nbsp; case WM_COMMAND:<br>//&nbsp; &nbsp; &nbsp; &nbsp; if (LOWORD(wParam) == s_nAddInManagerMenuItem)<br>//&nbsp; &nbsp; &nbsp; &nbsp; {<br>//&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MessageBox(hWnd, TEXT("Menu item clicked!"), TEXT("Info"), MB_OK);<br>//&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return 0;<br>//&nbsp; &nbsp; &nbsp; &nbsp; }<br>//&nbsp; &nbsp; &nbsp; &nbsp; break;<br>//<br>//&nbsp; &nbsp; case WM_CLOSE:<br>//&nbsp; &nbsp; &nbsp; &nbsp; DestroyWindow(hWnd);<br>//&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br>//<br>//&nbsp; &nbsp; case WM_DESTROY:<br>//&nbsp; &nbsp; &nbsp; &nbsp; PostQuitMessage(0);<br>//&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br>//&nbsp; &nbsp; }<br>//<br>//&nbsp; &nbsp; return DefWindowProc(hWnd, message, wParam, lParam);<br>//}<br><br>static LRESULT CALLBACK AddInManagerWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)<br>{<br>&nbsp; &nbsp; switch (message)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; case WM_MEASUREITEM:<br>&nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MEASUREITEMSTRUCT* pMeasureItemStruct = reinterpret_cast&lt;MEASUREITEMSTRUCT*&gt;(lParam);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (pMeasureItemStruct &amp;&amp; pMeasureItemStruct-&gt;CtlType == ODT_MENU &amp;&amp; pMeasureItemStruct-&gt;itemID == s_nAddInManagerMenuItem)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HDC hDC = ::GetDC(hWnd);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (hDC)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SIZE size = { 0 };<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BITMAP bmpInfo = { 0 };<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HFONT hFont = reinterpret_cast&lt;HFONT&gt;(::SendMessage(hWnd, WM_GETFONT, 0, 0));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HFONT hOldFont = hFont ? reinterpret_cast&lt;HFONT&gt;(::SelectObject(hDC, hFont)) : NULL;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::GetTextExtentPoint32(hDC, s_szAddInManagerMenuText, lstrlen(s_szAddInManagerMenuText), &amp;size);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (s_hAddInManagerMenuBitmap)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::GetObject(s_hAddInManagerMenuBitmap, sizeof(BITMAP), &amp;bmpInfo);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (hOldFont)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::SelectObject(hDC, hOldFont);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::ReleaseDC(hWnd, hDC);<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pMeasureItemStruct-&gt;itemWidth = bmpInfo.bmWidth + size.cx + (::GetSystemMetrics(SM_CXMENUCHECK) * 2) + 8;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pMeasureItemStruct-&gt;itemHeight = max(size.cy, bmpInfo.bmHeight) + 6;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return TRUE;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; break;<br><br>&nbsp; &nbsp; case WM_DRAWITEM:<br>&nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DRAWITEMSTRUCT* pDrawItemStruct = reinterpret_cast&lt;DRAWITEMSTRUCT*&gt;(lParam);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (pDrawItemStruct &amp;&amp; pDrawItemStruct-&gt;CtlType == ODT_MENU &amp;&amp; pDrawItemStruct-&gt;itemID == s_nAddInManagerMenuItem)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RECT rcItem = pDrawItemStruct-&gt;rcItem;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLORREF crText = (pDrawItemStruct-&gt;itemState &amp; ODS_SELECTED) ? ::GetSysColor(COLOR_HIGHLIGHTTEXT) : RGB(255, 0, 0);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BITMAP bmpInfo = { 0 };<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::FillRect(pDrawItemStruct-&gt;hDC, &amp;rcItem, ::GetSysColorBrush((pDrawItemStruct-&gt;itemState &amp; ODS_SELECTED) ? COLOR_HIGHLIGHT : COLOR_MENU));<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int nOldBkMode = ::SetBkMode(pDrawItemStruct-&gt;hDC, TRANSPARENT);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLORREF crOldText = ::SetTextColor(pDrawItemStruct-&gt;hDC, crText);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HFONT hFont = reinterpret_cast&lt;HFONT&gt;(::SendMessage(hWnd, WM_GETFONT, 0, 0));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HFONT hOldFont = hFont ? reinterpret_cast&lt;HFONT&gt;(::SelectObject(pDrawItemStruct-&gt;hDC, hFont)) : NULL;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (s_hAddInManagerMenuBitmap)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::GetObject(s_hAddInManagerMenuBitmap, sizeof(BITMAP), &amp;bmpInfo);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HDC hdcBitmap = ::CreateCompatibleDC(pDrawItemStruct-&gt;hDC);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (hdcBitmap)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HBITMAP hOldBitmap = reinterpret_cast&lt;HBITMAP&gt;(::SelectObject(hdcBitmap, s_hAddInManagerMenuBitmap));<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int nBitmapTop = rcItem.top + ((rcItem.bottom - rcItem.top) - bmpInfo.bmHeight) / 2;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::BitBlt(pDrawItemStruct-&gt;hDC,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rcItem.left + 2,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nBitmapTop,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bmpInfo.bmWidth,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bmpInfo.bmHeight,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hdcBitmap,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SRCCOPY);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::SelectObject(hdcBitmap, hOldBitmap);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::DeleteDC(hdcBitmap);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rcItem.left += max(::GetSystemMetrics(SM_CXMENUCHECK), bmpInfo.bmWidth) + 6;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::DrawText(pDrawItemStruct-&gt;hDC, s_szAddInManagerMenuText, -1, &amp;rcItem, DT_SINGLELINE | DT_VCENTER | DT_LEFT);<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (pDrawItemStruct-&gt;itemState &amp; ODS_FOCUS)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::DrawFocusRect(pDrawItemStruct-&gt;hDC, &amp;pDrawItemStruct-&gt;rcItem);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (hOldFont)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::SelectObject(pDrawItemStruct-&gt;hDC, hOldFont);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::SetTextColor(pDrawItemStruct-&gt;hDC, crOldText);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::SetBkMode(pDrawItemStruct-&gt;hDC, nOldBkMode);<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return TRUE;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; break;<br><br>&nbsp; &nbsp; case WM_CLOSE:<br>&nbsp; &nbsp; &nbsp; &nbsp; DestroyWindow(hWnd);<br>&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; return DefDlgProc(hWnd, message, wParam, lParam);<br>}<br><br>static const std::map&lt;std::string, int&gt; kStringToInt<br>{<br>&nbsp; &nbsp; { "MenuWindowClass", 1 },<br>&nbsp; &nbsp; { "AddInManagerDialogClass", 1 },<br>};<br>static const std::map&lt;std::wstring, int&gt; kWStringToInt<br>{<br>&nbsp; &nbsp; { L"MenuWindowClass", 1 },<br>&nbsp; &nbsp; { L"AddInManagerDialogClass", 1 },<br>};<br><br>struct JIXTPSkinManagerWindowFilter : IXTPSkinManagerWindowFilter<br>{<br>&nbsp; &nbsp; ~JIXTPSkinManagerWindowFilter()<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; // IXTPSkinManagerWindowFilter<br>&nbsp; &nbsp; BOOL FilterWindowClass(LPCSTR lpszClassName)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; // Trying to include a a part copy of a Parasolid file resulted in a lockup due to CodeJock trying to skinning the DDEMLEvent window.<br>&nbsp; &nbsp; &nbsp; &nbsp; // We need to prevent skinning of this window class (which is not visible to the end user) as it is an internal windows class.<br><br>&nbsp; &nbsp; &nbsp; &nbsp; return lpszClassName &amp;&amp; (kStringToInt.find(lpszClassName) != kStringToInt.end());<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; BOOL FilterWindowClass(LPCWSTR lpszClassName)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; // Trying to include a a part copy of a Parasolid file resulted in a lockup due to CodeJock trying to skinning the DDEMLEvent window.<br>&nbsp; &nbsp; &nbsp; &nbsp; // We need to prevent skinning of this window class (which is not visible to the end user) as it is an internal windows class.<br>&nbsp; &nbsp; &nbsp; &nbsp; return lpszClassName &amp;&amp; (kWStringToInt.find(lpszClassName) != kWStringToInt.end());<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; BOOL FilterWindow(HWND hWnd,LPCTSTR lpszClassName,LPCREATESTRUCT lpcs)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; // Trying to include a a part copy of a Parasolid file resulted in a lockup due to CodeJock trying to skinning the DDEMLEvent window.<br>&nbsp; &nbsp; &nbsp; &nbsp; // We need to prevent skinning of this window class (which is not visible to the end user) as it is an internal windows class.<br>&nbsp; &nbsp; &nbsp; &nbsp; return lpszClassName &amp;&amp; (kWStringToInt.find(lpszClassName) != kWStringToInt.end());<br>&nbsp; &nbsp; }<br>};<br><br>static JIXTPSkinManagerWindowFilter s_JSkinManagerWindowFilter;<br><br>/////////////////////////////////////////////////////////////////////////////<br>// ISSUE DEMONSTRATION FOR CODEJOCK:<br>//&nbsp;<br>// This code creates a window with a menu bar using CreateWindowEx and DefDlgProc.<br>// This is the EXACT same code used in Solid Edge by a third-party add-in developer.<br>//&nbsp;<br>// ORIGINAL ISSUE IN SOLID EDGE (with skin applied):<br>//&nbsp; &nbsp;- Menu bar IS visible<br>//&nbsp; &nbsp;- BUT clicking menu items does NOT display submenus (dropdowns don't appear)<br>//&nbsp; &nbsp;- Without skin, everything works fine<br>//&nbsp;<br>// ISSUE IN THIS SAMPLE (with skin applied):<br>//&nbsp; &nbsp;- Menu bar does NOT even appear at all!<br>//&nbsp; &nbsp;- Cannot test the submenu dropdown issue because menu bar itself is missing<br>//&nbsp; &nbsp; &nbsp;- BUT, in the sample uncheck the apply menus button and then you see what Solid Edge<br>//&nbsp; &nbsp; &nbsp;saw before my CJ code changes - The window menu appears but clicking does nothing.<br>//&nbsp; &nbsp; &nbsp;Also, click the system menu and the app menu does appear instead of the system menu.<br>//&nbsp; &nbsp; &nbsp;I did not make that code change in Solid Edge to remove xtpSkinApplyMenus. So, that is another difference<br>//&nbsp; &nbsp; &nbsp;between Solid Edge with no CJ skin code changes I made to address the issue and this sample.<br>//&nbsp; &nbsp; &nbsp;<br>//&nbsp; &nbsp; &nbsp;However, we use command bars (ribbon) code and I see thecommand bars hook calls DisableSkinFrameOption.<br>//&nbsp; &nbsp; &nbsp;So, In Solid Edge SkinManager::m_dwApplyOptions is 0x1d while in this app it is 0x17 when I uncheck<br>//&nbsp; &nbsp; &nbsp;that apply menus box.<br>//&nbsp;<br>//&nbsp; &nbsp; &nbsp; &nbsp;Now that I know the options are different, I can exactly replicate the issue Solid Edge has by<br>//&nbsp; &nbsp; &nbsp;setting a breakpoint in the CXTPSkinManager constructor right after m_dwApplyOptions is initialized<br>//&nbsp; &nbsp; &nbsp;and then setting it to 0x1d. Do that and clicking the app menu does nothing and clicking the system<br>//&nbsp; &nbsp; &nbsp;menu shows that menu.<br>//&nbsp;<br>//&nbsp;<br>//&nbsp;<br>// WORKAROUND: Use SetWindowFilter to exclude the window class from skinning<br>//&nbsp; &nbsp;- With filter: Menu bar appears and is functional<br>//&nbsp; &nbsp;- Without filter: Menu bar doesn't appear in this sample<br>//&nbsp;<br>// TO DEMONSTRATE THE ISSUE:<br>//&nbsp; &nbsp;1. Set USE_WINDOW_FILTER_WORKAROUND to 0 (above)<br>//&nbsp; &nbsp;2. Rebuild and run - menu bar will NOT appear (can't even test submenu issue)<br>//&nbsp; &nbsp;3. Set USE_WINDOW_FILTER_WORKAROUND to 1 (above)<br>//&nbsp; &nbsp;4. Rebuild and run - menu bar appears, test if clicking "Menu" shows "Item 1" submenu<br>//<br>// QUESTIONS FOR CODEJOCK:<br>//&nbsp; &nbsp;1. Why does the menu bar appear in Solid Edge but not in this sample?<br>//&nbsp; &nbsp;2. Why don't menu submenus display when clicked (in Solid Edge with skin)?<br>//&nbsp; &nbsp;3. Is there a proper fix that doesn't require filtering out the window?<br>/////////////////////////////////////////////////////////////////////////////<br>void CSkinMDISampleApp::OnAppAbout()<br>{<br>#if USE_WINDOW_FILTER_WORKAROUND<br>&nbsp; &nbsp; // WORKAROUND: Filter the window class to prevent SkinFramework from interfering with menu<br>&nbsp; &nbsp; // NOTE: In Solid Edge, menu bar appears WITHOUT this filter, but submenus don't work<br>&nbsp; &nbsp; //&nbsp; &nbsp; &nbsp; &nbsp;In this sample, menu bar doesn't even appear WITHOUT this filter<br>&nbsp; &nbsp; CXTPSkinManager* pTheSkinnyOne = XTPSkinManager();<br><br>&nbsp; &nbsp; if( pTheSkinnyOne )<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; pTheSkinnyOne-&gt;SetWindowFilter(&amp;s_JSkinManagerWindowFilter);<br>&nbsp; &nbsp; }<br>#endif<br><br>&nbsp; HWND hDialog;<br>&nbsp; WNDCLASSEX wc = { 0 };<br>&nbsp; wc.cbSize = sizeof(WNDCLASSEX);<br>&nbsp; wc.lpfnWndProc = AddInManagerWndProc;<br>&nbsp; wc.hInstance = GetModuleHandle(NULL);<br>&nbsp; wc.lpszClassName = s_szAddInManagerDialogClass;<br>&nbsp; wc.cbWndExtra = DLGWINDOWEXTRA;<br>&nbsp; if (!RegisterClassEx(&amp;wc) &amp;&amp; GetLastError() != ERROR_CLASS_ALREADY_EXISTS)<br>&nbsp; {<br>&nbsp; &nbsp; &nbsp; return;<br>&nbsp; }<br><br>&nbsp; hDialog = CreateWindowEx(0, s_szAddInManagerDialogClass, TEXT("Dialog with menu"),<br>&nbsp; &nbsp; WS_OVERLAPPEDWINDOW | WS_VISIBLE,<br>&nbsp; &nbsp; 100, 100, 500, 300, NULL, NULL, GetModuleHandle(NULL), NULL);<br>&nbsp; if (!hDialog)<br>&nbsp; {<br>&nbsp; &nbsp; &nbsp; return;<br>&nbsp; }<br><br>&nbsp; HMENU hMenu = ::CreateMenu();<br>&nbsp; HMENU hSubMenu = ::CreatePopupMenu();<br>&nbsp; AppendMenu(hSubMenu, MF_POPUP /*MF_OWNERDRAW*/, s_nAddInManagerMenuItem, s_szAddInManagerMenuText);<br>&nbsp; AppendMenu(hMenu, MF_POPUP, (UINT_PTR)hSubMenu, TEXT("Menu"));<br><br>&nbsp; SetMenu(hDialog, hMenu);<br>&nbsp; DrawMenuBar(hDialog);<br>}<br><br>// App command to run the dialog<br>//void CSkinMDISampleApp::OnAppAbout()<br>//{<br>//&nbsp; &nbsp; CAboutDlg aboutDlg;<br>//&nbsp; &nbsp; aboutDlg.DoModal();<br>//}<br><br></div>]]>
   </description>
   <pubDate>Wed, 10 Jun 2026 15:21:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24642&amp;PID=79412&amp;title=menu-wont-draw#79412</guid>
  </item> 
  <item>
   <title><![CDATA[Skin Framework : Menu won&#039;t draw.]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24642&amp;PID=79411&amp;title=menu-wont-draw#79411</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> Menu won&#039;t draw.<br /><strong>Posted:</strong> 10 June 2026 at 8:30am<br /><br />Let me put one together as I just went into our app and hijacked a command where I put the code I posted here. And, owner draw doesn't matter. I added owner draw to see if the issue was with the background and text colors. But, no messages to draw ever arrive.]]>
   </description>
   <pubDate>Wed, 10 Jun 2026 08:30:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24642&amp;PID=79411&amp;title=menu-wont-draw#79411</guid>
  </item> 
 </channel>
</rss>