Color de fondo,no coinicde!

Iniciado por Riki_89D, 23 Abril 2010, 21:38 PM

0 Miembros y 1 Visitante están viendo este tema.

Riki_89D

Hola como estan?

bueno miren esta imagen:




fijense el fondo s blanco pero el control static en donde pone programa para palmyra es como mas gris,intente con esto:

invoke GetDC,handle_del_static
invoke SetBkColor,eax,COLOR_WINDOW



pero nada no cambia,como puedo ponerlos del mismo color?


salu2

MCKSys Argentina

Y con SendMessage?

EM_SETBKGNDCOLOR
The EM_SETBKGNDCOLOR message sets the background color for a rich edit control.

EM_SETBKGNDCOLOR
wParam = (WPARAM) (BOOL) fUseSysColor;
lParam = (LPARAM) (COLORREF) clr;

Parameters
fUseSysColor
Value specifying whether to use the system color. If this parameter is nonzero, the background is set to the window background system color. Otherwise, the background is set to the specified color.
clr
COLORREF structure specifying the color if fUseSysColor is zero.
Return Values
Returns the old background color.


Seria algo así:


invoke GetDC,handle_del_static
invoke SendMessage,eax,EM_SETBKGNDCOLOR,1,0


wParam es 1, por lo que se usa el color por defecto del sistema. Si usas un 0 en wParam, en lParam le deberás pasar el color que quieres, de acuerdo a:


COLORREF
The COLORREF value is a 32-bit value used to specify an RGB color.

Remarks
When specifying an explicit RGB color, the COLORREF value has the following hexadecimal form:

0x00bbggrr

The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero. The maximum value for a single byte is 0xFF.


Saludos!
MCKSys Argentina

"Si piensas que algo está bien sólo porque todo el mundo lo cree, no estás pensando."


Riki_89D

Pues ya esta solucionado ^^

para quien le interese solo habia que procesar el mensaje WM_CTLCOLORSTATIC

i despues configurar con:

invoke SetBkMode,HDC,TRANSPARENT


y listo fuera fondo feo!
xD

salu2