<?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[Probleme mit Videocapture]]></title><description><![CDATA[<p>Hi,<br />
ich habe Probs beim Capturen mit der AVICap WindowClass.<br />
Habe mir mithilfe der MSDN und diesem Forum folgenden Code zusammengeschustert (wobei das meiste noch der Standardcode von Dev-Cpp is):</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;Vfw.h&gt;

/*  Declare Windows procedure  */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);

/*  Make the class name into a global variable  */
char szClassName[ ] = &quot;Webcam Testkrams&quot;;

int WINAPI WinMain (HINSTANCE hThisInstance,
                    HINSTANCE hPrevInstance,
                    LPSTR lpszArgument,
                    int nFunsterStil)

{
    HWND hwnd;               /* This is the handle for our window */
    MSG messages;            /* Here messages to the application are saved */
    WNDCLASSEX wincl;        /* Data structure for the windowclass */

    /* The Window structure */
    wincl.hInstance = hThisInstance;
    wincl.lpszClassName = szClassName;
    wincl.lpfnWndProc = WindowProcedure;      /* This function is called by windows */
    wincl.style = CS_DBLCLKS;                 /* Catch double-clicks */
    wincl.cbSize = sizeof (WNDCLASSEX);

    /* Use default icon and mouse-pointer */
    wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
    wincl.lpszMenuName = NULL;                 /* No menu */
    wincl.cbClsExtra = 0;                      /* No extra bytes after the window class */
    wincl.cbWndExtra = 0;                      /* structure or the window instance */
    /* Use Windows's default color as the background of the window */
    wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;

    /* Register the window class, and if it fails quit the program */
    if (!RegisterClassEx (&amp;wincl))
        return 0;

    /* The class is registered, let's create the program*/
    hwnd = CreateWindowEx (
           0,                   /* Extended possibilites for variation */
           szClassName,         /* Classname */
           &quot;Windows App&quot;,       /* Title Text */
           WS_OVERLAPPEDWINDOW, /* default window */
           CW_USEDEFAULT,       /* Windows decides the position */
           CW_USEDEFAULT,       /* where the window ends up on the screen */
           544,                 /* The programs width */
           375,                 /* and height in pixels */
           HWND_DESKTOP,        /* The window is a child-window to desktop */
           NULL,                /* No menu */
           hThisInstance,       /* Program Instance handler */
           NULL                 /* No Window Creation data */
           );

    /* Make the window visible on the screen */
    ShowWindow (hwnd, nFunsterStil);

    /* Run the message loop. It will run until GetMessage() returns 0 */
    while (GetMessage (&amp;messages, NULL, 0, 0))
    {
        /* Translate virtual-key messages into character messages */
        TranslateMessage(&amp;messages);
        /* Send message to WindowProcedure */
        DispatchMessage(&amp;messages);
    }

    /* The program return-value is 0 - The value that PostQuitMessage() gave */
    return messages.wParam;
}

/*  This function is called by the Windows function DispatchMessage()  */

LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    static HWND hwndVideo;

    switch (message)                  /* handle the messages */
    {
        case WM_CREATE : 
               hwndVideo = capCreateCaptureWindow( (LPSTR)&quot;WebCam&quot;, 
                                                    WS_CHILD| WS_VISIBLE | WS_MAXIMIZE, 
                                                    0, 0, CW_USEDEFAULT, CW_USEDEFAULT,(HWND) hwnd, (int) 3); 
               return 0 ;

        case WM_DESTROY:
            PostQuitMessage (0);       /* send a WM_QUIT to the message queue */
            break;
        default:                      /* for messages that we don't deal with */
            return DefWindowProc (hwnd, message, wParam, lParam);
    }

    return 0;
}
</code></pre>
<p>Habe ebenfalls die libvfw32.a included.</p>
<p>Der Code is natürlich noch nciht ausreichend für nen vollständiges Capturen, aber ich wollte schonmal zur Fehlersuche compilen und bekomme folgenden Fehler:</p>
<p>86 C:\Dokumente und Einstellungen\NobodysNightmare\Eigene Dateien\C++ Files\Webcam\main.cpp <strong>`capCreateCaptureWindow' undeclared (first use this function)</strong></p>
<p>Nur wie kommt der zustande?<br />
Ich hab mir nen paar Beispielsources durchgelesen, aba nirgends ne weitere Datei gefunden die ich includen müsste. In der MSDN steht auch nur diese Datei und die lib.</p>
<p>Weiß eina von euch Rat?</p>
<p>Auron</p>
<p>edit: was noch wichtig sein könnte: Ich verwende Dev-Cpp Version 4.9.9.1</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/107921/probleme-mit-videocapture</link><generator>RSS for Node</generator><lastBuildDate>Wed, 01 Jul 2026 18:33:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/107921.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 24 Apr 2005 14:46:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Probleme mit Videocapture on Sun, 24 Apr 2005 14:47:44 GMT]]></title><description><![CDATA[<p>Hi,<br />
ich habe Probs beim Capturen mit der AVICap WindowClass.<br />
Habe mir mithilfe der MSDN und diesem Forum folgenden Code zusammengeschustert (wobei das meiste noch der Standardcode von Dev-Cpp is):</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;Vfw.h&gt;

/*  Declare Windows procedure  */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);

/*  Make the class name into a global variable  */
char szClassName[ ] = &quot;Webcam Testkrams&quot;;

int WINAPI WinMain (HINSTANCE hThisInstance,
                    HINSTANCE hPrevInstance,
                    LPSTR lpszArgument,
                    int nFunsterStil)

{
    HWND hwnd;               /* This is the handle for our window */
    MSG messages;            /* Here messages to the application are saved */
    WNDCLASSEX wincl;        /* Data structure for the windowclass */

    /* The Window structure */
    wincl.hInstance = hThisInstance;
    wincl.lpszClassName = szClassName;
    wincl.lpfnWndProc = WindowProcedure;      /* This function is called by windows */
    wincl.style = CS_DBLCLKS;                 /* Catch double-clicks */
    wincl.cbSize = sizeof (WNDCLASSEX);

    /* Use default icon and mouse-pointer */
    wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
    wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
    wincl.lpszMenuName = NULL;                 /* No menu */
    wincl.cbClsExtra = 0;                      /* No extra bytes after the window class */
    wincl.cbWndExtra = 0;                      /* structure or the window instance */
    /* Use Windows's default color as the background of the window */
    wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;

    /* Register the window class, and if it fails quit the program */
    if (!RegisterClassEx (&amp;wincl))
        return 0;

    /* The class is registered, let's create the program*/
    hwnd = CreateWindowEx (
           0,                   /* Extended possibilites for variation */
           szClassName,         /* Classname */
           &quot;Windows App&quot;,       /* Title Text */
           WS_OVERLAPPEDWINDOW, /* default window */
           CW_USEDEFAULT,       /* Windows decides the position */
           CW_USEDEFAULT,       /* where the window ends up on the screen */
           544,                 /* The programs width */
           375,                 /* and height in pixels */
           HWND_DESKTOP,        /* The window is a child-window to desktop */
           NULL,                /* No menu */
           hThisInstance,       /* Program Instance handler */
           NULL                 /* No Window Creation data */
           );

    /* Make the window visible on the screen */
    ShowWindow (hwnd, nFunsterStil);

    /* Run the message loop. It will run until GetMessage() returns 0 */
    while (GetMessage (&amp;messages, NULL, 0, 0))
    {
        /* Translate virtual-key messages into character messages */
        TranslateMessage(&amp;messages);
        /* Send message to WindowProcedure */
        DispatchMessage(&amp;messages);
    }

    /* The program return-value is 0 - The value that PostQuitMessage() gave */
    return messages.wParam;
}

/*  This function is called by the Windows function DispatchMessage()  */

LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    static HWND hwndVideo;

    switch (message)                  /* handle the messages */
    {
        case WM_CREATE : 
               hwndVideo = capCreateCaptureWindow( (LPSTR)&quot;WebCam&quot;, 
                                                    WS_CHILD| WS_VISIBLE | WS_MAXIMIZE, 
                                                    0, 0, CW_USEDEFAULT, CW_USEDEFAULT,(HWND) hwnd, (int) 3); 
               return 0 ;

        case WM_DESTROY:
            PostQuitMessage (0);       /* send a WM_QUIT to the message queue */
            break;
        default:                      /* for messages that we don't deal with */
            return DefWindowProc (hwnd, message, wParam, lParam);
    }

    return 0;
}
</code></pre>
<p>Habe ebenfalls die libvfw32.a included.</p>
<p>Der Code is natürlich noch nciht ausreichend für nen vollständiges Capturen, aber ich wollte schonmal zur Fehlersuche compilen und bekomme folgenden Fehler:</p>
<p>86 C:\Dokumente und Einstellungen\NobodysNightmare\Eigene Dateien\C++ Files\Webcam\main.cpp <strong>`capCreateCaptureWindow' undeclared (first use this function)</strong></p>
<p>Nur wie kommt der zustande?<br />
Ich hab mir nen paar Beispielsources durchgelesen, aba nirgends ne weitere Datei gefunden die ich includen müsste. In der MSDN steht auch nur diese Datei und die lib.</p>
<p>Weiß eina von euch Rat?</p>
<p>Auron</p>
<p>edit: was noch wichtig sein könnte: Ich verwende Dev-Cpp Version 4.9.9.1</p>
]]></description><link>https://www.c-plusplus.net/forum/post/774251</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/774251</guid><dc:creator><![CDATA[Auron_X]]></dc:creator><pubDate>Sun, 24 Apr 2005 14:47:44 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Videocapture on Sun, 24 Apr 2005 14:51:43 GMT]]></title><description><![CDATA[<p>melde das doch den entwickerln von mingw. kannst du bei sourceforge in den bug report eintragen. hab ich auch gemacht und es wurde hinzugefügt in der nächsten version.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/774256</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/774256</guid><dc:creator><![CDATA[.........]]></dc:creator><pubDate>Sun, 24 Apr 2005 14:51:43 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Videocapture on Sun, 24 Apr 2005 14:53:36 GMT]]></title><description><![CDATA[<p>verwendet der standardmäßig mingw?<br />
hmpfk... ich weiß nur, dass der das mitinstalled hat... ich kenn ja cnihtmal vor oda nachteile und sowas davon.</p>
<p>Krieg ich Dev-Cpp auch erstmal dazu die Standarddinger zu verwenden? oda hat der nur noch mingw?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/774257</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/774257</guid><dc:creator><![CDATA[Auron_X]]></dc:creator><pubDate>Sun, 24 Apr 2005 14:53:36 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Videocapture on Sun, 24 Apr 2005 15:05:20 GMT]]></title><description><![CDATA[<p>MinGW ist der Compiler der von der IDE Dev-C++ verwendet wird.</p>
<p>Du kannst dir doch selbst die Zeile in den Header schreiben oder mit CreateWindowEx gehts wahrscheinlich auch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/774270</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/774270</guid><dc:creator><![CDATA[.........]]></dc:creator><pubDate>Sun, 24 Apr 2005 15:05:20 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Videocapture on Sun, 24 Apr 2005 15:23:40 GMT]]></title><description><![CDATA[<p>aso... naja, ich dachte der verwendet das Ding nur optional ^^</p>
<p>naja, ich versuchs mir mal selbst reinzuschreiben... wenn ich das hinbekomme werd ich mich erstmal ne Runde wundern.</p>
<p>Schonmal danke für die Hilfe.</p>
<p>Auron</p>
<p>P.S.: Krieg ich Dev-Cpp auch dazu wieda den alten Compiler zu nutzen? (bin der Meinung die haben mal nen anderen benutzt)</p>
<p>P.P.S.: Bzw. hat irgendwer bereits nen Header der das kann, bzw. könnte mir erklären wo ich das da einfügen müsste? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/774278</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/774278</guid><dc:creator><![CDATA[Auron_X]]></dc:creator><pubDate>Sun, 24 Apr 2005 15:23:40 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Videocapture on Sun, 24 Apr 2005 15:28:33 GMT]]></title><description><![CDATA[<p>Header ändern bringt nichts. In der lib ist es auch nicht drin und die kann man ja nicht einfach ändern.</p>
<p>CreateWindowEx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/774291</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/774291</guid><dc:creator><![CDATA[CreateWindowEx]]></dc:creator><pubDate>Sun, 24 Apr 2005 15:28:33 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Videocapture on Sun, 24 Apr 2005 17:23:27 GMT]]></title><description><![CDATA[<p>Dann eben die Funktionen manuell deklarieren und LoadLibary() benutzen...<br />
...ist dann zwar etwas aufwändiger <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=";D"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/774410</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/774410</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Sun, 24 Apr 2005 17:23:27 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Videocapture on Sun, 24 Apr 2005 22:12:00 GMT]]></title><description><![CDATA[<p>die funktion capCreateCaptureWindow ist in libvfw32.a und im libavicap32.a library vom mingw enthalten. Die vfw.h zumindest in der neusten Version(4.9.9.2). Welche Version vom devcpp hast Du denn? Post ma bitte Dein compile log.<br />
Ach ja, Leerzeichen in Pfaden sowie hier: &quot;C:\Dokumente und Einstellungen\NobodysNightmare\Eigene Dateien\C++ Files\Webcam\main.cpp&quot; sollte man beim Dev vermeiden, dessen compiler ist ne unix-portierung und mag die nicht.<br />
Empfohlen wird c:\Projekte\ oder sowas, funzte bei mir aber bisher in allen Verzeichnissen, sofern sie keine Leerzeichen enthielten.</p>
<p>sen$ai</p>
]]></description><link>https://www.c-plusplus.net/forum/post/774582</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/774582</guid><dc:creator><![CDATA[sen$ai]]></dc:creator><pubDate>Sun, 24 Apr 2005 22:12:00 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Videocapture on Mon, 25 Apr 2005 14:14:41 GMT]]></title><description><![CDATA[<p>hmmm...<br />
damit hatte ich BISHER noch keine probs... allerdings wurde auf meine anfrage bei mingw folgendes geantwortet:</p>
<p>Date: 2005-04-25 00:09<br />
Sender: dannysmith<br />
Logged In: YES<br />
user_id=11494</p>
<p>Prototypes added to vfw.h<br />
Danny</p>
<p>wenn ich das nu richtig sehe wurde es also erst hinzugefügt... nur komisch, dass es dann ebi dir drinne is.</p>
<p>Naja, ich werd mir demnächst mal V 4.9.9.2 ziehen.<br />
Damit is das Prob wohl erledigt...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/774993</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/774993</guid><dc:creator><![CDATA[Auron_X]]></dc:creator><pubDate>Mon, 25 Apr 2005 14:14:41 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Videocapture on Mon, 25 Apr 2005 21:05:16 GMT]]></title><description><![CDATA[<p>hm, ich hab grad nochma in die vfw.h reingeguckt, die Funktion ist dort tatsächlich nicht deklariert, ist aber im besagten Lib drin. Von daher glaub ich auch nicht dass es mit der 4.9.9.2 behoben sein wird. Mußt wohl doch selbst den Prototyp in den Header eintragen, aber das sollte zu schaffen sein <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="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/775478</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/775478</guid><dc:creator><![CDATA[sen$ai]]></dc:creator><pubDate>Mon, 25 Apr 2005 21:05:16 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Videocapture on Tue, 26 Apr 2005 14:24:03 GMT]]></title><description><![CDATA[<p>ne, 4992 hilft nix...</p>
<p>also einfach irgendwo reinschreiben? (natürlich innerhalb des #ifdef's), oda sollte ich noch mehr beachten?</p>
<p>Nungut, ich schaue mal... werd dann wohol auch gleich noch alle weiteren fehlenden prototypen adden müssen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/775962</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/775962</guid><dc:creator><![CDATA[Auron_X]]></dc:creator><pubDate>Tue, 26 Apr 2005 14:24:03 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Videocapture on Mon, 27 Jun 2005 07:12:11 GMT]]></title><description><![CDATA[<p>Soll ich jetzt mal &quot;klugscheißen&quot;?</p>
<p>Schreib mal</p>
<pre><code class="language-cpp">#include &lt;vfw.h&gt;
</code></pre>
<p>statt</p>
<pre><code class="language-cpp">#include &lt;Vfw.h&gt;
</code></pre>
<p>dann klappt das auch! (bei mir zumindest) <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="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/817845</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/817845</guid><dc:creator><![CDATA[el Clio]]></dc:creator><pubDate>Mon, 27 Jun 2005 07:12:11 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Videocapture on Mon, 27 Jun 2005 07:14:00 GMT]]></title><description><![CDATA[<p>el Clio schrieb:</p>
<blockquote>
<p>Schreib mal</p>
<pre><code class="language-cpp">#include &lt;vfw.h&gt;
</code></pre>
<p>statt</p>
<pre><code class="language-cpp">#include &lt;Vfw.h&gt;
</code></pre>
</blockquote>
<p>*lol*</p>
]]></description><link>https://www.c-plusplus.net/forum/post/817851</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/817851</guid><dc:creator><![CDATA[ROFLMAO]]></dc:creator><pubDate>Mon, 27 Jun 2005 07:14:00 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Videocapture on Mon, 27 Jun 2005 14:01:22 GMT]]></title><description><![CDATA[<p>dachte das wäre unter Windows egal....<br />
hmmpfk</p>
]]></description><link>https://www.c-plusplus.net/forum/post/818250</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/818250</guid><dc:creator><![CDATA[Auron_X]]></dc:creator><pubDate>Mon, 27 Jun 2005 14:01:22 GMT</pubDate></item></channel></rss>