Botones Cerrar, Minimizar y Maximizar de Windows 10
para pintar el botón temático uso este código:
var
h: HTHEME;
begin
if UseThemes then begin
SetWindowTheme(Handle, 'explorer', nil);
h := OpenThemeData(Handle, 'WINDOW');
if h <> 0 then
try
DrawThemeBackground(h, Canvas.Handle, WP_CLOSEBUTTON, GetAeroState, ClientRect, nil);
finally
CloseThemeData(h);
end;
end
else
DrawFrameControl(Canvas.Handle, ClientRect, DFC_CAPTION, DFCS_CAPTIONCLOSE or GetClassicState)
end;
Este código funciona bien pero el botón pintado se parece al tema de Windows 7, incluso en Windows 8 o 10. ¿Es posible pintar el botón Cerrar usando el tema de Windows 10 u 8?