<?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[Zwischenablage &gt; Notepad starten &gt; einfügen]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe Daten in die Zwischenablage abgelegt und Notepad per ShellExecute aufgerufen.<br />
Jetzt möchte ich die in der Zwischenablage liegenden Daten sofort in Notepad einfügen.<br />
Habe mir den Zeiger auf das Notepad-Hauptfenster geholt und es mit<br />
SendMessage(WM_PASTE, 0, 0) versucht, klappt aber nicht.</p>
<p>Wer kann mir helfen?<br />
Chris</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/6304/zwischenablage-notepad-starten-einfügen</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 10:02:36 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/6304.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 23 Jun 2003 09:31:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zwischenablage &gt; Notepad starten &gt; einfügen on Mon, 23 Jun 2003 09:31:00 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe Daten in die Zwischenablage abgelegt und Notepad per ShellExecute aufgerufen.<br />
Jetzt möchte ich die in der Zwischenablage liegenden Daten sofort in Notepad einfügen.<br />
Habe mir den Zeiger auf das Notepad-Hauptfenster geholt und es mit<br />
SendMessage(WM_PASTE, 0, 0) versucht, klappt aber nicht.</p>
<p>Wer kann mir helfen?<br />
Chris</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30590</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30590</guid><dc:creator><![CDATA[MuehBln]]></dc:creator><pubDate>Mon, 23 Jun 2003 09:31:00 GMT</pubDate></item><item><title><![CDATA[Reply to Zwischenablage &gt; Notepad starten &gt; einfügen on Mon, 23 Jun 2003 09:37:00 GMT]]></title><description><![CDATA[<blockquote>
<p>Habe mir den Zeiger auf das Notepad-Hauptfenster geholt</p>
</blockquote>
<p>Logischerweise brauchst Du den Zeiger des im Notepad-Hauptfenster liegenden Edit-Controls!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30591</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30591</guid><dc:creator><![CDATA[RenéG]]></dc:creator><pubDate>Mon, 23 Jun 2003 09:37:00 GMT</pubDate></item><item><title><![CDATA[Reply to Zwischenablage &gt; Notepad starten &gt; einfügen on Mon, 23 Jun 2003 10:09:00 GMT]]></title><description><![CDATA[<p>Dacht ich mir schon, aber wie bekomme ich diesen Zeiger? Habe mir das mal mit Spy++ angeschaut, aber das Fenster hat keinen Namen.<br />
Bekomme ich den Zeiger ausgehend vom Notepad-Fenster?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30592</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30592</guid><dc:creator><![CDATA[MuehBln]]></dc:creator><pubDate>Mon, 23 Jun 2003 10:09:00 GMT</pubDate></item><item><title><![CDATA[Reply to Zwischenablage &gt; Notepad starten &gt; einfügen on Mon, 23 Jun 2003 10:41:00 GMT]]></title><description><![CDATA[<p>jo. EnumChildWindows, als Parameter 1</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30593</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30593</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Mon, 23 Jun 2003 10:41:00 GMT</pubDate></item><item><title><![CDATA[Reply to Zwischenablage &gt; Notepad starten &gt; einfügen on Mon, 23 Jun 2003 11:46:00 GMT]]></title><description><![CDATA[<p>Hab jetzt mal folgendes versucht:</p>
<pre><code class="language-cpp">BOOL CALLBACK EnumChildProc(HWND hwndChild, LPARAM lParam) 
{ 
    if (hwndChild)
    {   
        SendMessage(hwndChild, WM_PASTE, 0, 0);
        return TRUE; 
    }
    else
    {
        return FALSE;
    }
} 

void CDMView::OnBnClickedEditor()
{
    HWND pwnd;
    ShellExecute(0, &quot;open&quot;, _T(&quot;Notepad.exe&quot;), 0, 0, SW_SHOWMAXIMIZED);
    pwnd = ::FindWindow(NULL, &quot;Unbenannt - Editor&quot;);
    if (pwnd)
        EnumChildWindows(pwnd, EnumChildProc, 1);
}
</code></pre>
<p>Das klappt, wenn ich Debugge (mit F10 durchsteppe) oder bereits ein Notepad-Fenster geöffnet habe. Ansonsten klappt es aber nicht. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /><br />
Weiß jemand was ich falsch mache?</p>
<p>Gruß<br />
Chris</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30594</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30594</guid><dc:creator><![CDATA[MuehBln]]></dc:creator><pubDate>Mon, 23 Jun 2003 11:46:00 GMT</pubDate></item><item><title><![CDATA[Reply to Zwischenablage &gt; Notepad starten &gt; einfügen on Mon, 23 Jun 2003 11:51:00 GMT]]></title><description><![CDATA[<p>Probier das mal:</p>
<pre><code class="language-cpp">ShellExecute(0, &quot;open&quot;, _T(&quot;Notepad.exe&quot;), 0, 0, SW_SHOWMAXIMIZED);
HWND pwnd;
for(int i=0;i&lt;50;++i)
{
    Sleep(10); //wenns net klappt vielleicht auch Sleep(100) probieren ...
    pwnd = ::FindWindow(NULL, &quot;Unbenannt - Editor&quot;);
    if (pwnd)
    {
        EnumChildWindows(pwnd, EnumChildProc, 1);
        break;
    }
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/30595</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30595</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Mon, 23 Jun 2003 11:51:00 GMT</pubDate></item><item><title><![CDATA[Reply to Zwischenablage &gt; Notepad starten &gt; einfügen on Mon, 23 Jun 2003 11:57:00 GMT]]></title><description><![CDATA[<p>Klappt! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> DANKE!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30596</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30596</guid><dc:creator><![CDATA[MuehBln]]></dc:creator><pubDate>Mon, 23 Jun 2003 11:57:00 GMT</pubDate></item></channel></rss>