共用方式為


CMFCKeyMapDialog::OnPrintItem

Called by the framework to print a keyboard mapping item.

virtual int OnPrintItem(
   CDC& dc,
   int nItem,
   int y,
   int cx,
   BOOL bCalcHeight 
) const;

Parameters

  • [in] dc
    The device context of the printer.

  • [in] nItem
    The zero-based index of the item to print.

  • [in] y
    The vertical offset between the top of the page and the position of the item.

  • [in] cx
    The horizontal offset between the left of the page and the position of the item.

  • [in] bCalcHeight
    TRUE to calculate the best height for the print item; FALSE to truncate the print item so that it fits the default space.

Return Value

The height of the printed item.

Remarks

The framework calls this method to print a key map dialog box item. By default, this method prints the item's command name, shortcut keys, and command description.

Requirements

Header: afxkeymapdialog.h

See Also

Reference

CMFCKeyMapDialog Class

Hierarchy Chart