Article View: comp.os.ms-windows.programmer.misc
Article #21Re: Background colour in listboxes
From: Pedro Prospero Luis [lugo]
Date: Tue, 27 Oct 1992 13:30
Date: Tue, 27 Oct 1992 13:30
27 lines
1564 bytes
1564 bytes
Leon (kingleon@feline.uucp) wrote: : Tools: Borland C++ 3.1,MS SDK 3.0 : Problem: Trying to alter the background colour of a listbox without : having to handle every listbox message. : Before repainting every control, the parent window receives a WM_CTLCOLOR (the message name may not be exactly like this, but it should be very similar) to ask for a brush to paint the control's background. You should consult the Windows SDK documentation for the exact way to use this message. I use MSC 7.0 with Microsoft Foundation Classes and I defined a member function OnCtlColor that receives the type of the control and the control window handle and should return the brush. Hope it helps Pedro -- Pedro Prospero Luis | Universidade Nova de Lisboa | Internet: ppl@fct.unl.pt Faculdade de Ciencias e Tecnologia | Departamento de Informatica | Fax: (+351) (1) 295-5641 2825 Monte Caparica, PORTUGAL | Phone: (+351) (1) 295-4464 Friends come and go, but enemies accumulate.
Technical Details
Message-ID:
<1992Oct27.133021.5402@fct.unl.pt>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!inesc.inesc.pt!dec4pt.puug.pt!unl!grafikus.fct.unl.pt!pplReferences:
<1992Oct25.195821.13917@feline.uucp>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!inesc.inesc.pt!dec4pt.puug.pt!unl!grafikus.fct.unl.pt!ppl From: ppl@grafikus.fct.unl.pt (Pedro Prospero Luis [lugo]) Subject: Re: Background colour in listboxes Message-ID: <1992Oct27.133021.5402@fct.unl.pt> Sender: news@fct.unl.pt (USENET News System) Organization: Universidade Nova de Lisboa, PORTUGAL X-Newsreader: TIN [version 1.1 PL6] References: <1992Oct25.195821.13917@feline.uucp> Date: Tue, 27 Oct 1992 13:30:21 GMT Lines: 28