hi, i'm making a label with
invoke CreateWindowEx, WS_EX_LEFT, addr StaticClass, addr label1, WS_CHILD or WS_VISIBLE or \

SS_LEFT, 5, 130, 400, 200, hwnd, NULL, hInstance, NULL

and there is a grey box around it.

then i added WS_EX_TRANSPARENT to the call but it didn't changed anything :(

how can it get it transparant so that you can see the backgroundcolor through it ?

cya Knighty

P.S. or you could alternatively tell how to change the backgroundcolor of this label ;D
Posted on 2003-05-27 17:02:48 by Knighty
You need to use SetBkMode(<handle to your control>, TRANSPARENT)
Posted on 2003-05-27 20:02:30 by sluggy
Er, no. SetBkMode is for device contexts. You may try returning a handle to a null brush in the parent window's window procedure in response to the WM_CTLCOLORSTATIC message.
Posted on 2003-05-28 12:38:10 by Sephiroth3
Superclass your static then set the default brush color in the WndClassEx structure to the same as your window color. Iczelion has a tutorial on superclassing, can't remember the number...
Posted on 2003-05-28 12:52:34 by donkey
ah thx

i will try it
Posted on 2003-05-28 19:44:44 by Knighty