<?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]]></title><description><![CDATA[<p>Hi Leute,<br />
weiß vielleicht zufällig jemand, wie ich statt mein Programm zu minimieren, es als Tray Icon anzeigen kann???</p>
<p>Wäre echt net, wenn mir jemand helfen könnte</p>
<p>Alexander</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/68415/tray-icon</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 19:48:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/68415.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 17 Mar 2004 16:46:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Tray Icon on Wed, 17 Mar 2004 16:46:22 GMT]]></title><description><![CDATA[<p>Hi Leute,<br />
weiß vielleicht zufällig jemand, wie ich statt mein Programm zu minimieren, es als Tray Icon anzeigen kann???</p>
<p>Wäre echt net, wenn mir jemand helfen könnte</p>
<p>Alexander</p>
]]></description><link>https://www.c-plusplus.net/forum/post/482828</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/482828</guid><dc:creator><![CDATA[Master of Buuh]]></dc:creator><pubDate>Wed, 17 Mar 2004 16:46:22 GMT</pubDate></item><item><title><![CDATA[Reply to Tray Icon on Wed, 17 Mar 2004 20:19:29 GMT]]></title><description><![CDATA[<p>Also fang einfach DefWindowProc ab und änders bissl ab. WM_USER ist für eigene Messages zu definieren und gibt den abstand zur letzten message an, wenn ichs richtig verstanden hab.( Falls es dich interessiert)</p>
<pre><code class="language-cpp">#define WM_ICONNOTIFY (WM_USER+1)

LRESULT CMainFrame::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) 
{
	if( message == WM_SYSCOMMAND )
	{
		if( wParam == SC_MINIMIZE )
		{
			NOTIFYICONDATA	tnid;

			tnid.cbSize				= sizeof( NOTIFYICONDATA );
			tnid.hWnd				= AfxGetMainWnd()-&gt;GetSafeHwnd();
			tnid.uID				= 0;
			tnid.uFlags				= NIF_MESSAGE | NIF_ICON | NIF_TIP;
			tnid.uCallbackMessage	= WM_ICONNOTIFY;
			tnid.hIcon				= AfxGetApp()-&gt;LoadIcon(IDR_MAINFRAME);
			lstrcpyn( tnid.szTip, AfxGetAppName(), sizeof(tnid.szTip) );

			Shell_NotifyIcon( NIM_ADD, &amp;tnid );

			AfxGetApp()-&gt;HideApplication();

			return 0;
		}
	}
	else if( message == WM_ICONNOTIFY &amp;&amp; lParam != WM_MOUSEMOVE )
	{
		NOTIFYICONDATA	tnid;

		tnid.cbSize				= sizeof( NOTIFYICONDATA );
		tnid.hWnd				= AfxGetMainWnd()-&gt;GetSafeHwnd();
		tnid.uID				= 0;

		Shell_NotifyIcon( NIM_DELETE, &amp;tnid );

		AfxGetMainWnd()-&gt;ShowWindow( SW_SHOW );
		AfxGetMainWnd()-&gt;UpdateWindow();
		AfxGetMainWnd()-&gt;SetActiveWindow();

		return 0;
	}

	return CFrameWnd::DefWindowProc(message, wParam, lParam);
}
</code></pre>
<p>Edit: hatte &quot;es dich&quot; zusammen geschrieben <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /><br />
MFG</p>
<p>Hansi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/482989</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/482989</guid><dc:creator><![CDATA[Hansi]]></dc:creator><pubDate>Wed, 17 Mar 2004 20:19:29 GMT</pubDate></item><item><title><![CDATA[Reply to Tray Icon on Wed, 17 Mar 2004 21:39:32 GMT]]></title><description><![CDATA[<p>Ich hab dafür mal ne Dialogklasse geschrieben, falls deine<br />
Anwendung Dialogbasiert ist, einfach als Basisklasse verwenden,<br />
ansonsten musst du es noch einwenig umstricken.</p>
<p><a href="http://devil81.de/shared/php/download.php?file=TrayDlg.zip&amp;pid=1&amp;dwldid=2" rel="nofollow">CTrayDlg</a></p>
<p>Devil</p>
]]></description><link>https://www.c-plusplus.net/forum/post/483085</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/483085</guid><dc:creator><![CDATA[phlox81]]></dc:creator><pubDate>Wed, 17 Mar 2004 21:39:32 GMT</pubDate></item></channel></rss>