<?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[Wie bekomme ich die die ID eines Windows?]]></title><description><![CDATA[<p>Also ich will von mein Button das Label changen.</p>
<pre><code class="language-cpp">button1 = CreateWindow(

    &quot;button&quot;,	// pointer to registered class name
    &quot;Button 1&quot;,	// pointer to window name
    WS_CHILD|WS_VISIBLE|BS_DEFPUSHBUTTON	,	// window style
    129,	// horizontal position of window
    230,	// vertical position of window
    100,	// window width
    20,	// window height
    hwnd,	// handle to parent or owner window
    (HMENU) 1,	// handle to menu or child-window identifier
    ((LPCREATESTRUCT) lParam)-&gt;hInstance,	// handle to application instance
    NULL 	// pointer to window-creation data
   );
</code></pre>
<p>So hab eich den Button erstellt.</p>
<pre><code class="language-cpp">BOOL SetDlgItemText(

    HWND hDlg,	// handle of dialog box
    int nIDDlgItem,	// identifier of control
    LPCTSTR lpString 	// text to set

);
</code></pre>
<p>Das habe ich aus der WinAPI Referenz.</p>
<p>Durch das drücken des Buttons soll die Aufschrift geändert werden.<br />
In der WM_COMMAND steht denn der</p>
<pre><code class="language-cpp">SetDlgItemText(

    hwnd,	// handle of dialog box
    100,
    &quot;Button 2&quot; 	// text to set
   );
</code></pre>
<p>So wird es nix.<br />
Ich weiss nicht was diese int nIDDlgItem, // identifier of control sein soll, bzw wie ich die herraus bekomme.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/95367/wie-bekomme-ich-die-die-id-eines-windows</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 17:10:14 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/95367.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 18 Dec 2004 20:58:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Wie bekomme ich die die ID eines Windows? on Sat, 18 Dec 2004 20:58:02 GMT]]></title><description><![CDATA[<p>Also ich will von mein Button das Label changen.</p>
<pre><code class="language-cpp">button1 = CreateWindow(

    &quot;button&quot;,	// pointer to registered class name
    &quot;Button 1&quot;,	// pointer to window name
    WS_CHILD|WS_VISIBLE|BS_DEFPUSHBUTTON	,	// window style
    129,	// horizontal position of window
    230,	// vertical position of window
    100,	// window width
    20,	// window height
    hwnd,	// handle to parent or owner window
    (HMENU) 1,	// handle to menu or child-window identifier
    ((LPCREATESTRUCT) lParam)-&gt;hInstance,	// handle to application instance
    NULL 	// pointer to window-creation data
   );
</code></pre>
<p>So hab eich den Button erstellt.</p>
<pre><code class="language-cpp">BOOL SetDlgItemText(

    HWND hDlg,	// handle of dialog box
    int nIDDlgItem,	// identifier of control
    LPCTSTR lpString 	// text to set

);
</code></pre>
<p>Das habe ich aus der WinAPI Referenz.</p>
<p>Durch das drücken des Buttons soll die Aufschrift geändert werden.<br />
In der WM_COMMAND steht denn der</p>
<pre><code class="language-cpp">SetDlgItemText(

    hwnd,	// handle of dialog box
    100,
    &quot;Button 2&quot; 	// text to set
   );
</code></pre>
<p>So wird es nix.<br />
Ich weiss nicht was diese int nIDDlgItem, // identifier of control sein soll, bzw wie ich die herraus bekomme.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/676262</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/676262</guid><dc:creator><![CDATA[the_hero99]]></dc:creator><pubDate>Sat, 18 Dec 2004 20:58:02 GMT</pubDate></item><item><title><![CDATA[Reply to Wie bekomme ich die die ID eines Windows? on Sat, 18 Dec 2004 21:16:25 GMT]]></title><description><![CDATA[<p>GetDlgItem liefert dir das Handle zu dem Child-Kontrol mit der angegeben ID.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/676279</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/676279</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Sat, 18 Dec 2004 21:16:25 GMT</pubDate></item><item><title><![CDATA[Reply to Wie bekomme ich die die ID eines Windows? on Sat, 18 Dec 2004 21:44:40 GMT]]></title><description><![CDATA[<p>Wenn du dem Button die ID 1 gegeben hast, warum gibst du dann bei SetDlgItemText 100 an (und nicht 1) <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/676295</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/676295</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Sat, 18 Dec 2004 21:44:40 GMT</pubDate></item><item><title><![CDATA[Reply to Wie bekomme ich die die ID eines Windows? on Sun, 19 Dec 2004 12:33:13 GMT]]></title><description><![CDATA[<p>Danke an beide nun ist mir wenigstens klar was die wollten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/676546</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/676546</guid><dc:creator><![CDATA[the_hero99]]></dc:creator><pubDate>Sun, 19 Dec 2004 12:33:13 GMT</pubDate></item></channel></rss>