Use StdFont.pkg Define C_NOTSET_FONTVALUE for -9999 Class cCmdBarFontSettings is a Mixin Procedure CreateFontProperties { Visibility = Private } Property Integer pePrivateBold C_NOTSET_FONTVALUE { Visibility = Private } Property Integer pePrivateItalic C_NOTSET_FONTVALUE { Visibility = Private } Property Integer pePrivateUnderline C_NOTSET_FONTVALUE { Visibility = Private } Property Integer pePrivateStrikeThrough C_NOTSET_FONTVALUE { Visibility = Private } Property String psPrivateTypeFace "" { Visibility = Private } Property Number pnPrivateFontHeight C_NOTSET_FONTVALUE { Visibility = Private } Property Number pnPrivateFontWeight C_NOTSET_FONTVALUE { Visibility = Private } Property Integer pePrivateCharSet C_NOTSET_FONTVALUE End_Procedure { MethodType=Property Category="Appearance" } Procedure Set pbBold Boolean bBold Handle hoFont Get CreateFontObject to hoFont If (hoFont > 0) Begin Set ComBold of hoFont to bBold Send Destroy of hoFont End Set pePrivateBold to bBold End_Procedure { MethodType=Property Category="Appearance" } Function pbBold Returns Integer Handle hoFont Integer eBold Get CreateFontObject to hoFont If (hoFont > 0) Begin Get ComBold of hoFont to eBold Send Destroy of hoFont End Else Begin Get pePrivateBold to eBold End Function_Return eBold End_Function { MethodType=Property Category="Appearance" } Procedure Set pbItalic Boolean bItalic Handle hoFont Get CreateFontObject to hoFont If (hoFont > 0) Begin Set ComItalic of hoFont to bItalic Send Destroy of hoFont End Set pePrivateItalic to bItalic End_Procedure { MethodType=Property Category="Appearance" } Function pbItalic Returns Integer Handle hoFont Integer eItalic Get CreateFontObject to hoFont If (hoFont > 0) Begin Get ComItalic of hoFont to eItalic Send Destroy of hoFont End Else Begin Get pePrivateItalic to eItalic End Function_Return eItalic End_Function { MethodType=Property Category="Appearance" } Procedure Set pbUnderline Boolean bUnderline Handle hoFont Get CreateFontObject to hoFont If (hoFont > 0) Begin Set ComUnderline of hoFont to bUnderline Send Destroy of hoFont End Set pePrivateUnderline to bUnderline End_Procedure { MethodType=Property Category="Appearance" } Function pbUnderline Returns Integer Handle hoFont Integer eUnderline Get CreateFontObject to hoFont If (hoFont > 0) Begin Get ComUnderline of hoFont to eUnderline Send Destroy of hoFont End Else Begin Get pePrivateUnderline to eUnderline End Function_Return eUnderline End_Function { MethodType=Property Category="Appearance" } Procedure Set pbStrikeThrough Boolean bStrikeThrough Handle hoFont Get CreateFontObject to hoFont If (hoFont > 0) Begin Set ComStrikeThrough of hoFont to bStrikeThrough Send Destroy of hoFont End Set pePrivateStrikeThrough to bStrikeThrough End_Procedure { MethodType=Property Category="Appearance" } Function pbStrikeThrough Returns Integer Handle hoFont Integer eStrikeThrough Get CreateFontObject to hoFont If (hoFont > 0) Begin Get ComStrikeThrough of hoFont to eStrikeThrough Send Destroy of hoFont End Else Begin Get pePrivateStrikeThrough to eStrikeThrough End Function_Return eStrikeThrough End_Function { MethodType=Property Category="Appearance" } Procedure Set pnFontHeight Number nFontHeight Handle hoFont Get CreateFontObject to hoFont If (hoFont > 0) Begin Set ComSize of hoFont to nFontHeight Send Destroy of hoFont End Set pnPrivateFontHeight to nFontHeight End_Procedure { MethodType=Property } Function pnFontHeight Returns Number Handle hoFont Number nFontHeight Get CreateFontObject to hoFont If (hoFont > 0) Begin Get ComSize of hoFont to nFontHeight Send Destroy of hoFont End Else Begin Get pnPrivateFontHeight to nFontHeight End Function_Return nFontHeight End_Function { MethodType=Property Category="Appearance" } Procedure Set pnFontWeight Number nFontWeight Handle hoFont Get CreateFontObject to hoFont If (hoFont > 0) Begin Set ComWeight of hoFont to nFontWeight Send Destroy of hoFont End Set pnPrivateFontWeight to nFontWeight End_Procedure { MethodType=Property Category="Appearance" } Function pnFontWeight Returns Number Handle hoFont Number nFontWeight Get CreateFontObject to hoFont If (hoFont > 0) Begin Get ComWeight of hoFont to nFontWeight Send Destroy of hoFont End Else Begin Get pnPrivateFontWeight to nFontWeight End Function_Return nFontWeight End_Function { MethodType=Property Category="Appearance" } { EnumList="OLEANSI_CHARSET, OLEDEFAULT_CHARSET, OLESYMBOL_CHARSET" } Procedure Set peCharSet Short eCharSet Handle hoFont Get CreateFontObject to hoFont If (hoFont > 0) Begin Set ComCharset of hoFont to eCharSet Send Destroy of hoFont End Set pePrivateCharSet to eCharSet End_Procedure { MethodType=Property } Function peCharSet Returns Short Handle hoFont Short eCharSet Get CreateFontObject to hoFont If (hoFont > 0) Begin Get ComCharset of hoFont to eCharSet Send Destroy of hoFont End Else Begin Get pePrivateCharSet to eCharSet End Function_Return eCharSet End_Function { MethodType=Property Category="Appearance" } Procedure Set psTypeFace String sTypeFace Handle hoFont Get CreateFontObject to hoFont If (hoFont > 0) Begin Set ComName of hoFont to sTypeFace Send Destroy of hoFont End Set psPrivateTypeFace to sTypeFace End_Procedure { MethodType=Property Category="Appearance" } Function psTypeFace Returns String Handle hoFont String sTypeFace Get CreateFontObject to hoFont If (hoFont > 0) Begin Get ComName of hoFont to sTypeFace Send Destroy of hoFont End Else Begin Get psPrivateTypeFace to sTypeFace End Function_Return sTypeFace End_Function Procedure InitFontSettings Integer eBold eItalic eUnderline eStrikeTrough Handle hoFont String sTypeFace Number nFontHeight nFontWeight Short eCharSet Get pePrivateBold to eBold Get pePrivateItalic to eItalic Get pePrivateUnderline to eUnderline Get pePrivateStrikeThrough to eStrikeTrough Get psPrivateTypeFace to sTypeFace Get pnPrivateFontHeight to nFontHeight Get pnPrivateFontWeight to nFontWeight Get pePrivateCharSet to eCharSet Get CreateFontObject to hoFont If (hoFont > 0) Begin If (eItalic <> C_NOTSET_FONTVALUE) Begin Set ComItalic of hoFont to eItalic End If (eBold <> C_NOTSET_FONTVALUE) Begin Set ComBold of hoFont to eBold End If (eUnderline <> C_NOTSET_FONTVALUE) Begin Set ComUnderline of hoFont to eUnderline End If (eStrikeTrough <> C_NOTSET_FONTVALUE) Begin Set ComStrikethrough of hoFont to eStrikeTrough End If (nFontHeight <> C_NOTSET_FONTVALUE) Begin Set ComSize of hoFont to nFontHeight End If (nFontWeight <> C_NOTSET_FONTVALUE) Begin Set ComWeight of hoFont to nFontWeight End If (eCharSet <> C_NOTSET_FONTVALUE) Begin Set ComCharset of hoFont to eCharSet End If (sTypeFace <> "") Begin Set ComName of hoFont to sTypeFace End Send Destroy of hoFont End End_Procedure End_Class