Page 1 of 1

Background colour

Posted: Sun Aug 31, 2003 5:46 pm
by Seldon
How can I set a background colour for windows or container gadgets? Thanks in advance for any suggestion.

Re: Background colour

Posted: Mon Sep 01, 2003 8:38 pm
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...

Posted: Tue Sep 02, 2003 6:45 am
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.