<?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[Button in anderer Anwendung drücken]]></title><description><![CDATA[<p>Ich habe eine Form mit 3 Buttons.</p>
<p>Ein anderes Progamm soll nun auf diese Buttons drücken.</p>
<p>Im Forum habe ich folgendes Beispiel gefunden und angepasst. Aber irgendwie funktioniert´s nicht.</p>
<p><strong>Original</strong></p>
<pre><code class="language-cpp">HWND ParentWnd; 
ParentWnd = FindWindow(NULL, &quot;Rechner&quot;); 
SetForegroundWindow(ParentWnd); 
int hwnd=0; 
HWND hwndChild; 
if(ParentWnd == 0) 
{ 
} 
else 
{ 
hwndChild = FindWindowEx(ParentWnd,0,&quot;Button&quot;,&quot;1&quot;); 
SendMessage(hwndChild, WM_LBUTTONDOWN, 0, 0); 
SendMessage(hwndChild, WM_LBUTTONUP, 0, 0); 
}
</code></pre>
<p><strong>Meine Version</strong></p>
<pre><code class="language-cpp">HWND ParentWnd = FindWindow(NULL, &quot;Zeit-Messung&quot;);
SetForegroundWindow(ParentWnd);

if(ParentWnd != 0)
{
HWND hwndChild = FindWindowEx(ParentWnd,0,&quot;Button&quot;,&quot;Reset&quot;);
SendMessage(hwndChild, WM_LBUTTONDOWN, 0, 0);
SendMessage(hwndChild, WM_LBUTTONUP, 0, 0);
}
</code></pre>
<p>Mit meiner Version kann ich den Rechner auch bedienen, nur mein eigenes Programm nicht.</p>
<p>==&gt;Eisbeer&lt;==</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/210533/button-in-anderer-anwendung-drücken</link><generator>RSS for Node</generator><lastBuildDate>Thu, 20 Aug 2026 19:57:04 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/210533.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 12 Apr 2008 07:02:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Button in anderer Anwendung drücken on Sat, 12 Apr 2008 07:02:06 GMT]]></title><description><![CDATA[<p>Ich habe eine Form mit 3 Buttons.</p>
<p>Ein anderes Progamm soll nun auf diese Buttons drücken.</p>
<p>Im Forum habe ich folgendes Beispiel gefunden und angepasst. Aber irgendwie funktioniert´s nicht.</p>
<p><strong>Original</strong></p>
<pre><code class="language-cpp">HWND ParentWnd; 
ParentWnd = FindWindow(NULL, &quot;Rechner&quot;); 
SetForegroundWindow(ParentWnd); 
int hwnd=0; 
HWND hwndChild; 
if(ParentWnd == 0) 
{ 
} 
else 
{ 
hwndChild = FindWindowEx(ParentWnd,0,&quot;Button&quot;,&quot;1&quot;); 
SendMessage(hwndChild, WM_LBUTTONDOWN, 0, 0); 
SendMessage(hwndChild, WM_LBUTTONUP, 0, 0); 
}
</code></pre>
<p><strong>Meine Version</strong></p>
<pre><code class="language-cpp">HWND ParentWnd = FindWindow(NULL, &quot;Zeit-Messung&quot;);
SetForegroundWindow(ParentWnd);

if(ParentWnd != 0)
{
HWND hwndChild = FindWindowEx(ParentWnd,0,&quot;Button&quot;,&quot;Reset&quot;);
SendMessage(hwndChild, WM_LBUTTONDOWN, 0, 0);
SendMessage(hwndChild, WM_LBUTTONUP, 0, 0);
}
</code></pre>
<p>Mit meiner Version kann ich den Rechner auch bedienen, nur mein eigenes Programm nicht.</p>
<p>==&gt;Eisbeer&lt;==</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1490664</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1490664</guid><dc:creator><![CDATA[Eisbeer__NotLoggedIn__]]></dc:creator><pubDate>Sat, 12 Apr 2008 07:02:06 GMT</pubDate></item><item><title><![CDATA[Reply to Button in anderer Anwendung drücken on Sat, 12 Apr 2008 09:23:01 GMT]]></title><description><![CDATA[<p>Dann debugge doch mal dein aufrufendes Programm und schau nach, ob er überhaupt die Handles für die Fenster findet (ParentWnd, hwndChild).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1490700</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1490700</guid><dc:creator><![CDATA[Th69]]></dc:creator><pubDate>Sat, 12 Apr 2008 09:23:01 GMT</pubDate></item></channel></rss>