<?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[Nachricht senden.]]></title><description><![CDATA[<p>hallo!</p>
<p>ich habe in meinem programm einen button:</p>
<pre><code class="language-cpp">#define bt1 1;
//...
HWND hwndbt;
hwndbt = CreateWindow(&quot;button&quot;, &quot;Senden&quot;, WS_CHILD | WS_VISIBLE | ES_LEFT,
											480,// X-Koordinate
											310,// Y-Koordinate
											100,// Breite
											30,	// Höhe
											hwnd, (HMENU) bt1, ((LPCREATESTRUCT) lParam)-&gt;hInstance, NULL);
</code></pre>
<p>und eine überprüfung in der nachrichten schleife, ob dieser button gedrückt wurde:</p>
<pre><code class="language-cpp">case WM_COMMAND:
	switch(HIWORD(wParam))
	{
	case BN_CLICKED:
		switch (LOWORD(wParam))						
		{
		case bt1:
			//...
                break;
                }
        }
</code></pre>
<p>so jetzt möchte ich selber eine nachricht an das fenster schicken das der button gedrückt wurde.</p>
<pre><code class="language-cpp">SendMessage(ghwnd, WM_COMMAND, BN_CLICKED, 0);
</code></pre>
<p>so geht es nicht weil ja irgendwie noch die button-id in der nachricht fehlt.</p>
<p>also ich hoffe mir kann wer zeigen wie das geht!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/138352/nachricht-senden</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 23:48:19 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/138352.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 25 Feb 2006 16:29:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Nachricht senden. on Sat, 25 Feb 2006 17:36:29 GMT]]></title><description><![CDATA[<p>hallo!</p>
<p>ich habe in meinem programm einen button:</p>
<pre><code class="language-cpp">#define bt1 1;
//...
HWND hwndbt;
hwndbt = CreateWindow(&quot;button&quot;, &quot;Senden&quot;, WS_CHILD | WS_VISIBLE | ES_LEFT,
											480,// X-Koordinate
											310,// Y-Koordinate
											100,// Breite
											30,	// Höhe
											hwnd, (HMENU) bt1, ((LPCREATESTRUCT) lParam)-&gt;hInstance, NULL);
</code></pre>
<p>und eine überprüfung in der nachrichten schleife, ob dieser button gedrückt wurde:</p>
<pre><code class="language-cpp">case WM_COMMAND:
	switch(HIWORD(wParam))
	{
	case BN_CLICKED:
		switch (LOWORD(wParam))						
		{
		case bt1:
			//...
                break;
                }
        }
</code></pre>
<p>so jetzt möchte ich selber eine nachricht an das fenster schicken das der button gedrückt wurde.</p>
<pre><code class="language-cpp">SendMessage(ghwnd, WM_COMMAND, BN_CLICKED, 0);
</code></pre>
<p>so geht es nicht weil ja irgendwie noch die button-id in der nachricht fehlt.</p>
<p>also ich hoffe mir kann wer zeigen wie das geht!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1002704</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1002704</guid><dc:creator><![CDATA[N1dda]]></dc:creator><pubDate>Sat, 25 Feb 2006 17:36:29 GMT</pubDate></item><item><title><![CDATA[Reply to Nachricht senden. on Sat, 25 Feb 2006 17:50:57 GMT]]></title><description><![CDATA[<pre><code>hwndbt
</code></pre>
<p>Das ist doch die Button ID oder :P?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1002800</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1002800</guid><dc:creator><![CDATA[MartinMilbret]]></dc:creator><pubDate>Sat, 25 Feb 2006 17:50:57 GMT</pubDate></item><item><title><![CDATA[Reply to Nachricht senden. on Sat, 25 Feb 2006 18:32:02 GMT]]></title><description><![CDATA[<p>eigendlich dachte ich das hwndbt das handle auf den button ist und die id ist bt1.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1002886</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1002886</guid><dc:creator><![CDATA[N1dda]]></dc:creator><pubDate>Sat, 25 Feb 2006 18:32:02 GMT</pubDate></item><item><title><![CDATA[Reply to Nachricht senden. on Sat, 25 Feb 2006 23:29:16 GMT]]></title><description><![CDATA[<p>N1dda schrieb:</p>
<blockquote>
<p>so jetzt möchte ich selber eine nachricht an das fenster schicken das der button gedrückt wurde.</p>
<pre><code class="language-cpp">SendMessage(ghwnd, WM_COMMAND, BN_CLICKED, 0);
</code></pre>
</blockquote>
<p>die button-id gehört in den lParam. also</p>
<pre><code class="language-cpp">SendMessage(ghwnd, WM_COMMAND, (WPARAM)BN_CLICKED, (LPARAM)bt1);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1003055</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1003055</guid><dc:creator><![CDATA[Konfusius]]></dc:creator><pubDate>Sat, 25 Feb 2006 23:29:16 GMT</pubDate></item><item><title><![CDATA[Reply to Nachricht senden. on Sun, 26 Feb 2006 10:46:33 GMT]]></title><description><![CDATA[<p>danke,<br />
das funktioniert.</p>
<p>allerdings nur wenn ich</p>
<pre><code class="language-cpp">case BN_CLICKED:
        switch (LOWORD(wParam))
</code></pre>
<p>in</p>
<pre><code class="language-cpp">case BN_CLICKED:
        switch (lParam))
</code></pre>
<p>ändere.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1003178</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1003178</guid><dc:creator><![CDATA[N1dda]]></dc:creator><pubDate>Sun, 26 Feb 2006 10:46:33 GMT</pubDate></item><item><title><![CDATA[Reply to Nachricht senden. on Sun, 26 Feb 2006 11:12:15 GMT]]></title><description><![CDATA[<p>dann überleg mal warum... weil die die ID, die du dann in der Case hast ja an den LPARAM übergeben hast... nicht an den WPARAM -.-</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1003189</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1003189</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Sun, 26 Feb 2006 11:12:15 GMT</pubDate></item><item><title><![CDATA[Reply to Nachricht senden. on Sun, 26 Feb 2006 12:14:40 GMT]]></title><description><![CDATA[<p>das ist mir schon klar.</p>
<p>aber ich überprüfe ja ob<br />
HIWORD(wParam) == BN_CLICKED und<br />
LOWORD(wParam) == BT1</p>
<p>und ich weiß nich wie ich LOWORD und HIWORD wParam in eine SendMessage bekomme.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1003215</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1003215</guid><dc:creator><![CDATA[N1dda]]></dc:creator><pubDate>Sun, 26 Feb 2006 12:14:40 GMT</pubDate></item><item><title><![CDATA[Reply to Nachricht senden. on Sun, 26 Feb 2006 13:06:31 GMT]]></title><description><![CDATA[<p>MAKEWPARAM:<br />
<a href="http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowmacros/makewparam.asp" rel="nofollow">http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowmacros/makewparam.asp</a></p>
<p>MAKELPARAM:<br />
<a href="http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowmacros/makelparam.asp" rel="nofollow">http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowmacros/makelparam.asp</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1003237</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1003237</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Sun, 26 Feb 2006 13:06:31 GMT</pubDate></item><item><title><![CDATA[Reply to Nachricht senden. on Sun, 26 Feb 2006 13:21:00 GMT]]></title><description><![CDATA[<p>alles klar danke,<br />
habs jetzt so gemacht:</p>
<pre><code class="language-cpp">SendMessage(ghwnd, WM_COMMAND, MAKEWPARAM(bt1,BN_CLICKED), 0);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1003248</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1003248</guid><dc:creator><![CDATA[N1dda]]></dc:creator><pubDate>Sun, 26 Feb 2006 13:21:00 GMT</pubDate></item><item><title><![CDATA[Reply to Nachricht senden. on Sun, 26 Feb 2006 18:19:51 GMT]]></title><description><![CDATA[<p>mist! hab mich in in der psdk verlesen. stimmt schon, was die anderen geschrieben haben. du solltest nur noch als lparam das button-fenster-handle ubergeben:</p>
<pre><code class="language-cpp">SendMessage(ghwnd, WM_COMMAND, MAKEWPARAM(bt1,BN_CLICKED), (LPARAM)hwndbt);
</code></pre>
<p>die ganzen notification-codes kannst du auch in der psdk oder im msdn nachlesen. einfach nach BN_CLICKED suchen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1003567</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1003567</guid><dc:creator><![CDATA[Konfusius]]></dc:creator><pubDate>Sun, 26 Feb 2006 18:19:51 GMT</pubDate></item><item><title><![CDATA[Reply to Nachricht senden. on Sun, 26 Feb 2006 18:50:19 GMT]]></title><description><![CDATA[<p>jo danke an alle!</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/9573">@Konfusius</a>: warum soll ich den lParam auch mitschicken?<br />
stört zwar wahrscheinlich nich, aber ich hab ja auch kein case was auf lParam prüft.</p>
<p>und ich hab noch ne andere frage und schreib es einfach mal hier rein:<br />
wie kann ich überprüfen ob meine anwendung also das fenster den fokus hat und nich minimiert oder von anderen fenstern überdeckt ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1003597</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1003597</guid><dc:creator><![CDATA[N1dda]]></dc:creator><pubDate>Sun, 26 Feb 2006 18:50:19 GMT</pubDate></item></channel></rss>