<?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]]></title><description><![CDATA[<p>Hallo<br />
Kann mir jemand sagen, wie ich eine Variable in die Windows Zwischenablage schreiben kann, um dem Inhalt mit ctrl + V später zu verwenden?</p>
<p>Vielen Dank<br />
Gruss Simu</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/99678/zwischenablage</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 12:21:26 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/99678.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 30 Jan 2005 21:49:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zwischenablage on Sun, 30 Jan 2005 21:49:54 GMT]]></title><description><![CDATA[<p>Hallo<br />
Kann mir jemand sagen, wie ich eine Variable in die Windows Zwischenablage schreiben kann, um dem Inhalt mit ctrl + V später zu verwenden?</p>
<p>Vielen Dank<br />
Gruss Simu</p>
]]></description><link>https://www.c-plusplus.net/forum/post/710772</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/710772</guid><dc:creator><![CDATA[simu]]></dc:creator><pubDate>Sun, 30 Jan 2005 21:49:54 GMT</pubDate></item><item><title><![CDATA[Reply to Zwischenablage on Mon, 31 Jan 2005 07:00:08 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">LRESULT CMainDlg::OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&amp; bHandled)
{
  int textlength = ::GetWindowTextLength(GetDlgItem(IDC_PASSWORD)) + 1;
  if (textlength &gt; 1) {
    if (::OpenClipboard(m_hWnd) &amp;&amp; ::EmptyClipboard()) {
      HGLOBAL hClipboardText = GlobalAlloc(GMEM_DDESHARE, textlength);
      if (hClipboardText) {
        LPSTR  lpstrClipboardText = static_cast&lt;LPSTR&gt;(::GlobalLock(hClipboardText));
        if (lpstrClipboardText) {
          ::GetWindowText(GetDlgItem(IDC_PASSWORD), lpstrClipboardText, textlength);
          if (::GlobalUnlock(hClipboardText))
            ::SetClipboardData(CF_TEXT, hClipboardText);
        }
      } 
      ::CloseClipboard();
    }
  }

  CloseDialog(wID);
  return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/710870</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/710870</guid><dc:creator><![CDATA[Redhead]]></dc:creator><pubDate>Mon, 31 Jan 2005 07:00:08 GMT</pubDate></item><item><title><![CDATA[Reply to Zwischenablage on Mon, 31 Jan 2005 10:04:06 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=403" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/710981</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/710981</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Mon, 31 Jan 2005 10:04:06 GMT</pubDate></item><item><title><![CDATA[Reply to Zwischenablage on Mon, 31 Jan 2005 21:52:47 GMT]]></title><description><![CDATA[<p>Danke für Deine Hilfe Redhead<br />
Bin noch Anfänger...<br />
könntest Du nicht den Code dokumentieren?<br />
Vieleicht schnall ich's dann...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/711708</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/711708</guid><dc:creator><![CDATA[simu]]></dc:creator><pubDate>Mon, 31 Jan 2005 21:52:47 GMT</pubDate></item><item><title><![CDATA[Reply to Zwischenablage on Tue, 01 Feb 2005 07:10:04 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">LRESULT CMainDlg::OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&amp; bHandled) 
{
  // Länge des Passwortes + 1 = benötigter Speicher
  int textlength = ::GetWindowTextLength(GetDlgItem(IDC_PASSWORD)) + 1; 
  // Wenn ein Passwort (Länge &gt; 0) existiert =&gt;
  if (textlength &gt; 1) { 
    // Wenn das Öffnen des Clipboard und das Leeren des alten Inhaltes erfolgreich sind =&gt;
    if (::OpenClipboard(m_hWnd) &amp;&amp; ::EmptyClipboard()) { 
      HGLOBAL hClipboardText = GlobalAlloc(GMEM_DDESHARE, textlength); 
      // Wenn die Allokation des globalen Speicherblocks erfolgreich ist =&gt;
      if (hClipboardText) { 
        LPSTR  lpstrClipboardText = static_cast&lt;LPSTR&gt;(::GlobalLock(hClipboardText)); 
        // Wenn das Casting auf &quot;String&quot; und die Sperrung erfolgreich ist =&gt;
        if (lpstrClipboardText) { 
          // Passwort in den Speicherblock schreiben.
          ::GetWindowText(GetDlgItem(IDC_PASSWORD), lpstrClipboardText, textlength); 
          // Wenn die Aufhebung der Sperrung nach dem Schreiben erfolgreich ist =&gt;
          if (::GlobalUnlock(hClipboardText))
            // Daten im Text-Format ins Clipboard schreiben.
            ::SetClipboardData(CF_TEXT, hClipboardText); 
        } 
      } 
      // Clipboard nach Gebrauch wieder Schliessen
      ::CloseClipboard(); 
    } 
  } 

  CloseDialog(wID); 
  return 0; 
}
</code></pre>
<p><strong>Dringende Empfehlung MSDN zulegen bzw. nachschlagen.</strong></p>
]]></description><link>https://www.c-plusplus.net/forum/post/711826</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/711826</guid><dc:creator><![CDATA[Redhead]]></dc:creator><pubDate>Tue, 01 Feb 2005 07:10:04 GMT</pubDate></item><item><title><![CDATA[Reply to Zwischenablage on Tue, 01 Feb 2005 07:17:20 GMT]]></title><description><![CDATA[<p>Tipp : borland hat mal ne Win32.hlp veröffentlicht. Die musste nur mal suchen.<br />
Ist zwar afaik nur die API von Win9x/NT 4.0, aber alles drin beschrieben. Ist immer das Erste, was meine IDE als Zusatz bekommt...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/711828</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/711828</guid><dc:creator><![CDATA[DocJunioR]]></dc:creator><pubDate>Tue, 01 Feb 2005 07:17:20 GMT</pubDate></item><item><title><![CDATA[Reply to Zwischenablage on Tue, 01 Feb 2005 08:02:50 GMT]]></title><description><![CDATA[<p>Vielen Dank euch allen, werd das mal ausprobieren <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":-)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/711848</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/711848</guid><dc:creator><![CDATA[simu]]></dc:creator><pubDate>Tue, 01 Feb 2005 08:02:50 GMT</pubDate></item></channel></rss>