Ver Mensaje Individual
  #2  
Antiguo 06-05-2004
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Reputación: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Declaración de tipos:

Código Delphi [-]
type
  TFontStyle = (fsBold, fsItalic, fsUnderline, fsStrikeOut);
  TFontStyles = set of TFontStyle;

La propiedad Style es de tipo TFontStyles. Tengo entendido que internamente un conjunto (set of) se guarda como un byte. Haciendo una prueba me ha funcionado esto:

Código Delphi [-]
var
  Style: Byte;

...

Style := Byte(Font.Style) // Para guardar el valor
Font.Style := TFontStyles(Style); // Para recuperar el valor

De esta manera simplemente guardas Style (un byte) en el registro de Windows.

// Saludos
Responder Con Cita