🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #2517

Re: Control class colors

#2517
From: Paul Bonneau
Date: Wed, 08 May 1991 16:40
30 lines
1615 bytes
In article <917360id@cctb.wa.com> curt@cctb.wa.com (Curt Johnson) writes:
>In article <1991May3.213512.7371@ulowell.ulowell.edu> dpelland@hawk.ulowell.edu (David Pelland) writes:
>| 	Could someone please enlighten me as to how I can set
>| 	the background color of a control class window.  I've
>| 	tried doing it at creation time, and by processing the
>| 	WM_CTLCOLOR message.  I must be doing something wrong.
>| 	Any help is appreciated.
>| 
>| 	All I wanted was a red button... :(
>
>Sorry, you can't do it.
>
>All windows will let you change is the color the button
>procedure uses for the WINDOW background, this color is
>placed in 1 pixel in each corner of the button (to give
>it a somewhat rounded look).
>
This is simply not true.  While setting the background brush
may not be enough (depends on the control), you can still
call SetBkColor(wParam, your_color_here) when you get the
WM_CTLCOLOR message.

Also, there is no problem returning a brush handle from a
dialog proc (even though the docs imply that only 0 or
non-zero are significant).

BTW, it sounds like your response is for a windows version
*2* PushButton!

cheers - Paul Bonneau.
Technical Details
Message-ID: <1991May8.164008.11941@hyper.hyper.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau
References: <1991May3.213512.7371@ulowell.ulowell.edu> <917360id@cctb.wa.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.ms.programmer
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau
From: bonneau@hyper.hyper.com (Paul Bonneau)
Subject: Re: Control class colors
Message-ID: <1991May8.164008.11941@hyper.hyper.com>
Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,)
Organization: HyperCube Inc.
References: <1991May3.213512.7371@ulowell.ulowell.edu> <917360id@cctb.wa.com>
Date: Wed, 8 May 1991 16:40:08 GMT