Button
-
Hallo
wie kann man eigentlich die hintergrund Farbe von Nnicht selbst gemalten Buttons(PUSHBUTTON z.B.) in einem Fenster verendern
danke
-
WM_CTLCOLORBTN im Messagehandler des Fensters abfangen. Mehr Infos dazu findest du in der Platform SDK Doku.
-
Das wird ihm nicht viel helfen:
By default, the DefWindowProc function selects the default system colors for the button. Buttons with the BS_PUSHBUTTON, BS_DEFPUSHBUTTON, or BS_PUSHLIKE styles do not use the returned brush. Buttons with these styles are always drawn with the default system colors. Drawing push buttons requires several different brushes-face, highlight and shadow-but the WM_CTLCOLORBTN message allows only one brush to be returned. To provide a custom appearance for push buttons, use an owner-drawn button.
Er wird ihn wohl selber zeichnen müssen.