🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Problem with window subclassing...

#16621
From: Mark Morrisson
Date: Fri, 09 May 2003 16:02
32 lines
1723 bytes
Hi Gary,
Thanks for your reply. No, I fear I can't handle the WM_CTLCOLORSTATIC
message because I create an array of labels and it wouldn't be smart to test
each
window handle in the switch statement :

case WM_CTLCOLORSTATIC:
{
 HDC hdc = (HDC) wParam;
 HWND hwndCtl = (HWND) lParam;

 switch (hwndCtl)
 {
  case label[0]:
  case label[1]:
  case label[2]:
...
  case label[99]:

  SetTextColor(hdc, RGB(0, 0, 192));
  return 0;
 }
 break;
}

But I'd like to know why the subclassing solution doesn't work... When I
apply it to a
control created in the resource file with CTEXT, for instance, it works
fine. But when
I apply it to a control created on the fly, it doesn't work... Why ?

Mark
Technical Details
Message-ID: <3ebbd08b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3ebb5ec5$1@newsgroups.borland.com> <3ebb9f7b$1@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-09 09:07:36 PST
From: "Mark Morrisson" <mark4@NO_SPAMvoila.fr>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ebb5ec5$1@newsgroups.borland.com> <3ebb9f7b$1@newsgroups.borland.com>
Subject: Re: Problem with window subclassing...
Date: Fri, 9 May 2003 18:02:45 +0200
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 212.194.162.44
Message-ID: <3ebbd08b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1052496011 212.194.162.44 (9 May 2003 09:00:11 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail