Background colour

Everything else that doesn't fall into one of the other PB categories.
Seldon
Enthusiast
Enthusiast
Posts: 405
Joined: Fri Aug 22, 2003 7:12 am
Location: Italia

Background colour

Post by Seldon »

How can I set a background colour for windows or container gadgets? Thanks in advance for any suggestion.
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: Background colour

Post by fsw »

Seldon wrote:How can I set a background colour for windows or container gadgets? Thanks in advance for any suggestion.
Maybe you could look at my OutlookGadget:
viewtopic.php?t=7383

there I use a ContainerGadget with a different color...

I am to provide the public with beneficial shocks.
Alfred Hitshock
Seldon
Enthusiast
Enthusiast
Posts: 405
Joined: Fri Aug 22, 2003 7:12 am
Location: Italia

Post by Seldon »

Thanks a lot. I added the API calls you use in this way:

hGadget=ContainerGadget(2,0,0,486,316,#PB_Container_Single)
hBrush = CreateSolidBrush_(GetSysColor_(#COLOR_3DHILIGHT ) )
SetClassLong_(hGadget, #GCL_HBRBACKGROUND, hBrush)

, though the changement affects ALL the gadgets (buttons, texts, containers) I build in my program. Must the hGadget structure be initialized? If yes, that could explain such effect as if hGadget is
NULL, SetClassLong() maybe changes everything.
Post Reply