<?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[GetWindowThreadProcessId]]></title><description><![CDATA[<p>Hallo.<br />
Ich habe da noch eine Frage:</p>
<p>Im Windows-Fenster habe ich eine Textbox erstellt und mit einer ID versehen</p>
<pre><code class="language-cpp">hRSK1Base = CreateWindow(&quot;STATIC&quot;,
							 &quot;&quot;,
							 WS_VISIBLE | WS_CHILD | SS_RIGHT,
							 295, 100,
							 500, 30,
							 hParent,
							 (HMENU)ID_STATICTEXT,
							 hInst,
							 NULL);
	SendMessage(hRSK1Base, WM_SETFONT,(WPARAM)SubFont,0);
</code></pre>
<p>Wenn ich jetzt das hier aufrufe:</p>
<pre><code class="language-cpp">DWORD dwTest;
					GetWindowThreadProcessId (hLSK1Base, &amp;dwTest);
					if (dwTest == ID_STATICTEXT)
					{
						MessageBox(NULL, &quot;Static&quot;, &quot;id:&quot;, 0);
					}
</code></pre>
<p>bekomme ich die MessageBox nicht angezeigt.<br />
Beim überprüfen im Debug-mode habe ich festgestellt, dass das dwTest jedes mal einen anderen Wert enthält.<br />
Wieso liefert mir die Funktion nicht den gewünschten Wert zurück?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/228729/getwindowthreadprocessid</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Apr 2026 23:26:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/228729.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 02 Dec 2008 10:19:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GetWindowThreadProcessId on Tue, 02 Dec 2008 10:19:34 GMT]]></title><description><![CDATA[<p>Hallo.<br />
Ich habe da noch eine Frage:</p>
<p>Im Windows-Fenster habe ich eine Textbox erstellt und mit einer ID versehen</p>
<pre><code class="language-cpp">hRSK1Base = CreateWindow(&quot;STATIC&quot;,
							 &quot;&quot;,
							 WS_VISIBLE | WS_CHILD | SS_RIGHT,
							 295, 100,
							 500, 30,
							 hParent,
							 (HMENU)ID_STATICTEXT,
							 hInst,
							 NULL);
	SendMessage(hRSK1Base, WM_SETFONT,(WPARAM)SubFont,0);
</code></pre>
<p>Wenn ich jetzt das hier aufrufe:</p>
<pre><code class="language-cpp">DWORD dwTest;
					GetWindowThreadProcessId (hLSK1Base, &amp;dwTest);
					if (dwTest == ID_STATICTEXT)
					{
						MessageBox(NULL, &quot;Static&quot;, &quot;id:&quot;, 0);
					}
</code></pre>
<p>bekomme ich die MessageBox nicht angezeigt.<br />
Beim überprüfen im Debug-mode habe ich festgestellt, dass das dwTest jedes mal einen anderen Wert enthält.<br />
Wieso liefert mir die Funktion nicht den gewünschten Wert zurück?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1624191</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1624191</guid><dc:creator><![CDATA[campinge]]></dc:creator><pubDate>Tue, 02 Dec 2008 10:19:34 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowThreadProcessId on Tue, 02 Dec 2008 10:47:33 GMT]]></title><description><![CDATA[<p>Tut sie.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1624206</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1624206</guid><dc:creator><![CDATA[bernibutt]]></dc:creator><pubDate>Tue, 02 Dec 2008 10:47:33 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowThreadProcessId on Tue, 02 Dec 2008 11:49:51 GMT]]></title><description><![CDATA[<p>na, dann würde es ja funkionieren, tut's aber nicht.<br />
ID_STATICTEXT ist 3000, dwTest ist 3387. Und beim nächsten Durchlauf wieder etwas anderes. Wäre schön, wenn du deine Antwort etwas erleutern könntest.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1624247</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1624247</guid><dc:creator><![CDATA[campinge]]></dc:creator><pubDate>Tue, 02 Dec 2008 11:49:51 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowThreadProcessId on Tue, 02 Dec 2008 12:24:20 GMT]]></title><description><![CDATA[<p>ID_STATICTEXT ist keine ProcessId.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1624264</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1624264</guid><dc:creator><![CDATA[bernibutt]]></dc:creator><pubDate>Tue, 02 Dec 2008 12:24:20 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowThreadProcessId on Tue, 02 Dec 2008 13:06:54 GMT]]></title><description><![CDATA[<p>Aha, Danke schonmal.<br />
Soetwas hab ich mir schon gedacht...<br />
Gibts denn ne Möglichkeit die ID_STATICTEXT zu bekommen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1624294</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1624294</guid><dc:creator><![CDATA[campinge]]></dc:creator><pubDate>Tue, 02 Dec 2008 13:06:54 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowThreadProcessId on Tue, 02 Dec 2008 13:54:40 GMT]]></title><description><![CDATA[<p>GetDlgCtrlId<br />
<a href="http://msdn.microsoft.com/en-us/library/ms645478(VS.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms645478(VS.85).aspx</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1624346</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1624346</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 02 Dec 2008 13:54:40 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowThreadProcessId on Tue, 02 Dec 2008 14:00:59 GMT]]></title><description><![CDATA[<p>Super, vielen Dank!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1624351</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1624351</guid><dc:creator><![CDATA[campinge]]></dc:creator><pubDate>Tue, 02 Dec 2008 14:00:59 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowThreadProcessId on Wed, 17 Dec 2008 06:32:52 GMT]]></title><description><![CDATA[<p>Ok, hat soweit alles geklappt. Allerdings werde ich aus der Umkehrfunktion<br />
( SetDlgCtrlId )<br />
nicht wirklich schlau. Ich übergebe ja nur die ID, wie kann ich die aber dem gewünschten Handle zuweisen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1631592</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1631592</guid><dc:creator><![CDATA[campinge]]></dc:creator><pubDate>Wed, 17 Dec 2008 06:32:52 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowThreadProcessId on Wed, 17 Dec 2008 07:19:19 GMT]]></title><description><![CDATA[<p>campinge schrieb:</p>
<blockquote>
<p>Ok, hat soweit alles geklappt. Allerdings werde ich aus der Umkehrfunktion<br />
( SetDlgCtrlId )<br />
nicht wirklich schlau. Ich übergebe ja nur die ID, wie kann ich die aber dem gewünschten Handle zuweisen?</p>
</blockquote>
<p>Gar nicht. Das Handle ist der eindeutige Bezeichner für ein Fenster. Die ID kann und ist mehrdeutig und nur ein Helferlein...</p>
<p>Was hast Du denn vor?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1631596</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1631596</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Wed, 17 Dec 2008 07:19:19 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowThreadProcessId on Wed, 24 Dec 2008 22:12:04 GMT]]></title><description><![CDATA[<p>Sorry, für Die Späte Antwort, aber ich hatte ne Menge zu tun.</p>
<p>Ich hatte eigentlich vor, dass über die ID ausgelesen wird, welch ein &quot;Typ&quot; das Feld besitzt, Sprich: Writeable, Static, Variable, etc... Die ID's dafür hab ich alle schon definiert und kann sie halt auslesen, aber wenn ich die nicht änderen kann, müsste ich das komplette Window ja eigentlich leeren und neu erstellen.<br />
Oder gibts da einen eleganteren Weg.</p>
<p>Soll halt eine Art Handymenü&quot; werden, sprich man kann durch verschiedene Seiten blättern und hat dort überall verschiedene Eingabemöglichkeiten...<br />
Hier mal ein paar Seitendarstellungen:<br />
<a href="http://www.b737.org.uk/images/fmc_pos_3.gif" rel="nofollow">http://www.b737.org.uk/images/fmc_pos_3.gif</a><br />
<a href="http://www.b737.org.uk/images/fmc_crz_econ.gif" rel="nofollow">http://www.b737.org.uk/images/fmc_crz_econ.gif</a><br />
<a href="http://www.b737.org.uk/images/fmc_irs_legs.gif" rel="nofollow">http://www.b737.org.uk/images/fmc_irs_legs.gif</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1635123</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1635123</guid><dc:creator><![CDATA[campinge]]></dc:creator><pubDate>Wed, 24 Dec 2008 22:12:04 GMT</pubDate></item><item><title><![CDATA[Reply to GetWindowThreadProcessId on Thu, 25 Dec 2008 01:38:16 GMT]]></title><description><![CDATA[<p>Du kannst die ID nachträglich nicht ändern (zumindest kenne ich keinen Weg, und würde es auch in deinem Fall nicht machen).</p>
<p>Was du machen kannst, ist z.B. eine map&lt;&gt; zu verwenden, in der du die diversen Flags einer ID zuordnest.</p>
<p>Beim Erstellen vergibst du die IDs dann so dass du alle &quot;relevanten&quot; Controls auseinanderhalten kannst, also normalerweise bekommt jedes Control eine eigene ID. (Manchmal vergibt man Controls die bloss &quot;zierde&quot; sind keine eigene ID, sondern verwendet eine einzige &quot;Zier-Control-ID&quot; für alle solchen Controls.)</p>
<p>Dann kannst du anhand der ID auf diese Flags zugreifen, und die Flags auch ändern. Beispiel:</p>
<pre><code class="language-cpp">std::map&lt;int, int&gt; g_flagsByControlID;

void InitializeDialog()
{
    // ...
    g_flagsByControlID[IDC_OK_BUTTON] = 123;
    g_flagsByControlID[IDC_CANCEL_BUTTON] = 42;
    // ...
}

void Foo()
{
    int controlID = ...;
    int flags = g_flagsByControlID[controlID]; // Flags lesen
    if (...)
    {
        g_flagsByControlID[controlID] = flags | 8; // Flags ändern
    }
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1635159</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1635159</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Thu, 25 Dec 2008 01:38:16 GMT</pubDate></item></channel></rss>