🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #5631

Re: Overlay on camera display window

#5631
From: Remy Lebeau (TeamB)
Date: Mon, 25 Jul 2005 17:05
47 lines
3011 bytes
"Hans-Jochen Trost" <dont-email@but.post-re.ply> wrote in message
news:p21ae11d4tkah2bk701b45u5ap8dn0ud4k@4ax.com...

> I'm dealing with slow computers (industrials, Pentium 166 MHz
> w/ MMX) and am trying to run the frame grabber (which supplies
> the image stream as bitmaps already)  at full speed, i.e., 30 fps.
> I'll try this.

Do the grabbing in another thread so that it is not slowed down by the UI.
Then use a critical section around an in-memory bitmap.  When the grabber
has a new image available, lock the critical section, update the bitmap as
needed, and then unlock the critical section.  In the main thread, whenever
it needs to paint itself, lock the critical section, draw whatever is
currently in the bitmap, and then unlock the critical section.

> >Simply don't give the window the WS_CAPTION style.
>
> That's what I thought, but it refuses to do as told.

You are not doing it correctly.

>     hwndMain = CreateWindow(szAppName, szAppName,
>                                        WS_OVERLAPPEDWINDOW ^
>                                           WS_MAXIMIZEBOX ^WS_SIZEBOX,

WS_OVERLAPPEDWINDOW contains several styles, including WS_CAPTION, but you
are not removing it at all.  That is why you still have a title bar showing.
You are only removing the thick border and the maximize button.  The title
bar, as well as the minimize button and the system menu, still remain.

> It does not matter if I keep this a separate window class, or reuse
> the main window class, and what I put in for the style - WS_BORDER,
> WS_DLGFRAME, WS_OVERLAPPED (which is 0x0L) all give
> the same result, i.e., there is a title bar.

As well there should be, because you are not removing the necessary syles
that contron the title bar.

> I also can set the icon handle to NULL and there still is a title bar.

If you do not provide your own icon then a default one is used.  The
presense of, or lack of, an icon does not control whether a title appears or
not.


Gambit
Technical Details
Message-ID: <42e51c6b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <rh03e1pm0o0i7t274u6djcbcdne8m01tna@4ax.com> <42e1926c$1@newsgroups.borland.com> <p21ae11d4tkah2bk701b45u5ap8dn0ud4k@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5bf0f3f06cc6974f
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <rh03e1pm0o0i7t274u6djcbcdne8m01tna@4ax.com> <42e1926c$1@newsgroups.borland.com> <p21ae11d4tkah2bk701b45u5ap8dn0ud4k@4ax.com>
Subject: Re: Overlay on camera display window
Date: Mon, 25 Jul 2005 10:05:07 -0700
Lines: 49
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <42e51c6b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1122311275 68.69.17.41 (25 Jul 2005 10:07:55 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail