🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Painting with Windows...

#10644
From: Mark Morrisson
Date: Tue, 06 Apr 2004 19:25
29 lines
1980 bytes
Hi everyone,
I have two questions about the way Windows paints windows. First, I have
subclassed
a group box in order to paint its client area by myself. In the WM_PAINT
handler,
if I call BeginPaint/EndPaint, then Windows doesn't draw the outline of the
group
box. Could you explain me why ? I had to call GetDC/ReleaseDC to solve this
problem.

The other question focuses on static controls. I have created static
controls inside
the group box. In response to a click, I repaint the window by calling
InvalidateRect
and UpdateWindow. In the WM_PAINT handler, the static controls' texts are
changed
with SetWindowText. Though, the final screen superposes the old texts with
the new
ones. For instance, "hello" then "bye" becomes "byelo". All the other
components of
the group box (text drawn with TextOut, lines, etc) are painted fine. Why
don't the
static controls have their background repainted ? I precise that if I
iconize the
application and then open it up again, the static controls are displayed
fine.

Thanks in advance,
Mark
Technical Details
Message-ID: <40730473$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-han1.dfn.de!news-kar1.dfn.de!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,d9cf3e1d5e3d04cb,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-04-06 12:40:10 PST
From: "Mark Morrisson" <mark4@NO_SPAMvoila.fr>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Painting with Windows...
Date: Tue, 6 Apr 2004 21:25:23 +0200
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 212.194.9.68
Message-ID: <40730473$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1081279603 212.194.9.68 (6 Apr 2004 12:26:43 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-han1.dfn.de!news-kar1.dfn.de!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail