Udostępnij za pośrednictwem


CPropExchange::ExchangeFontProp

Exchanges a font property between a storage medium and the control.

virtual BOOL ExchangeFontProp( 
   LPCTSTR pszPropName, 
   CFontHolder& font, 
   const FONTDESC* pFontDesc, 
   LPFONTDISP pFontDispAmbient  
) = 0;

Parameters

  • pszPropName
    The name of the property being exchanged.

  • font
    A reference to a CFontHolder object that contains the font property.

  • pFontDesc
    A pointer to a FONTDESC structure containing values for initializing the default state of the font property when pFontDispAmbient is NULL.

  • pFontDispAmbient
    A pointer to the IFontDisp interface of a font to be used for initializing the default state of the font property.

Return Value

Nonzero if the exchange was successful; 0 if unsuccessful.

Remarks

If the font property is being loaded from the medium to the control, the font's characteristics are retrieved from the medium and the CFontHolder object referenced by font is initialized with them. If the font property is being stored, the characteristics in the font object are written to the medium.

The functions CArchivePropExchange::ExchangeFontProp, CResetPropExchange::ExchangeFontProp, and CPropsetPropExchange::ExchangeFontProp override this pure virtual function.

Requirements

Header: afxctl.h

See Also

Reference

CPropExchange Class

Hierarchy Chart

COleControl::DoPropExchange

CPropExchange::ExchangeBlobProp

CPropExchange::ExchangePersistentProp

CPropExchange::ExchangeProp

Other Resources

CPropExchange Members