<?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[Wie übergebe ich der Funktion SetTimer() eine CALLBACK funktion]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>wie der Titel schon sagt habe ich ein Problem beim übergeben einer Callback funktion.<br />
Ich rufe die Funktion folgendermassen auf:</p>
<pre><code class="language-cpp">SetTimer(g_hWnd, TIMER_TOUCHBAR,TOUCHBAR_TIMER_INTERVAL,CTOUCHBAR::TimerProcTouchbar);
</code></pre>
<p>und möchte das Sie mir die Funktion:</p>
<pre><code class="language-cpp">void CALLBACK CTOUCHBAR::TimerProcTouchbar(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime);
</code></pre>
<p>nach Ablauf des Timers aufruft.</p>
<p>Bei Kompilieren erscheint dann folgende Fehlermeldung:<br />
error C2664: 'SetTimer' : cannot convert parameter 4 from 'void (struct HWND__ *,unsigned int,unsigned int,unsigned long)' to 'void (<strong>cdecl *)(struc<br />
t HWND</strong> *,unsigned int,unsigned int,unsigned long)'<br />
None of the functions with this name in scope match the target type</p>
<p>Wer kann mir dabei helfen?</p>
<p>Gruß<br />
spacehelix</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/153061/wie-übergebe-ich-der-funktion-settimer-eine-callback-funktion</link><generator>RSS for Node</generator><lastBuildDate>Thu, 23 Jul 2026 00:42:41 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/153061.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 12 Jul 2006 12:55:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Wie übergebe ich der Funktion SetTimer() eine CALLBACK funktion on Wed, 12 Jul 2006 12:55:18 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>wie der Titel schon sagt habe ich ein Problem beim übergeben einer Callback funktion.<br />
Ich rufe die Funktion folgendermassen auf:</p>
<pre><code class="language-cpp">SetTimer(g_hWnd, TIMER_TOUCHBAR,TOUCHBAR_TIMER_INTERVAL,CTOUCHBAR::TimerProcTouchbar);
</code></pre>
<p>und möchte das Sie mir die Funktion:</p>
<pre><code class="language-cpp">void CALLBACK CTOUCHBAR::TimerProcTouchbar(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime);
</code></pre>
<p>nach Ablauf des Timers aufruft.</p>
<p>Bei Kompilieren erscheint dann folgende Fehlermeldung:<br />
error C2664: 'SetTimer' : cannot convert parameter 4 from 'void (struct HWND__ *,unsigned int,unsigned int,unsigned long)' to 'void (<strong>cdecl *)(struc<br />
t HWND</strong> *,unsigned int,unsigned int,unsigned long)'<br />
None of the functions with this name in scope match the target type</p>
<p>Wer kann mir dabei helfen?</p>
<p>Gruß<br />
spacehelix</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1096425</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1096425</guid><dc:creator><![CDATA[spacehelix]]></dc:creator><pubDate>Wed, 12 Jul 2006 12:55:18 GMT</pubDate></item><item><title><![CDATA[Reply to Wie übergebe ich der Funktion SetTimer() eine CALLBACK funktion on Wed, 12 Jul 2006 14:49:17 GMT]]></title><description><![CDATA[<p>Das geht so nicht, da der Parameter eine andere Funktion verlangt. Nimm die Funktion aus der Klasse raus, und alles ist in Butter. <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/1096535</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1096535</guid><dc:creator><![CDATA[WebFritzi]]></dc:creator><pubDate>Wed, 12 Jul 2006 14:49:17 GMT</pubDate></item><item><title><![CDATA[Reply to Wie übergebe ich der Funktion SetTimer() eine CALLBACK funktion on Wed, 12 Jul 2006 15:42:45 GMT]]></title><description><![CDATA[<p>Danke schön, das Funktioniert jetzt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1096560</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1096560</guid><dc:creator><![CDATA[spacehelix]]></dc:creator><pubDate>Wed, 12 Jul 2006 15:42:45 GMT</pubDate></item><item><title><![CDATA[Reply to Wie übergebe ich der Funktion SetTimer() eine CALLBACK funktion on Wed, 12 Jul 2006 21:20:31 GMT]]></title><description><![CDATA[<p>normal sollte aber ne Statische Funktion angenommen werden...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1096760</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1096760</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Wed, 12 Jul 2006 21:20:31 GMT</pubDate></item><item><title><![CDATA[Reply to Wie übergebe ich der Funktion SetTimer() eine CALLBACK funktion on Wed, 12 Jul 2006 21:58:45 GMT]]></title><description><![CDATA[<p>Ich weiß nicht, wie es in C++ ist, aber unter Delphi haben Methoden einer Klasse noch einen unsichtbaren self-Parameter. Wenn das bei C++ ähnlich ist, kann es nicht gehen, weil die Parameter nicht übereinstimmen (Anzahl, Typen).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1096772</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1096772</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Wed, 12 Jul 2006 21:58:45 GMT</pubDate></item></channel></rss>