🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Overlay on camera display window

#5632
From: Hans-Jochen Trost
Date: Mon, 25 Jul 2005 17:57
66 lines
3680 bytes
Remy,

   [snip]
>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.

thanks for that tip.

>> >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
   [snip]

Yes, I have found that.  I have not made it clear enough, the window
that should receive the cross hair to overlayand be devoid of a title
bar is the second one, hwndCross.  hwndMain is the main program window
and thus is just happy with all those settings, including the title
bar.  So this definition:

   hwndCross = CreateWindow(szCrosshair, NULL,
                               WS_BORDER,
                               mainRect.left +
                                  GetSystemMetrics(SM_CXBORDER) - 1,
                              	. . .

is the one that does not yield a window without title bar.  It is here
that:
   [snip]
>> 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.

   [snip]
>> 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.

I was wildly speculating that without a specified icon, Windows might
be more willing to drop the title bar, on the grounds that the
application apparently does not care much about it ...

Thanks again for looking this over.

Cheers,        Jochen

hjtrost at microfab dot com


Nil nimium studeo, Caesar, tibi velle placere,
nec scire ut an sis albus an ater homo.
                                          Catullus
Technical Details
Message-ID: <109ae1d9rasaeki5d0eemagjgcst6h1ts3@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <rh03e1pm0o0i7t274u6djcbcdne8m01tna@4ax.com> <42e1926c$1@newsgroups.borland.com> <p21ae11d4tkah2bk701b45u5ap8dn0ud4k@4ax.com> <42e51c6b$1@newsgroups.borland.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: Hans-Jochen Trost <dont-email@but.post-re.ply>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Overlay on camera display window
Date: Mon, 25 Jul 2005 12:57:08 -0500
Organization: MicroFab Technologies, Inc.
Reply-To: dont-email@but.post-re.ply
Message-ID: <109ae1d9rasaeki5d0eemagjgcst6h1ts3@4ax.com>
References: <rh03e1pm0o0i7t274u6djcbcdne8m01tna@4ax.com> <42e1926c$1@newsgroups.borland.com> <p21ae11d4tkah2bk701b45u5ap8dn0ud4k@4ax.com> <42e51c6b$1@newsgroups.borland.com>
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 24.1.60.14
X-Trace: newsgroups.borland.com 1122314225 24.1.60.14 (25 Jul 2005 10:57:05 -0700)
Lines: 66
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail