<?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[Merkwürdiges Verhalten von Animate_Play();]]></title><description><![CDATA[<p>Hi Leute</p>
<p>Ihr habt mir schonmal so toll geholfen, da dacht ich mir, diesmal kriegt ihr das auch hin. Also folgendes: ich lade ein kleines Avi von der Platte mit:</p>
<pre><code class="language-cpp">video = Animate_Create(hwnd,502,WS_CHILD| WS_VISIBLE,hInst); 
        Animate_Open(video,&quot;test.avi&quot;);
</code></pre>
<p>Das funktioniert auch einwandfrei.</p>
<p>Jetzt muss ich natürlich noch</p>
<pre><code class="language-cpp">Animate_Play(video,0,-1,-1);
</code></pre>
<p>aufrufen, damit die Animation beginnt.</p>
<p>Tja, und nu kommst: Geht nicht. Wo Animate_play() aufgerufen wird, ist so ziemlich egal, das Programm stürzt jedes mal mit nem Speicherlesefehler ab.<br />
GetLastError() geht auch nicht, das Programm verabschiedet sich schon vorher.<br />
Das komische ist, dass das kleine Avi tatsächlich wiedergegeben wird, auch in der Endlosschleife (bis man halt den Fehlerdialog beendet) Habs auch mit clock.avi probiert --&gt; gleicher Effekt.</p>
<pre><code class="language-cpp">Animate_Play(video,0,0,0);
</code></pre>
<p>Das geht komischer Weise, aber nich sehr sinnvoll. <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="😃"
    /><br />
Hab mich schon durch alle Foren im Inet gewühlt, sogar auf Russisch und Japanisch, aber nichts gefunden. Ich hatte sowas ja sogar schonmal am Laufen, hatte es dann wieder raus, und hab mich nun doch umendschieden. Schlagt mich tot, ich weiß nicht weiter. Zur not mus ich mit Timern arbeiten, aber das ist ja nicht so elegant.</p>
<p>OS: WinXP<br />
IDE: Dev-C++ 4.9.9.1(stan-dart)</p>
<p>danke schonmal</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/96069/merkwürdiges-verhalten-von-animate_play</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 23:50:30 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/96069.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 Dec 2004 23:14:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Merkwürdiges Verhalten von Animate_Play(); on Mon, 27 Dec 2004 23:14:03 GMT]]></title><description><![CDATA[<p>Hi Leute</p>
<p>Ihr habt mir schonmal so toll geholfen, da dacht ich mir, diesmal kriegt ihr das auch hin. Also folgendes: ich lade ein kleines Avi von der Platte mit:</p>
<pre><code class="language-cpp">video = Animate_Create(hwnd,502,WS_CHILD| WS_VISIBLE,hInst); 
        Animate_Open(video,&quot;test.avi&quot;);
</code></pre>
<p>Das funktioniert auch einwandfrei.</p>
<p>Jetzt muss ich natürlich noch</p>
<pre><code class="language-cpp">Animate_Play(video,0,-1,-1);
</code></pre>
<p>aufrufen, damit die Animation beginnt.</p>
<p>Tja, und nu kommst: Geht nicht. Wo Animate_play() aufgerufen wird, ist so ziemlich egal, das Programm stürzt jedes mal mit nem Speicherlesefehler ab.<br />
GetLastError() geht auch nicht, das Programm verabschiedet sich schon vorher.<br />
Das komische ist, dass das kleine Avi tatsächlich wiedergegeben wird, auch in der Endlosschleife (bis man halt den Fehlerdialog beendet) Habs auch mit clock.avi probiert --&gt; gleicher Effekt.</p>
<pre><code class="language-cpp">Animate_Play(video,0,0,0);
</code></pre>
<p>Das geht komischer Weise, aber nich sehr sinnvoll. <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="😃"
    /><br />
Hab mich schon durch alle Foren im Inet gewühlt, sogar auf Russisch und Japanisch, aber nichts gefunden. Ich hatte sowas ja sogar schonmal am Laufen, hatte es dann wieder raus, und hab mich nun doch umendschieden. Schlagt mich tot, ich weiß nicht weiter. Zur not mus ich mit Timern arbeiten, aber das ist ja nicht so elegant.</p>
<p>OS: WinXP<br />
IDE: Dev-C++ 4.9.9.1(stan-dart)</p>
<p>danke schonmal</p>
]]></description><link>https://www.c-plusplus.net/forum/post/681744</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/681744</guid><dc:creator><![CDATA[MS_Noob]]></dc:creator><pubDate>Mon, 27 Dec 2004 23:14:03 GMT</pubDate></item><item><title><![CDATA[Reply to Merkwürdiges Verhalten von Animate_Play(); on Tue, 28 Dec 2004 00:29:11 GMT]]></title><description><![CDATA[<p>Bei mir läuft es nach deiner Beschreibung.</p>
<pre><code class="language-cpp">/*-----------------------------------------------------------------------
  Muster Window.cpp 

  www.winapi.net
  -----------------------------------------------------------------------*/

#include &lt;windows.h&gt;
#include &lt;commctrl.h&gt;

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
                    PSTR szCmdLine, int iCmdShow)
{
	InitCommonControls();
   static TCHAR szAppName[] = TEXT (&quot;Klassenname&quot;);
   HWND         hwnd;
   MSG          msg;
   WNDCLASSEX   wndclassex = {0};

   wndclassex.cbSize        = sizeof(WNDCLASSEX);
   wndclassex.style         = CS_HREDRAW | CS_VREDRAW;
   wndclassex.lpfnWndProc   = WndProc;
   wndclassex.cbClsExtra    = 0;
   wndclassex.cbWndExtra    = 0;
   wndclassex.hInstance     = hInstance;
   wndclassex.hIcon         = LoadIcon (NULL, IDI_APPLICATION);
   wndclassex.hCursor       = LoadCursor (NULL, IDC_ARROW);
   wndclassex.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);
   wndclassex.lpszMenuName  = NULL;
   wndclassex.lpszClassName = szAppName;
   wndclassex.hIconSm       = wndclassex.hIcon;

   if (!RegisterClassEx (&amp;wndclassex))
   {
      MessageBox (NULL, TEXT (&quot;RegisterClassEx fehlgeschlagen!&quot;),
                  szAppName, MB_ICONERROR);
      return 0;
   }

   hwnd = CreateWindowEx (WS_EX_OVERLAPPEDWINDOW, // erweiterter Fensterstil
                  szAppName, // Name der Fensterklasse
                  TEXT (&quot;Fenstertitel&quot;), // Fenstertitel
                  WS_OVERLAPPEDWINDOW, // Fensterstil
                  CW_USEDEFAULT, // X-Position des Fensters                      
                  CW_USEDEFAULT, // Y-Position des Fensters       
                  CW_USEDEFAULT, // Fensterbreite                 
                  CW_USEDEFAULT, // Fensterhöhe                
                  NULL, // übergeordnetes Fenster
                  NULL, // Menü           
                  hInstance, // Programm-Kopiezähler (Programm-ID)            
                  NULL); // zusätzliche Parameter

   ShowWindow (hwnd, iCmdShow);
   UpdateWindow (hwnd);

   HWND video = video = Animate_Create(hwnd,502,WS_CHILD| WS_VISIBLE,hInstance);
   Animate_Open(video,&quot;C:\\Windows\\clock.avi&quot;);
   Animate_Play(video,0,-1,-1);

   while (GetMessage (&amp;msg, NULL, 0, 0))
   {
      TranslateMessage (&amp;msg);
      DispatchMessage (&amp;msg);
   }
   return msg.wParam;
}

// Die Hauptnachrichtenschleife
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
   switch (message)
   {
   case WM_CREATE:
      return (0);

   case WM_DESTROY:
      PostQuitMessage (0);
      return (0);
   }

   return DefWindowProc (hwnd, message, wParam, lParam);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/681766</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/681766</guid><dc:creator><![CDATA[avi player]]></dc:creator><pubDate>Tue, 28 Dec 2004 00:29:11 GMT</pubDate></item><item><title><![CDATA[Reply to Merkwürdiges Verhalten von Animate_Play(); on Tue, 28 Dec 2004 14:37:11 GMT]]></title><description><![CDATA[<p>Sehr merkwürdig. Das ging bei mir jetzt auch, also muss es wohl am Restcode liegen. Hab jetzt ziemlich viel ausgeklammert, bis kaum noch was da war und siehe da: der fehler weg. So hab ich jetzt den fehler lokalisieren können:</p>
<pre><code class="language-cpp">case WM_COMMAND:
        {            
            switch(wParam)
            {  
...
default:
                {
                    FSOUND_PlaySound(1,sklick);

                    int a=strlen(Button[wParam].slideshow);
                    char *option = new char[a+L_SLIDE+work_dir_len+4];
                    strcpy(option,&quot;/slideshow=&quot;);
                   // MessageBox(hwnd,option,&quot;DIR&quot;,0);
                    strncat(option,work_dir,work_dir_len+1);
                    strncat(option,&quot;slideshows\\&quot;,L_SLIDE);
                    strncat(option,Button[wParam].slideshow, strlen(Button[wParam].slideshow)); 
                    //MessageBox(hwnd,work_dir,&quot;DIR&quot;,0);
                    ShellExecute(0,&quot;open&quot;,iview_dir,option,&quot;&quot;,SW_SHOWNORMAL);
                    //MessageBox(hwnd,work_dir,&quot;DIR&quot;,0);
                    delete option;
                }
}
</code></pre>
<p>Das stammt aus meiner WM_COMMAND Behandlung. Auf Knopfdruck wird von hier aus Irfanview aufgerufen, soll als CD laufen, deshalb das umständliche Stringgecatte. Anscheinend, wird beim Starten des Programms also wenn das Video startet, WM_COMMAND versand. Da ich die Buttons über den default Zweig steuere und wParam als Index für die Buttons benutze wird bei einem nicht definiert wParam zustande ein ungültiger Vorgang gestartet. Sowas ist natürlich eigentlich nicht gewünscht, aber da ich das Video eh nur im AboutDialog laufen lassen will und das im Hauptframe nur zum Testen war (das hat man dann davon), ist das gar nicht so schlimm, denn im Dialog gehts jetzt. <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>
<p>Kann mir trotzdem einer sagen, warum da WM_COMMAND versand wird oder wie ich vielleicht die Buttonbehandlung besser machen kann. Damit ich sowas aus dem Weg gehn könnte?</p>
<p>danke schön, auch wenn ichs jetzt selbst &quot;gelöst&quot; hab. <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/682050</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/682050</guid><dc:creator><![CDATA[MS_Noob]]></dc:creator><pubDate>Tue, 28 Dec 2004 14:37:11 GMT</pubDate></item><item><title><![CDATA[Reply to Merkwürdiges Verhalten von Animate_Play(); on Tue, 28 Dec 2004 14:41:58 GMT]]></title><description><![CDATA[<p>switch auf wParam für die WM_COMMAND Nachricht macht wenig Sinn. Man muss sich das LOWORD oder das HIWORD angucken. Aber nicht beides zusammen.</p>
<blockquote>
<p>wParam<br />
<strong>The high-order word</strong> specifies the notification code if the message is from a control. If the message is from an accelerator, this value is 1. If the message is from a menu, this value is zero.<br />
<strong>The low-order word</strong> specifies the identifier of the menu item, control, or accelerator.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/682053</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/682053</guid><dc:creator><![CDATA[fffffffffffff]]></dc:creator><pubDate>Tue, 28 Dec 2004 14:41:58 GMT</pubDate></item><item><title><![CDATA[Reply to Merkwürdiges Verhalten von Animate_Play(); on Tue, 28 Dec 2004 15:01:30 GMT]]></title><description><![CDATA[<blockquote>
<p>ACN_START</p>
<p>Notifies an animation control's parent window that the associated AVI clip has started playing. This notification message is sent in the form of a WM_COMMAND message.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/682070</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/682070</guid><dc:creator><![CDATA[ggggggggggggg]]></dc:creator><pubDate>Tue, 28 Dec 2004 15:01:30 GMT</pubDate></item><item><title><![CDATA[Reply to Merkwürdiges Verhalten von Animate_Play(); on Tue, 28 Dec 2004 21:56:30 GMT]]></title><description><![CDATA[<p>Ja, ja, so ist das, wenn man sich nicht so auskennt. Die Tücke lauert wie so oft im Detail.</p>
<p>Danke für die Hilfe, jetzt funktioniert alles so, wie ich es will. <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="🙂"
    /><br />
Super!</p>
<p>Schade, dass der DevC++ debugger noch nicht so gut ist, wie zum Bespiel der von Delphi (nein ich hab nicht mit Object Pascal programmieren gelernt! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> ), sonst hätte ich mir einige Zeit gespart. Naja, man lernt nie aus.</p>
<p>also, danke nochmals, ihr Checker! <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="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/682272</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/682272</guid><dc:creator><![CDATA[MS_Noob]]></dc:creator><pubDate>Tue, 28 Dec 2004 21:56:30 GMT</pubDate></item></channel></rss>