CODFontCompPP Class

class CODFontCompPP: public CPropertyPage

Generates a component font property page.

Defined in: OdFontCompPP.h

Class Members

 CODFontCompPP(int nTypes=-1, OD_FONTPPDATA* pInitData=NULL)

CODFontCompPP Constructor.

 ~CODFontCompPP()

CODFontCompPP Destructor.

OD_FONTPPDATA* m_pInitData

CODFontCompPP Initialization data.

 enum

Property page resource ID.

int m_nStyleSel

Current font style.

protected:

Performs dialog data exchange.

OD_FONTPPDATA* m_pExitData

CODFontCompPP exit data (saved here after dialog window is closed).

int m_nSizeSel

Index of currently selected font point size.

int m_nNameSel

Index of currently selected font facename.

COLORREF m_clrText

Currently selected text color.

void  AddSize(int nHeight)

Adds size to size listbox.

virtual BOOL  OnInitDialog()

Called on dialog initialization.

afx_msg void  OnSelChangeFontnames()

Called when user selects a new font name.

afx_msg void  OnSelChangeFontstyles()

Called when user selects a new font style.

afx_msg void  OnSelChangeFontsizes()

Called when user selects a new font point size.

afx_msg void  OnStrikeout()

Called when the user selects/deselects strikeout effect.

afx_msg void  OnUnderline()

Called when the user selects/deselects underline effect.

afx_msg void  OnPaint()

Called on window paint message.

afx_msg void  OnDestroy()

Called on window destroy.

int m_nFilterTypes

Called when user selects new text color.

int m_nFilterTypes

Filter used to determine which fonts are to be included in listbox (e.g. TRUETYPE_FONTTYPE).

CODFontListBox m_wndFontLB

Font facename listbox.

CODSizeListBox m_wndSizeLB

Font point size listbox.

sfl::SECWellButton m_wndColor

Font color well button.

CFont SampleFont

Sample font.

DWORD m_nCurrentStyle

Currently shown style.

DWORD m_nActualStyle

Actual (selected) font style.

DWORD m_nStyles

Available font styles.

BOOL m_bStrikeOut

Strikeout effect selection.

BOOL m_bUnderline

Underline effect selection.

CString m_strFontSize

Selected font size (current selection).

BOOL m_bFaceNameChanged

Indicates if current font facename has been changed by user.

BOOL m_bStyleChanged

Indicates if current font style has been changed by user.

BOOL m_bPtSzChanged

Indicates if current font point size has been changed by user.

BOOL m_bStrikeOutChanged

Indicates if strikeout effect has been changed by user.

BOOL m_bUnderlineChanged

Indicates if underline effect has been changed by user.

BOOL m_bColorChanged

Indicates if text color has been changed by user.

void  UpdateSampleFont()

Updates shown sample font.

void  FillFacenameList()

Fills the facename list with valid (available) font facenames.

void  FillSizeList()

Fills the font point size list with valid point sizes for the selected font facename.

static int CALLBACK  EnumFontFamiliesCallBack(ENUMLOGFONT* lpelf, NEWTEXTMETRIC* lpntm, int FontType, LPARAM lParam)

First callback for retrieving font information from system via EnumFontFamilies().

static int CALLBACK  EnumFontFamiliesCallBack2(ENUMLOGFONT* lpelf, NEWTEXTMETRIC* lpntm, int FontType, LPARAM lParam)

Second callback for retrieving font information from system via EnumFontFamilies().

void  InitializePP(OD_FONTPPDATA* pData)

Initializes property page with values passed in  OD_FONTPPDATA structure.

void  GetData(OD_FONTPPDATA& changes)

Retrieves user selections in passed  OD_FONTPPDATA structure.

void  ResetChgFlags()

Resets all property-changed flags.