Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/08/2005, 17:26
nostromo_
 
Fecha de Ingreso: diciembre-2004
Ubicación: Iquique, Chile
Mensajes: 150
Antigüedad: 19 años, 5 meses
Puntos: 0
Color en Fuente y BK en Button

Holas;

Estoy cambiando el color de la fuente y background de los botones, PushButton, radio:

Tengo lo siguiente:

Código:
static HWND hAstillas;//aUTORADIOBUTTON
hAstillas = GetDlgItem(hwnd,IDC_ASTILLAS);
//Color fuente y Bk en botones
    static COLORREF TextoColorBTNProcesar;
    static COLORREF BkBTNColor;
    static HBRUSH ButtonHBrush;
Código:
case WM_INITDIALOG:
            //desactivar control edit
            activar_ctrl(hCantidad,FALSE);
            // color fuente font y bk en button
            TextoColorBTNProcesar = RGB(0,150,98);
            BkBTNColor = RGB(150,98,0);//GetSysColor(COLOR_BTNFACE);
            ButtonHBrush = CreateSolidBrush(BkBTNColor);
... etc....
case WM_CTLCOLORBTN:
            if((HWND)lp == hAstillas)
            {
                SetTextColor((HDC)wp,TextoColorBTNProcesar);
                SetBkColor((HDC)wp,BkBTNColor);
                return (BOOL) ButtonHBrush;
            }
            break;
case WM_CLOSE:
            DeleteObject(ButtonHBrush);
            salir(2, hwnd);
            break;
No ocurre ningún cambio. Agradecería Ayuda.

Nos vemos.