<?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[Thread]]></title><description><![CDATA[<p>Hi!</p>
<p>Wie kann ich mit der MFC einen Thread starten, code ausführen und wieder anhalten?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/46125/thread</link><generator>RSS for Node</generator><lastBuildDate>Sun, 31 May 2026 10:40:36 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/46125.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 16 Aug 2003 20:13:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Thread on Sat, 16 Aug 2003 20:13:36 GMT]]></title><description><![CDATA[<p>Hi!</p>
<p>Wie kann ich mit der MFC einen Thread starten, code ausführen und wieder anhalten?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/333935</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/333935</guid><dc:creator><![CDATA[blaschwafel]]></dc:creator><pubDate>Sat, 16 Aug 2003 20:13:36 GMT</pubDate></item><item><title><![CDATA[Reply to Thread on Sun, 17 Aug 2003 08:36:00 GMT]]></title><description><![CDATA[<p><a href="http://www.mut.de/media/buecher/vcplus6/data/kap18.htm" rel="nofollow">http://www.mut.de/media/buecher/vcplus6/data/kap18.htm</a><br />
mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/334089</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/334089</guid><dc:creator><![CDATA[mike84]]></dc:creator><pubDate>Sun, 17 Aug 2003 08:36:00 GMT</pubDate></item><item><title><![CDATA[Reply to Thread on Sun, 17 Aug 2003 10:13:20 GMT]]></title><description><![CDATA[<p>In deinem Dlg.(Test)</p>
<pre><code class="language-cpp">UINT CThreadTestDlg::thrFunction1(LPVOID pParam) 
{ 
  CThreadTestDlg* pDlg = (CThreadTestDlg*) pParam; 
  pDlg-&gt;thrRun1(); 
  return 0; 
} 

void CThreadTestDlg::thrRun1() 
{ 
  while (m_Flag)  
  { 
    // Hier dein Code einfügen
  } 
}
</code></pre>
<p>Den Thread Startest Du mit:</p>
<pre><code class="language-cpp">void CTestDlg::OnButton() // Bsp. Button drücken Thread Startet
{
    m_Flag = 1;
    CWinThread* pThread1 = AfxBeginThread (thrFunction1, this);
}
</code></pre>
<p>In deiner Dlg.h</p>
<pre><code class="language-cpp">// Konstruktion
public:
   void thrRun1(); 
   static  UINT thrFunction1 (LPVOID pParam);
private:
  int m_Flag;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/334128</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/334128</guid><dc:creator><![CDATA[Matten]]></dc:creator><pubDate>Sun, 17 Aug 2003 10:13:20 GMT</pubDate></item><item><title><![CDATA[Reply to Thread on Sun, 17 Aug 2003 16:47:24 GMT]]></title><description><![CDATA[<p>siehe dazu auch eventuell MDSN WaitForSingleObject und die Klasse CEvent !<br />
mit diesen sachen iss es relativ einfach möglich Threas zu starten bzw. unterbrechen.</p>
<p>happy coding !</p>
]]></description><link>https://www.c-plusplus.net/forum/post/334347</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/334347</guid><dc:creator><![CDATA[Ernsti]]></dc:creator><pubDate>Sun, 17 Aug 2003 16:47:24 GMT</pubDate></item><item><title><![CDATA[Reply to Thread on Sun, 17 Aug 2003 19:04:00 GMT]]></title><description><![CDATA[<p>Vielen Dank, hat soweit geklappt. Wie kann ich den Thread wieder beenden?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/334455</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/334455</guid><dc:creator><![CDATA[blaschwafel]]></dc:creator><pubDate>Sun, 17 Aug 2003 19:04:00 GMT</pubDate></item><item><title><![CDATA[Reply to Thread on Sun, 17 Aug 2003 20:22:44 GMT]]></title><description><![CDATA[<p>Ernsti hat bereits gute Tipse (&lt;- mehrzahl von Tip) gegeben.<br />
Mit Wait4SingleObject und einer Instanz von CEnvent (Methode SetEvent)<br />
ist das einfach zu machen.<br />
Ich glaube in der Faq war auch mal ein brauchbarer Beitrag so wegen Threads.<br />
Vielleicht mal bei Henkes nachsehen, oder auch mal das Microsoft Developer Network durchforsten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/334507</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/334507</guid><dc:creator><![CDATA[-cojac-]]></dc:creator><pubDate>Sun, 17 Aug 2003 20:22:44 GMT</pubDate></item><item><title><![CDATA[Reply to Thread on Sun, 05 Oct 2003 17:17:49 GMT]]></title><description><![CDATA[<p>Also jungs, ich habs immernoch nicht hinbekommen.<br />
kann nicht jemand bitte den code posten, der den thread zu diesem beispiel beendet? währe sehr dankbar.<br />
MfG GeForce87</p>
]]></description><link>https://www.c-plusplus.net/forum/post/366353</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/366353</guid><dc:creator><![CDATA[blaschwafel]]></dc:creator><pubDate>Sun, 05 Oct 2003 17:17:49 GMT</pubDate></item><item><title><![CDATA[Reply to Thread on Mon, 06 Oct 2003 09:06:30 GMT]]></title><description><![CDATA[<p>m_Flag 0 setzen, damit wird die while-Schleife und der Thread beendet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/366587</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/366587</guid><dc:creator><![CDATA[MuehBln]]></dc:creator><pubDate>Mon, 06 Oct 2003 09:06:30 GMT</pubDate></item></channel></rss>