🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: WM_NCPAINT - no region to be had

#16745
From: Chris
Date: Sat, 26 Apr 2003 22:50
30 lines
2274 bytes
"JD" <nospam@nospam.com> wrote in message
news:3eaafbd2$1@newsgroups.borland.com...
>
> "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> wrote:
> > Please elaborate. [...]
>
>       DWORD dwCount = GetRegionData( hrgn, 0, NULL );
>
> dwCount is always zero so the if( dwCount > 0 ) block is never
<snip>

I just tried your code and it worked for me (well after removing
OldWindowProc( Message )).

The function is called loads of times and

HRGN hrgn = (HRGN) Message.WParam; returns :00000001

when this happens DWORD dwCount = GetRegionData( hrgn, 0, NULL ); returns 0
and the main block doesn't run.

When I move the form around and actually invalidate the form's frame (i.e.
take it off the screen edge) everything works great and the label changes to
"Made it to here".

I know this is not terribly informative, but your code does work (on XP at
any rate), although why it gets the message when the form's frame is not
invalidated is beyond me.

Chris
Technical Details
Message-ID: <3eab0d33@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!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!newsfeed.bc.tac.net!cyclone.bc.net!arclight.uoregon.edu!wn13feed!wn12feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3ea8c4fd$1@newsgroups.borland.com> <3ea93062@newsgroups.borland.com> <3eaa9f2d$2@newsgroups.borland.com> <3eaadb70@newsgroups.borland.com> <3eaafbd2$1@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 16:16:59 PST
From: "Chris" <chris@chrischfmouseyREMOVE.karoo.co.uk>
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>
Subject: Re: WM_NCPAINT - no region to be had
Date: Sat, 26 Apr 2003 23:50:24 +0100
Lines: 32
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: 212.50.170.106
Message-ID: <3eab0d33@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1051397427 212.50.170.106 (26 Apr 2003 15:50:27 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!newsfeed.bc.tac.net!cyclone.bc.net!arclight.uoregon.edu!wn13feed!wn12feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail