<?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[Tray Icon ohne Fenster]]></title><description><![CDATA[<p>Hallo Leute!<br />
Wisst Ihr, wie ich ein Tray-Icon in der Taskleiste erstellen kann, ohne<br />
vorher ein Fenster mit einer Nachrichtenschleife zu erstellen?</p>
<p>Mein Code sieht bis jetzt so aus:</p>
<pre><code class="language-cpp">//Ich übergebe einfach NULL als HWND
void Taskleistenicon (HWND hwnd, BOOL bAnzeigen)
{
	NOTIFYICONDATA tsym;
	ZeroMemory (&amp;tsym, sizeof (NOTIFYICONDATA));

	if (bAnzeigen)
	{
		tsym.cbSize = sizeof (NOTIFYICONDATA);
		tsym.hWnd   = hwnd;
		tsym.uID    = IDI_ICON;
		tsym.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE;
		tsym.hIcon  = hIcon;
		strcpy (tsym.szTip, &quot;www.winapi.net&quot;);
		Shell_NotifyIcon (NIM_ADD, &amp;tsym);
	}

	else
	{
		tsym.cbSize = sizeof (NOTIFYICONDATA);
		tsym.hWnd   = hwnd;
		tsym.uID    = IDI_ICON;
		tsym.uFlags = 0;
		Shell_NotifyIcon (NIM_DELETE, &amp;tsym);
    }
        return;
}
</code></pre>
<p>Das Icon wird bis zum Mouseover in der Taskleiste korrekt angezeigt - danach<br />
verschwindet es spurlos <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
<p>Thx</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/79325/tray-icon-ohne-fenster</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 20:09:26 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/79325.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 09 Jul 2004 21:23:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Tray Icon ohne Fenster on Fri, 09 Jul 2004 21:23:51 GMT]]></title><description><![CDATA[<p>Hallo Leute!<br />
Wisst Ihr, wie ich ein Tray-Icon in der Taskleiste erstellen kann, ohne<br />
vorher ein Fenster mit einer Nachrichtenschleife zu erstellen?</p>
<p>Mein Code sieht bis jetzt so aus:</p>
<pre><code class="language-cpp">//Ich übergebe einfach NULL als HWND
void Taskleistenicon (HWND hwnd, BOOL bAnzeigen)
{
	NOTIFYICONDATA tsym;
	ZeroMemory (&amp;tsym, sizeof (NOTIFYICONDATA));

	if (bAnzeigen)
	{
		tsym.cbSize = sizeof (NOTIFYICONDATA);
		tsym.hWnd   = hwnd;
		tsym.uID    = IDI_ICON;
		tsym.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE;
		tsym.hIcon  = hIcon;
		strcpy (tsym.szTip, &quot;www.winapi.net&quot;);
		Shell_NotifyIcon (NIM_ADD, &amp;tsym);
	}

	else
	{
		tsym.cbSize = sizeof (NOTIFYICONDATA);
		tsym.hWnd   = hwnd;
		tsym.uID    = IDI_ICON;
		tsym.uFlags = 0;
		Shell_NotifyIcon (NIM_DELETE, &amp;tsym);
    }
        return;
}
</code></pre>
<p>Das Icon wird bis zum Mouseover in der Taskleiste korrekt angezeigt - danach<br />
verschwindet es spurlos <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
<p>Thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/557184</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/557184</guid><dc:creator><![CDATA[rhtrhrthrth]]></dc:creator><pubDate>Fri, 09 Jul 2004 21:23:51 GMT</pubDate></item><item><title><![CDATA[Reply to Tray Icon ohne Fenster on Sat, 10 Jul 2004 08:01:55 GMT]]></title><description><![CDATA[<p>Du könntest ein verstecktes Fenster erstellen <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/557263</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/557263</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Sat, 10 Jul 2004 08:01:55 GMT</pubDate></item><item><title><![CDATA[Reply to Tray Icon ohne Fenster on Sun, 11 Jul 2004 11:13:17 GMT]]></title><description><![CDATA[<p>Wie mache ich das denn am besten?<br />
Einfach die Funktionen ShowWindow(...) und UpdateWindow(...) weglassen?</p>
<p>Vielen Dank!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/557969</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/557969</guid><dc:creator><![CDATA[rhtrhrthrth]]></dc:creator><pubDate>Sun, 11 Jul 2004 11:13:17 GMT</pubDate></item><item><title><![CDATA[Reply to Tray Icon ohne Fenster on Sun, 11 Jul 2004 11:50:39 GMT]]></title><description><![CDATA[<p>Du musst den WS_VISIBLE Style weglassen (evtl. musst du ihn explizit rausnehmen &quot;&amp; ~WS_VISIBLE&quot;) oder das Fenster eben mit ShowWindow und SW_HIDE verstecken <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/558002</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/558002</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Sun, 11 Jul 2004 11:50:39 GMT</pubDate></item></channel></rss>