Article View: borland.public.cppbuilder.nativeapi
Article #16521Re: Problem with window subclassing...
From: Gary Setter
Date: Mon, 12 May 2003 12:59
Date: Mon, 12 May 2003 12:59
21 lines
2061 bytes
2061 bytes
<snip> > But I guess that subclassing is a bit "cleaner", don't you > think ? > <snip> Clean can mean different things to different people. If the code for changing the text color using subclassing was more straightforward then the code using WM_CTLCOLORSTATIC, then you could say subclassing is cleaner. However, subclassing and handling WM_PAINT gets you involved in more things then you need to. Handling WM_CTLCOLORSTATIC gives you a chance to do what you need to do and nothing more. Generally, I only subclass when I need to trap messages that only go to the control. I had a similar need to yours in one project, used WM_CTLCOLORSTATIC and was happy with the result. Try both methods. See what is clean straightforward and easy to understand for you. Best of luck, Gary
Technical Details
Message-ID:
<3ebf9ac4@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!hermes.visi.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3ebb5ec5$1@newsgroups.borland.com> <3ebb9f7b$1@newsgroups.borland.com> <3ebbd08b@newsgroups.borland.com> <3ebcfa09@newsgroups.borland.com> <3ebd2733@newsgroups.borland.com> <3ebe58ee@newsgroups.borland.com> <3ebe828b@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,2ec9c93be1540300 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-05-12 06:02:35 PST From: "Gary Setter" <setterg@worldnet.att.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <3ebb5ec5$1@newsgroups.borland.com> <3ebb9f7b$1@newsgroups.borland.com> <3ebbd08b@newsgroups.borland.com> <3ebcfa09@newsgroups.borland.com> <3ebd2733@newsgroups.borland.com> <3ebe58ee@newsgroups.borland.com> <3ebe828b@newsgroups.borland.com> Subject: Re: Problem with window subclassing... Date: Mon, 12 May 2003 07:59:16 -0500 Lines: 22 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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: 12.84.32.129 Message-ID: <3ebf9ac4@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1052744388 12.84.32.129 (12 May 2003 05:59:48 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!hermes.visi.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail