<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CMenu wieder verschwinden lassen]]></title><description><![CDATA[<p>hi</p>
<p>ich hab mein projekt nur übernommen, das heißt angefangen hat damit ein anderer. der hat auch das menu zum item in der systray gemacht. es funzu auch bis auf das, dass es nicht mehr verschwindet, wenn ich mit der maus woandershin klicke. es geht nur dann wieder weg, wenn ich einen menüeintrag anklicke.</p>
<p>das menu poppt auf mit</p>
<pre><code>m_mnuTrayMenu.GetSubMenu(0)-&gt;TrackPopupMenu(TPM_BOTTOMALIGN|TPM_LEFTBUTTON|TPM_RIGHTBUTTON,pt.x,pt.y,this);
	m_mnuTrayMenu.GetSubMenu(0)-&gt;SetDefaultItem(m_nDefaultMenuItem,TRUE);
</code></pre>
<p>Jetzt die frage: wie mach ich es, dass es auch wieder verschwindet, wenn ich irgendwo anders hin klicke?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/81983/cmenu-wieder-verschwinden-lassen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 02:42:45 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/81983.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 06 Aug 2004 09:51:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CMenu wieder verschwinden lassen on Fri, 06 Aug 2004 09:51:17 GMT]]></title><description><![CDATA[<p>hi</p>
<p>ich hab mein projekt nur übernommen, das heißt angefangen hat damit ein anderer. der hat auch das menu zum item in der systray gemacht. es funzu auch bis auf das, dass es nicht mehr verschwindet, wenn ich mit der maus woandershin klicke. es geht nur dann wieder weg, wenn ich einen menüeintrag anklicke.</p>
<p>das menu poppt auf mit</p>
<pre><code>m_mnuTrayMenu.GetSubMenu(0)-&gt;TrackPopupMenu(TPM_BOTTOMALIGN|TPM_LEFTBUTTON|TPM_RIGHTBUTTON,pt.x,pt.y,this);
	m_mnuTrayMenu.GetSubMenu(0)-&gt;SetDefaultItem(m_nDefaultMenuItem,TRUE);
</code></pre>
<p>Jetzt die frage: wie mach ich es, dass es auch wieder verschwindet, wenn ich irgendwo anders hin klicke?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/576577</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/576577</guid><dc:creator><![CDATA[- enForcer -]]></dc:creator><pubDate>Fri, 06 Aug 2004 09:51:17 GMT</pubDate></item><item><title><![CDATA[Reply to CMenu wieder verschwinden lassen on Fri, 06 Aug 2004 09:56:26 GMT]]></title><description><![CDATA[<p>Aus der MSDN:</p>
<blockquote>
<p>To display a context menu for a notification icon, the current window must be the foreground window before the application calls TrackPopupMenu or TrackPopupMenuEx. Otherwise, the menu will not disappear when the user clicks outside of the menu or the window that created the menu (if it is visible). However, when the current window is the foreground window, the second time this menu is displayed, it displays and then immediately disappears. To correct this, you must force a task switch to the application that called TrackPopupMenu at some time in the near future. This is done by posting a benign message to the window or thread, as shown in the following code sample:</p>
<pre><code class="language-cpp">SetForegroundWindow(hDlg);
// Display the menu
TrackPopupMenu(hSubMenu,TPM_RIGHTBUTTON,pt.x,pt.y,0,hDlg,NULL);
PostMessage(hDlg, WM_NULL, 0, 0);
</code></pre>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/576583</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/576583</guid><dc:creator><![CDATA[Shlo]]></dc:creator><pubDate>Fri, 06 Aug 2004 09:56:26 GMT</pubDate></item><item><title><![CDATA[Reply to CMenu wieder verschwinden lassen on Fri, 06 Aug 2004 10:10:32 GMT]]></title><description><![CDATA[<p>super</p>
<p>dankeschön</p>
<p>greetz</p>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f576.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--sunglasses"
      title=":sunglasses:"
      alt="🕶"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/576595</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/576595</guid><dc:creator><![CDATA[- enForcer -]]></dc:creator><pubDate>Fri, 06 Aug 2004 10:10:32 GMT</pubDate></item></channel></rss>