🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.multimedia
Article #526

Re: OTHER WAY

#526
From: Hans Galema
Date: Mon, 08 Dec 2003 09:30
78 lines
3345 bytes
Edward wrote:
>    I have two layers of programs "MY WEBCAMCAP" and "OTHER  PROGRAM WHERE I
> SHOW THE VIDEO" first i try capture BMP and make other program read those
> BMP after i try to put video direct on program.

What has a BMP to do with a video ?

>         I trying to made a another way to my program work showing the image
> direct on the DESKTOP but i have problem of FLICKER using:

Please explain where the flicker resides.

>        HWND hForm = GetDesktopWindow() ;

Please tell where you need a HWND for first.

> Using   HWND hForm = FindWindow("MYPROG",NULL);  doenst work.

What is "MYPROG" ?
Is it "MY WEBCAMCAP" or  "OTHER  PROGRAM WHERE I SHOW THE VIDEO"

Which program is executing that statement ?

> ANY IDEIA?

Please start to explain better what is going on.

> My question is: How to capture video from a webcam without use FORM or
> DESKTOP like Handle.

Until now you did not anything with FORM or DESKTOP. Do you mean the
use of a TForm ? Or using GetDesktopWindow() ? Then you should
have told also where you needed the handle for.

> void __fastcall TFormPrincipal::FormCreate(TObject *Sender)

Better put all the code in the constructor. FormCreate() can be
tricky to use.


>   AVICapDllHandle = LoadLibrary( "AVICAP32.DLL" );

Please supply the type of used variables.

I see that you only very much later in your code check if the library
is loaded. Would not it be better to check that right now?

>   //  HWND hForm = FormPrincipal->Handle;

If you wanted to use that that better:

	HWND hForm = Handle;

>   ctImg=0;

This is never used inyour code. Please post as little code as possible
to reproduce the problem. (But with all types, that compiles).

>   if(AVICapDllHandle == 0)
>   {
>     MessageBox ( NULL, "LoadLibrary:\nAVICAP32.DLL not found.", "Error FS
> 002", MB_ICONSTOP );
>   }

After this statement you go on. Is that what should be done ?

>   hWndC = capCreateCaptureWindow("CamWin", WS_CHILD | WS_VISIBLE, 330, 250,
> tamXVL, tamYVL, hForm, 0 );

Did you try with hForm = NULL already ?

> "Edward" <registrados@via-rs.net> escreveu na mensagem
> news:3fc6476a$1@newsgroups.borland.com...

Here you quoted all the code of your first post.
Please do not quote complete posts. We had read that already.

Hans.
Technical Details
Message-ID: <3fd443e1$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fc6476a$1@newsgroups.borland.com> <3fcd4633$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d0fc,f3d9d5312ab89140
X-Google-Attributes: gid10d0fc,public
X-Google-ArrivalTime: 2003-12-08 01:39:11 PST
Date: Mon, 08 Dec 2003 10:30:50 +0100
From: Hans Galema <dontusethis@dontusethis.nl>
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3.1) Gecko/20030425
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.multimedia
Subject: Re: OTHER WAY
References: <3fc6476a$1@newsgroups.borland.com> <3fcd4633$1@newsgroups.borland.com>
In-Reply-To: <3fcd4633$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 129.125.108.11
Message-ID: <3fd443e1$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1070875617 129.125.108.11 (8 Dec 2003 01:26:57 -0700)
Lines: 79
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail