<?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[Auto Funktionsaufruf (Intervall)]]></title><description><![CDATA[<p>OK. Nachdem ich in den FAQ geschaut habe und Die Suchen Funktion auch nicht geht, hier meine Frage.</p>
<p>Ich möchte, daß eine Funktion jede sekunde einmal ausgeführt wird.<br />
Wie schaff ich das am besten?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/62200/auto-funktionsaufruf-intervall</link><generator>RSS for Node</generator><lastBuildDate>Thu, 04 Jun 2026 01:20:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/62200.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 21 Jan 2004 10:08:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 10:08:32 GMT]]></title><description><![CDATA[<p>OK. Nachdem ich in den FAQ geschaut habe und Die Suchen Funktion auch nicht geht, hier meine Frage.</p>
<p>Ich möchte, daß eine Funktion jede sekunde einmal ausgeführt wird.<br />
Wie schaff ich das am besten?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/440956</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/440956</guid><dc:creator><![CDATA[haedfinger]]></dc:creator><pubDate>Wed, 21 Jan 2004 10:08:32 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 10:33:21 GMT]]></title><description><![CDATA[<p>Hallo,<br />
was Du brauchst nennt sich Timer. <a href="http://www.codeproject.com/system/timers_intro.asp" rel="nofollow">Hier</a> findest Du ein gutes Tutorial in Englisch, <a href="http://www.win-api.de/tut07.html" rel="nofollow">hier</a> eins in Deutsch.<br />
Das ganze Drumherum kannst Du Dir sparen, wichtig sind nur die Aufrufe von</p>
<pre><code class="language-cpp">SetTimer(...)
KillTimer(...)
</code></pre>
<p>und das Reagieren auf die Timer-Nachricht in der Funktion OnTimer().<br />
Gruß,<br />
Michel</p>
]]></description><link>https://www.c-plusplus.net/forum/post/440967</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/440967</guid><dc:creator><![CDATA[Der Michel]]></dc:creator><pubDate>Wed, 21 Jan 2004 10:33:21 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 10:31:22 GMT]]></title><description><![CDATA[<p>Mit SetTimer einen Timer setzen und dann die Message WM_TIMER auswerten.</p>
<p>Gruß,<br />
Phips!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/440968</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/440968</guid><dc:creator><![CDATA[Phips!]]></dc:creator><pubDate>Wed, 21 Jan 2004 10:31:22 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 11:33:53 GMT]]></title><description><![CDATA[<p>Ich komme leider nicht klar <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>Ich will das diese Funktion immer aufgerufen wird, aber das geht nicht so wie ich will.</p>
<p>Derzeit steht das im InitDialog</p>
<pre><code class="language-cpp">SetTimer(this ,1, 1000, OnInstatus1());
</code></pre>
<p>Die Funktion OnInstatus() ist an der stelle falsch. da muß die adresse der selbigen hin, aber wie?<br />
Außerdem weiß ich nicht ob das mit dem this so geht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441008</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441008</guid><dc:creator><![CDATA[haedfinger]]></dc:creator><pubDate>Wed, 21 Jan 2004 11:33:53 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 11:47:34 GMT]]></title><description><![CDATA[<p>//über der initdialog<br />
void CALLBACK EXPORT OnInstatus1(<br />
HWND hWnd, // handle of CWnd that called SetTimer<br />
UINT nMsg, // WM_TIMER<br />
UINT nIDEvent // timer identification<br />
DWORD dwTime // system time<br />
)<br />
{}</p>
<p>//in der initdialog<br />
SetTimer(WM_USER+1,1000,OnInstatus1);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441016</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441016</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Wed, 21 Jan 2004 11:47:34 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 11:54:00 GMT]]></title><description><![CDATA[<p>Ich bekom die Kriese.</p>
<p>Erstmal Danke. Es klappt.</p>
<p>Mein Problem ist nur , das ichdamit nichts anfangen kann<br />
------------<br />
void CALLBACK EXPORT OnInstatus1(<br />
HWND hWnd, // handle of CWnd that called SetTimer<br />
UINT nMsg, // WM_TIMER<br />
UINT nIDEvent // timer identification<br />
DWORD dwTime // system time<br />
------------</p>
<p>Habe es auch nicht eingebaut, aber es klappt.</p>
<p>Was mir jetzt noch wichtig ist, ist die Bedeutung von WM_USER+1.</p>
<p>DANKE schon vorab und sür die andere Beantwortung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441019</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441019</guid><dc:creator><![CDATA[haedfinger]]></dc:creator><pubDate>Wed, 21 Jan 2004 11:54:00 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 12:07:39 GMT]]></title><description><![CDATA[<p>&quot;Mein Problem ist nur , das ichdamit nichts anfangen kann&quot;&lt;- was willst du denn genau wissen?</p>
<p>The WM_USER constant is used by applications to help define private messages, usually of the form WM_USER+X, where X is an integer value.</p>
<p>die zahlen vor wm_user sind von windows reserviert<br />
d.h. du solltest nich nachrichten mit id 20 verschicken<br />
lieber mit wm_user+20</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441025</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441025</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Wed, 21 Jan 2004 12:07:39 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 12:34:08 GMT]]></title><description><![CDATA[<p>OK. WM_USER hab ich geschnallt.</p>
<p>Was ich sonst nicht verstehe ist eher allgemeiner Natur.</p>
<p>z.B.</p>
<p>Da steht (MSDN)<br />
SetTimer(<br />
...<br />
HWND hWnd, // handle of window for timer messages<br />
...<br />
);</p>
<p>Kann ich damit nichts anfangen.<br />
Weiß nichtmal was ein &quot;handle&quot; ist <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/441042</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441042</guid><dc:creator><![CDATA[haedfinger]]></dc:creator><pubDate>Wed, 21 Jan 2004 12:34:08 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 12:49:49 GMT]]></title><description><![CDATA[<p>bzgl. handle<br />
stell dir einfach vor du hast 5 fenster und willst mit einem davon etwas machen<br />
dann brauchst du ne variable mit der du die 5 auseinanderhalten kannst<br />
dafür gibts handles die du bei der erstellung eines fensters bekommst</p>
<p>in der settimer funktion gibts du mit dem handle an, an welches deiner 5 fenster die timernachrichten geschickt werden sollen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441057</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441057</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Wed, 21 Jan 2004 12:49:49 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 13:02:36 GMT]]></title><description><![CDATA[<p>Ohh.<br />
Einfacher als ich dacht.<br />
Jetzt verstehe ich zumindest das.</p>
<p>Ich glaub ich sollte mir mal jemanden zur seite nehmen, der mir erklärt, wie die MSDN zu verstehen ist. Dann fällt mir sicher einiges leichter.</p>
<p>DANK dir und BYE</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441071</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441071</guid><dc:creator><![CDATA[haedfinger]]></dc:creator><pubDate>Wed, 21 Jan 2004 13:02:36 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 13:06:21 GMT]]></title><description><![CDATA[<p>noch zwei anmerkungen</p>
<p>1.wenn du mit mfc arbeitest, z.b. mit dialogen bekommst du das handle am einfachsten mit this-&gt;m_hWnd<br />
2.schau in der mfc nich nach den winapi funktionen z.b. SetTimer(...<br />
sondern nach den mfc funktionen CWnd::SetTimer(...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441075</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441075</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Wed, 21 Jan 2004 13:06:21 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 13:20:46 GMT]]></title><description><![CDATA[<blockquote>
<p>//in der initdialog<br />
SetTimer(WM_USER+1,1000,OnInstatus1);</p>
</blockquote>
<p>wie wärs wenn du dir die Beschreibung von SetTimer in der MSDN genauer durchliest? WM_USER hat hier überhaupt nichts zu suchen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441100</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441100</guid><dc:creator><![CDATA[Shlo]]></dc:creator><pubDate>Wed, 21 Jan 2004 13:20:46 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 13:32:11 GMT]]></title><description><![CDATA[<p>und warum?<br />
nur weil ne funktion eingetragen wurde?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441118</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441118</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Wed, 21 Jan 2004 13:32:11 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 13:39:06 GMT]]></title><description><![CDATA[<p>Sovok schrieb:</p>
<blockquote>
<p>und warum?<br />
nur weil ne funktion eingetragen wurde?</p>
</blockquote>
<p>warum steht in der MSDN und die Beschreibung zu TimerProc Callback-Funktion solltest du dir auch genauer durchlesen, denn für seine Zwecke ist diese absolut unnötig.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441131</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441131</guid><dc:creator><![CDATA[Shlo]]></dc:creator><pubDate>Wed, 21 Jan 2004 13:39:06 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 13:42:19 GMT]]></title><description><![CDATA[<p>obs nötig oder unnötig is spielt keine rolle<br />
er wollte vorallem wissen wies geht und warum</p>
<p>die standardvariante mit OnTimer steht ja eh in seinem tutorial</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441140</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441140</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Wed, 21 Jan 2004 13:42:19 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 13:51:27 GMT]]></title><description><![CDATA[<p>Sovok schrieb:</p>
<blockquote>
<p>obs nötig oder unnötig is spielt keine rolle [...]</p>
</blockquote>
<p>Ah ja...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441156</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441156</guid><dc:creator><![CDATA[Shlo]]></dc:creator><pubDate>Wed, 21 Jan 2004 13:51:27 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Wed, 21 Jan 2004 14:34:02 GMT]]></title><description><![CDATA[<p>Shlo schrieb:</p>
<blockquote>
<p>Sovok schrieb:</p>
<blockquote>
<p>obs nötig oder unnötig is spielt keine rolle [...]</p>
</blockquote>
<p>Ah ja...</p>
</blockquote>
<p>bezogen auf den kenntnisstand des fragenden<br />
ihm isses nur wichtig dasses funzt, nich obs optimal is oder er von einer ecke der doku zur nächsten geschickt wird</p>
]]></description><link>https://www.c-plusplus.net/forum/post/441189</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/441189</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Wed, 21 Jan 2004 14:34:02 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Fri, 23 Jan 2004 09:52:10 GMT]]></title><description><![CDATA[<p>Ich wollte hier keinen Streit auslösen!<br />
Danke nochmal. Hat alles wunderbar hingehauen.</p>
<p>Jetzt ist diese Funktion aber wieder hinfällig, denn die Funktion die jetzt im Timer läuft, soll permanent laufen. Also ein THREAD. Kennt ihr euch damit aus?</p>
<p>Habe dafür schon einen Frage-Thread geschrieben. Müsste weiter unten stehen. Schreibt da oder hier. Ist egal.</p>
<p>PS<br />
In der MSDN ist ein eigentlich gutes Beispiel, aber aus irgendeinen Grund läuft es nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/442412</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/442412</guid><dc:creator><![CDATA[haedfinger]]></dc:creator><pubDate>Fri, 23 Jan 2004 09:52:10 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Fri, 23 Jan 2004 09:59:14 GMT]]></title><description><![CDATA[<p>eigentlich brauchst du erstrmal nur createthread(), closehandle() und ne fuktion in der der thread läuft</p>
]]></description><link>https://www.c-plusplus.net/forum/post/442419</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/442419</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Fri, 23 Jan 2004 09:59:14 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Fri, 23 Jan 2004 10:10:44 GMT]]></title><description><![CDATA[<p>Hast du dir mal meine anderen Frage-Thread angesehen?</p>
<p>Da ist leider nichts mit &quot;nur CreateThread()&quot;.<br />
Und wenn es so einfach ist, könntest du nicht den Code dafür in den anderen Thread schreiben?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/442428</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/442428</guid><dc:creator><![CDATA[haedfinger]]></dc:creator><pubDate>Fri, 23 Jan 2004 10:10:44 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Fri, 23 Jan 2004 12:33:12 GMT]]></title><description><![CDATA[<p>Hi</p>
<p>Das mit den Threads ist echt ziemlich einfach:</p>
<pre><code class="language-cpp">UINT ThreadFunktion(LPVOID pParam)
{
  CDeinDialog* pDialog = (CDeinDialog*) pParam;
  for(int i=1; i&lt;=10; i++)
  {
    CString strTemp;
    strTemp.Format(&quot;Schleife %d&quot;, i);
    pDialog-&gt;GetDlgItemText(IDC_SHOWSTATUS, strTemp);
    Sleep(500); // eine halbe Sekunde warten
  }
}

CDeinDialog::OnButton1()
{
  AfxBeginThread(ThreadFunktion, this);
}
</code></pre>
<p>Code ist selbsterklärend (Ein Statusfeld zählt von i bis 10)</p>
<p>Grüße Rapha</p>
]]></description><link>https://www.c-plusplus.net/forum/post/442525</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/442525</guid><dc:creator><![CDATA[Rapha]]></dc:creator><pubDate>Fri, 23 Jan 2004 12:33:12 GMT</pubDate></item><item><title><![CDATA[Reply to Auto Funktionsaufruf (Intervall) on Fri, 23 Jan 2004 12:46:35 GMT]]></title><description><![CDATA[<p>habs ihm schon in den anderen thread gepostet<br />
jetzt hat er glaub 4 varianten zur auswahl *g*</p>
]]></description><link>https://www.c-plusplus.net/forum/post/442534</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/442534</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Fri, 23 Jan 2004 12:46:35 GMT</pubDate></item></channel></rss>