<?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 : Problem with TrackPopupMenu/TPM_LEFTALIGN</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Skin Framework : Problem with TrackPopupMenu/TPM_LEFTALIGN]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 12 May 2026 17:05:21 +0000</pubDate>
  <lastBuildDate>Mon, 21 Dec 2020 17:51:37 +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=24117</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[Problem with TrackPopupMenu/TPM_LEFTALIGN : I recently upgraded a legacy vb6...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24117&amp;PID=78007&amp;title=problem-with-trackpopupmenu-tpm-leftalign#78007</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8764">rdefulio</a><br /><strong>Subject:</strong> 24117<br /><strong>Posted:</strong> 21 December 2020 at 5:51pm<br /><br />I recently upgraded a legacy vb6 project from SkinFramework ActiveX Control 16.3.1 to 19.3.0 and Popup menu alignments started failing.&nbsp; I am using the Windows TrackPopupMenu API to build a pop up menu and display it in the appropriate location in the application.<div><br></div><div>See the following simplified example.</div><div><br></div><div><div><font face="Courier New, Courier, mono">Flags = TPM_RIGHTBUTTON + TPM_NONOTIFY + TPM_RETURNCMD</font></div><div><font face="Courier New, Courier, mono">&nbsp; &nbsp;&nbsp;</font></div><div><font face="Courier New, Courier, mono">iMenu = TrackPopupMenu(hMenu, Flags + TPM_LEFTALIGN, p.x, p.y, 0, GetForegroundWindow(), 0)</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">iMenu = TrackPopupMenu(hMenu, Flags + TPM_CENTERALIGN, p.x, p.y, 0, GetForegroundWindow(), 0)</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">iMenu = TrackPopupMenu(hMenu, Flags + TPM_RIGHTALIGN, p.x, p.y, 0, GetForegroundWindow(), 0)</font></div></div><div><font face="Courier New, Courier, mono"><br></font></div><div>In this example, LEFTALIGN ignores the value in p.x and treats it as zero, basically putting it at the left-most position on the display.&nbsp; The Center and Right align work properly.</div><div><br></div><div>I reproduced this in the SkinControls sample application.&nbsp; Rolling back to 16.3.1 fixes the issue.&nbsp; I reproduced the issue in version 17.3, 18.4, and 19.3.&nbsp; I need to upgrade because of an apparrent bug in 16.3 that affects scroll bars on server 2016 that the newer versions fix.</div><div><br></div><div>Here's what happens with TPM_LEFTALIGN&nbsp; (Incorrect behavior)</div><div><br></div><div></div><div></div><div><img src="uploads/8764/codejock1.png" height="606" width="789" border="0" /><br></div><div><br></div><div>And here's what happens with TPM_CENTERALIGN (This is the correct behavior)</div><div><br></div><div><img src="uploads/8764/codejock2.png" height="609" width="519" border="0" /><br></div><div></div><div><br></div><div>Note that changing the application from LEFT to CENTER is not a desirable workaround because it changes where the popup appears relative to the mouse cursor (left, center or right aligned based on the mouse cursor's location).</div><div><br></div><div>Can I get a fix expedited for this?</div><div><br></div><div>Thanks</div><div><br></div><div>Ron</div><div><br></div><div>&#091;Edited to fix images&#093;</div><div><br></div>]]>
   </description>
   <pubDate>Mon, 21 Dec 2020 17:51:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24117&amp;PID=78007&amp;title=problem-with-trackpopupmenu-tpm-leftalign#78007</guid>
  </item> 
 </channel>
</rss>