<?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[Popup im System-Tray blendet nicht mehr aus]]></title><description><![CDATA[<p>Hallo Zusammen,<br />
ich habe zu einer Anwendung ein Icon im System-Tray mit einem Popup-Menu hinzugefügt.<br />
Jetzt habe ich das Problem, dass sich das Popup-Menu nach dem Klicken auf das Icon nicht mehr von selbst ausblendet.<br />
Woran kann das liegen.</p>
<pre><code class="language-cpp">HMENU hMenu = CreatePopupMenu();

InsertMenu( hMenu, 
     ...

GetCursorPos(&amp;pt); 
TrackPopupMenu(hMenu, NULL, pt.x, pt.y, 0, hwnd, NULL); 

PostMessage(hwnd, WM_NULL, 0, 0);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/184463/popup-im-system-tray-blendet-nicht-mehr-aus</link><generator>RSS for Node</generator><lastBuildDate>Mon, 06 Jul 2026 20:20:57 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/184463.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 15 Jun 2007 13:27:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Popup im System-Tray blendet nicht mehr aus on Fri, 15 Jun 2007 13:27:54 GMT]]></title><description><![CDATA[<p>Hallo Zusammen,<br />
ich habe zu einer Anwendung ein Icon im System-Tray mit einem Popup-Menu hinzugefügt.<br />
Jetzt habe ich das Problem, dass sich das Popup-Menu nach dem Klicken auf das Icon nicht mehr von selbst ausblendet.<br />
Woran kann das liegen.</p>
<pre><code class="language-cpp">HMENU hMenu = CreatePopupMenu();

InsertMenu( hMenu, 
     ...

GetCursorPos(&amp;pt); 
TrackPopupMenu(hMenu, NULL, pt.x, pt.y, 0, hwnd, NULL); 

PostMessage(hwnd, WM_NULL, 0, 0);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1306592</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1306592</guid><dc:creator><![CDATA[mr. tompkins]]></dc:creator><pubDate>Fri, 15 Jun 2007 13:27:54 GMT</pubDate></item><item><title><![CDATA[Reply to Popup im System-Tray blendet nicht mehr aus on Fri, 15 Jun 2007 14:25:55 GMT]]></title><description><![CDATA[<p>msdn schrieb:</p>
<blockquote>
<p>To display a context menu for a notification icon, the current window must be the <strong>foreground window</strong> before the application calls TrackPopupMenu or TrackPopupMenuEx. <strong>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)</strong>. 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. This is done by posting a benign message to the window or thread, as shown in the following code sample[..]</p>
</blockquote>
<p><a href="http://msdn2.microsoft.com/en-us/library/ms648002.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/ms648002.aspx</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1306629</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1306629</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Fri, 15 Jun 2007 14:25:55 GMT</pubDate></item><item><title><![CDATA[Reply to Popup im System-Tray blendet nicht mehr aus on Fri, 15 Jun 2007 21:53:00 GMT]]></title><description><![CDATA[<p>Vorher SetForegroundwindow mit dem Fensterhandle aufrufen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1306955</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1306955</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Fri, 15 Jun 2007 21:53:00 GMT</pubDate></item></channel></rss>