TPenStyle - how do save



I would like to save a TPenStyle like psSolid to an .ini file and be able to
retrieve it later. I've tried the following:

var
myStyle: TPenStyle;

savedStyle := Integer(myStyle);

myStyle := TPenStyle(savedStyle);

Is this the correct way to do this?

Thanks in advance.

Andy


.