Article View: borland.public.cppbuilder.nativeapi
Article #16748Re: WM_NCPAINT - no region to be had
From: Remy Lebeau (TeamB)
Date: Sun, 27 Apr 2003 01:59
Date: Sun, 27 Apr 2003 01:59
26 lines
2210 bytes
2210 bytes
"Chris" <chris@chrischfmouseyREMOVE.karoo.co.uk> wrote in message news:3eab1f63@newsgroups.borland.com... > I just commented it out, I assumed that OldWindowProc is > your code and of course I did not write such a function > on my test. My take on it is that JD used subclassing, and OldWindowProc is a pointer to the previous window procedure that was repleasced with a custom one. > I started a new app and dropped a label on it with it's caption set to > "label1". I created a message map in the header and then dropped your code > snippet into the unit file. You are never calling the base class handling, however. By using a MESSAGE_MAP (which, you could have accomplished the same thing by just overriding WndProc() itself), you're overriding the default handling of the message. If you do not pass the message on to the base class (TForm, in this case), the VCL, as well as windows itself, won't get a chance to process the message as well. Gambit
Technical Details
Message-ID:
<3eab394f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!hermes.visi.com!zeus.visi.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3ea8c4fd$1@newsgroups.borland.com> <3ea93062@newsgroups.borland.com> <3eaa9f2d$2@newsgroups.borland.com> <3eaadb70@newsgroups.borland.com> <3eaafbd2$1@newsgroups.borland.com> <3eab0d33@newsgroups.borland.com> <3eab1440$1@newsgroups.borland.com> <3eab1f63@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,bd52d89ee166c26a X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-04-26 19:02:00 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3ea8c4fd$1@newsgroups.borland.com> <3ea93062@newsgroups.borland.com> <3eaa9f2d$2@newsgroups.borland.com> <3eaadb70@newsgroups.borland.com> <3eaafbd2$1@newsgroups.borland.com> <3eab0d33@newsgroups.borland.com> <3eab1440$1@newsgroups.borland.com> <3eab1f63@newsgroups.borland.com> Subject: Re: WM_NCPAINT - no region to be had Date: Sat, 26 Apr 2003 18:59:52 -0700 Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3eab394f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1051408719 207.175.226.26 (26 Apr 2003 18:58:39 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!hermes.visi.com!zeus.visi.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail