🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Sending mouse click through application?

#4834
From: JD
Date: Tue, 15 Nov 2005 20:15
19 lines
1598 bytes
"vERUs" <andreas_antonsson@hotmail.com> wrote:
>
> [...] if I click on the text in the label the form receives
> focus, is there a way to achieve the same result when
> clicking the label as when clicking the transparent area?

A couple of ideas:

Don't use a label. Instead, override the form's WndProc method
to catch WM_PAINT and then use the win32 API DrawText (after
setting the background mode transparent) to draw the text.

Sublass the label's WndProc method and catch WM_LBUTTONDOWN
and pass it to the form instead. Note that the click point
will be relative to the label. You might also need to do the
same with WM_LBUTTONUP.

~ JD
Technical Details
Message-ID: <437a4fdd$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.moat.net!news.linkpendium.com!news.linkpendium.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <437a0035@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,63439b23932d5aae
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "JD" <nospam@nospam.com>
Sender: "JD" <nospam@nospam.com>
Reply-To: "JD" <nospam@nospam.com>
Subject: Re: Sending mouse click through application?
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 152.163.100.131     
X-Forwarded-For: 172.148.145.237
References:  <437a0035@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <437a4fdd$1@newsgroups.borland.com>
Date: 15 Nov 2005 13:15:09 -0700
X-Trace: newsgroups.borland.com 1132089309 207.105.83.66 (15 Nov 2005 13:15:09 -0700)
Lines: 20
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.moat.net!news.linkpendium.com!news.linkpendium.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail