<?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 Handle eines anderen Fensters rausbekommen?]]></title><description><![CDATA[<p>Hi,<br />
wie komm ich an das Handle von einem Fenster einer anderen Anwendung?<br />
Gibt's da net eine Funktion mit der man mittels Anwendungsname an das Handle rankommt?<br />
Gruß Michi</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/159269/wie-handle-eines-anderen-fensters-rausbekommen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 01 May 2026 13:54:50 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/159269.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 13 Sep 2006 12:48:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Wed, 13 Sep 2006 12:48:17 GMT]]></title><description><![CDATA[<p>Hi,<br />
wie komm ich an das Handle von einem Fenster einer anderen Anwendung?<br />
Gibt's da net eine Funktion mit der man mittels Anwendungsname an das Handle rankommt?<br />
Gruß Michi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1136610</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1136610</guid><dc:creator><![CDATA[michib]]></dc:creator><pubDate>Wed, 13 Sep 2006 12:48:17 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Wed, 13 Sep 2006 12:57:54 GMT]]></title><description><![CDATA[<p>FindWindow()</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1136623</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1136623</guid><dc:creator><![CDATA[nichtswisser]]></dc:creator><pubDate>Wed, 13 Sep 2006 12:57:54 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Wed, 13 Sep 2006 13:21:15 GMT]]></title><description><![CDATA[<p>Hi,<br />
danke!!<br />
Gruß Michi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1136651</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1136651</guid><dc:creator><![CDATA[michib]]></dc:creator><pubDate>Wed, 13 Sep 2006 13:21:15 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Wed, 13 Sep 2006 13:51:30 GMT]]></title><description><![CDATA[<p>Hi,<br />
wie kann ich rausfinden welche Programme (Anwendungen) geöffnet sind?<br />
Gruß Michi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1136676</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1136676</guid><dc:creator><![CDATA[michib]]></dc:creator><pubDate>Wed, 13 Sep 2006 13:51:30 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Wed, 13 Sep 2006 14:05:22 GMT]]></title><description><![CDATA[<p>adfawsdfasssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss<br />
open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!open() == ERROR!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1136692</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1136692</guid><dc:creator><![CDATA[das D]]></dc:creator><pubDate>Wed, 13 Sep 2006 14:05:22 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Wed, 13 Sep 2006 14:48:38 GMT]]></title><description><![CDATA[<p>michib schrieb:</p>
<blockquote>
<p>Hi,<br />
wie kann ich rausfinden welche Programme (Anwendungen) geöffnet sind?<br />
Gruß Michi</p>
</blockquote>
<p>Damit:<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f4a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--light_bulb"
      title=":bulb:"
      alt="💡"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /><br />
**CreateToolhelp32Snapshot<br />
Takes a snapshot of the processes and the heaps, modules, and threads used by the processes.</p>
<p>HANDLE WINAPI CreateToolhelp32Snapshot(<br />
DWORD dwFlags,<br />
DWORD th32ProcessID<br />
);**</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1136730</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1136730</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Wed, 13 Sep 2006 14:48:38 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Wed, 13 Sep 2006 16:51:49 GMT]]></title><description><![CDATA[<p>Hi,<br />
danke...<br />
Und wie bekomm ich jetzt mittels des Handles die einzelnen Programme raus?<br />
Gruß Michi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1136833</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1136833</guid><dc:creator><![CDATA[michib]]></dc:creator><pubDate>Wed, 13 Sep 2006 16:51:49 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Wed, 13 Sep 2006 17:29:45 GMT]]></title><description><![CDATA[<p>michib schrieb:</p>
<blockquote>
<p>Hi,<br />
danke...<br />
Und wie bekomm ich jetzt mittels des Handles die einzelnen Programme raus?<br />
Gruß Michi</p>
</blockquote>
<p>Wie stellst du dir das denn konkret vor ?--&gt; Ein 'Programm herausbekommen' ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1136856</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1136856</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Wed, 13 Sep 2006 17:29:45 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Wed, 13 Sep 2006 17:40:05 GMT]]></title><description><![CDATA[<p>Hi,<br />
ich will konkret wissen welche Programme geöffnet sind, ich will die Namen der geöffneten Programme bekommen!<br />
Und ich hab ja nur das Handle!<br />
Gruß Michi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1136862</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1136862</guid><dc:creator><![CDATA[michib]]></dc:creator><pubDate>Wed, 13 Sep 2006 17:40:05 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Wed, 13 Sep 2006 19:13:30 GMT]]></title><description><![CDATA[<p>michib schrieb:</p>
<blockquote>
<p>Und ich hab ja nur das Handle!<br />
Gruß Michi</p>
</blockquote>
<p>Meinst du HWND ? Oder den Handle den du von CreateToolhelp32Snapshot bekommst ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1136923</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1136923</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Wed, 13 Sep 2006 19:13:30 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Wed, 13 Sep 2006 22:36:47 GMT]]></title><description><![CDATA[<p>Hi,<br />
eigentlich will ich bloß die Namen aller geöffneten Programme.<br />
Und die hwnd der Fenster.<br />
Gruß Michi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1136969</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1136969</guid><dc:creator><![CDATA[michib]]></dc:creator><pubDate>Wed, 13 Sep 2006 22:36:47 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Wed, 13 Sep 2006 22:43:38 GMT]]></title><description><![CDATA[<p>michib schrieb:</p>
<blockquote>
<p>Hi,<br />
eigentlich will ich bloß die Namen aller geöffneten Programme.<br />
Und die hwnd der Fenster.<br />
Gruß Michi</p>
</blockquote>
<p>Ahso <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f4a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--light_bulb"
      title=":bulb:"
      alt="💡"
    /> na dann mit:</p>
<p><a href="http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/enumwindows.asp" rel="nofollow">EnumWindows</a><br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/enumwindowsproc.asp" rel="nofollow">EnumWindowsProc</a></p>
<p>Bzw. für den 'Namen'...WM_GETTEXT und WM_GETTEXTLEN <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="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1136970</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1136970</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Wed, 13 Sep 2006 22:43:38 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Wed, 13 Sep 2006 23:49:16 GMT]]></title><description><![CDATA[<p>Hi,<br />
danke!<br />
Ich hab die beiden mal angeschaut...<br />
aber kann damit nicht soviel anfangen z.B. wie man sie benützt!<br />
Gruß Michi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1136976</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1136976</guid><dc:creator><![CDATA[michib]]></dc:creator><pubDate>Wed, 13 Sep 2006 23:49:16 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Thu, 14 Sep 2006 12:46:30 GMT]]></title><description><![CDATA[<p>michib schrieb:</p>
<blockquote>
<p>aber kann damit nicht soviel anfangen z.B. wie man sie benützt!</p>
</blockquote>
<p>Na so:</p>
<pre><code class="language-cpp">#include &lt;ioStream&gt;
#include &lt;Windows.h&gt;

using namespace std;

BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
{
    if(hWnd == NULL)
        return (FALSE);
    char szBuffer[300];
    if(!IsWindowVisible(hWnd)) // Wenn nicht sichtbar, dann überspringen
        return (TRUE);
    SendMessage(hWnd, WM_GETTEXT, sizeof(szBuffer) / sizeof(TCHAR), (LPARAM)szBuffer));
    cout &lt;&lt; &quot;Aktueller Fenstertext: &quot; &lt;&lt; szBuffer &lt;&lt; endl;
    return (TRUE);
}

int main()
{
    cout &lt;&lt; &quot;\nStarte Enumeration...&quot; &lt;&lt; endl;
    EnumWindows(EnumWindowsProc, NULL);
    cout &lt;&lt; &quot;Fenster-Enumeration beendet.&quot; &lt;&lt; endl;
    return (0);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1137074</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1137074</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Thu, 14 Sep 2006 12:46:30 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Thu, 14 Sep 2006 12:01:54 GMT]]></title><description><![CDATA[<p>hab ein paar kleine verbesserungen gemacht:</p>
<pre><code class="language-cpp">#include &lt;ioStream&gt;
#include &lt;Windows.h&gt;

using namespace std;

BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
{
    if(hWnd == NULL)
        return (FALSE);
    char szBuffer[300];
    if(!IsWindowVisible(hWnd)) // Wenn nicht sichtbar, dann überspringen
        return (TRUE);
    SendMessage(hWnd, WM_GETTEXT, sizeof(szBuffer) / sizeof(TCHAR), (LPARAM)szBuffer));
    cout &lt;&lt; &quot;Aktueller Fenstertext: &quot; &lt;&lt; szBuffer &lt;&lt; endl;
        return (TRUE);
}

int main()
{
    cout &lt;&lt; &quot;\nStarte Enumeration...&quot; &lt;&lt; endl;
    EnumWindows(EnumWindowsProc, NULL);
    cout &lt;&lt; &quot;Fenster-Enumeration beendet.&quot; &lt;&lt; endl;
    return (0);
}
</code></pre>
<p>cya</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1137238</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1137238</guid><dc:creator><![CDATA[Kinko]]></dc:creator><pubDate>Thu, 14 Sep 2006 12:01:54 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Thu, 14 Sep 2006 12:45:43 GMT]]></title><description><![CDATA[<p><strong>@Kinko:</strong></p>
<p>Kinko schrieb:</p>
<blockquote>
<p>hab ein paar kleine verbesserungen gemacht:</p>
<p>[...]Mein Code[...]</p>
<p>cya</p>
</blockquote>
<p>Lächerlich!, Was bist du denn für ein Noob...du hast <strong>gar nicht verbessert</strong>. Was für 'n Troll.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1137297</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1137297</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Thu, 14 Sep 2006 12:45:43 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Tue, 13 Nov 2007 14:01:44 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich bin eben auf diesen Beitrag gestoßen, weil ich das gleiche Problem habe. Ich habe eben das Programm fast exakt so ausgeführt, wie CodeFinder es geschrieben hat.</p>
<p>Allerdings bekomme ich von sämtlichen Fenstertiteln immer nur das erste Zeichen. Meine Ausgabe sieht folgendermaßen aus:</p>
<pre><code>Starte Enumeration...
Aktueller Fenstertext:
Aktueller Fenstertext: c
Aktueller Fenstertext: l
Aktueller Fenstertext: P
Aktueller Fenstertext: C
Aktueller Fenstertext: M
Aktueller Fenstertext: C
Aktueller Fenstertext: \
Aktueller Fenstertext: M
Aktueller Fenstertext: C
Aktueller Fenstertext: \
Aktueller Fenstertext: C
Aktueller Fenstertext: P
Aktueller Fenstertext: C
Aktueller Fenstertext: C
Aktueller Fenstertext: C
Aktueller Fenstertext: C
Aktueller Fenstertext: H
Aktueller Fenstertext: C
Aktueller Fenstertext: P
Fenster-Enumeration beendet.
</code></pre>
<p>Mein Code sieht so aus:</p>
<pre><code>#include &quot;stdafx.h&quot;
#include &lt;ioStream&gt; 
#include &lt;Windows.h&gt; 

using namespace std; 
#pragma comment (lib, &quot;User32.lib&quot;)

BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam) 
{ 
    if(hWnd == NULL) 
        return (FALSE); 
    char szBuffer[300]; 
    if(!IsWindowVisible(hWnd)) // Wenn nicht sichtbar, dann überspringen 
        return (TRUE); 
    SendMessage(hWnd, WM_GETTEXT, sizeof(szBuffer) / sizeof(TCHAR), (LPARAM)szBuffer); 
    cout &lt;&lt; &quot;Aktueller Fenstertext: &quot; &lt;&lt; szBuffer &lt;&lt; endl; 
    return (TRUE); 
} 

int main() 
{ 
    cout &lt;&lt; &quot;\nStarte Enumeration...&quot; &lt;&lt; endl; 
    EnumWindows(EnumWindowsProc, NULL); 
    cout &lt;&lt; &quot;Fenster-Enumeration beendet.&quot; &lt;&lt; endl; 
	int i;
	cin &gt;&gt; i;
    return (0); 
}
</code></pre>
<p>Ich benutze Visual C++ 2005 Express.<br />
Woran könnte es liegen, dass ich immer nur ein Zeichen der Fenstertitel bekomme?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1402508</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1402508</guid><dc:creator><![CDATA[cyclohexan]]></dc:creator><pubDate>Tue, 13 Nov 2007 14:01:44 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Tue, 13 Nov 2007 22:46:16 GMT]]></title><description><![CDATA[<blockquote>
<p>sizeof(szBuffer) / sizeof(TCHAR)</p>
</blockquote>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/12048">@codefinder</a>: wenn schon so, dann auch bitte TCHAR szBuffer ;).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1402819</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1402819</guid><dc:creator><![CDATA[Black Shadow]]></dc:creator><pubDate>Tue, 13 Nov 2007 22:46:16 GMT</pubDate></item><item><title><![CDATA[Reply to Wie Handle eines anderen Fensters rausbekommen? on Thu, 15 Nov 2007 13:51:49 GMT]]></title><description><![CDATA[<p>cyclohexan schrieb:</p>
<blockquote>
<p>Woran könnte es liegen, dass ich immer nur ein Zeichen der Fenstertitel bekomme?</p>
</blockquote>
<p>Hi! Vereinfacht ausgedrückt: cout guckt, was an Adresse 0001 steht und gibt es auf die Console aus. Es guckt nicht, was noch an den nachfolgenden Adressen steht. Somit kriegst du in der derzeitigen Implementierung nur das erste Zeichen. HTH - sarabande</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1403667</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1403667</guid><dc:creator><![CDATA[sarabande]]></dc:creator><pubDate>Thu, 15 Nov 2007 13:51:49 GMT</pubDate></item></channel></rss>