Thema: Delphi TButton Farbe

Einzelnen Beitrag anzeigen

Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#4
  Alt 30. Jun 2003, 20:39
Deswegen:
Zitat:
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.
Sprich, du mußt den Button subclassen und in der WndProc vom Button WM_PAINT abfagen und ihn dort selber zeichnen.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat