Article View: borland.public.cppbuilder.nativeapi
Article #16498Re: Problem with window subclassing...
From: Gary Setter
Date: Sun, 11 May 2003 14:04
Date: Sun, 11 May 2003 14:04
34 lines
2298 bytes
2298 bytes
<snip>.. But what intrigued me is that text was displayed all the same... This makes me think that your subclassing did not work. If you want, you can still post a small working sample. > In fact, it's the > SetWindowText function that drew the text. WM_PAINT paints the text. > The SetWindowLong function is the only method I found (with SetProp) to > store the text of a label. SetWindowText and SetDlgItemText are the low level functions for storing text. I've never needed anything else. > > About the multiple labels, of course it prevents me from using the > CTLCOLORSTATIC > methos because it forces me to put lots of "case" statements in the switch > statement... > Since all variables tested in the "case" statements will be HWND, I don't > see any > way to determine its associated color in one instruction... I mean, I'm not > certain > that all these HWND's will form a serie (like 41001, 41002, 41003, etc). > Give the controls you want to work with an ID (see the hMenu param of CreateWindow[Ex]) Then use GetDlgCtrlID in the WM_CTLCOLORSTATIC handler to get the ID back. Hope that helps Gary
Technical Details
Message-ID:
<3ebe58ee@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.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>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-11 07:12:06 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> Subject: Re: Problem with window subclassing... Date: Sun, 11 May 2003 09:04:44 -0500 Lines: 35 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.57 Message-ID: <3ebe58ee@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1052661998 12.84.32.57 (11 May 2003 07:06:38 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail