CRichEditView::SetPaperSize

更新 : 2007 年 11 月

このリッチ エディット ビューの印刷の用紙サイズを設定します。

void SetPaperSize(
   CSize sizePaper 
);

パラメータ

  • sizePaper
    MM_TWIPS 単位での、印刷用の新しい用紙サイズ。

解説

m_nWordWrapWrapToTargetDevice のときは、印刷特性を調整するため、この関数を使った後で WrapChanged を呼び出します。

使用例

BOOL CMyRichEditView::OnPreparePrinting(CPrintInfo* pInfo)
{
   // Set the printing margins (720 twips = 1/2 inch).
   SetMargins(CRect(720, 720, 720, 720));

   // Change the paper orientation to landscape mode
   // See the example for CWinApp::GetPrinterDeviceDefaults
   ((CMyWinApp*)AfxGetApp())->SetLandscapeMode();

   // Change the paper size in the CRichEditView to 
   // reflect landscape mode
   CSize csPaper = GetPaperSize();
   int temp;
   temp = csPaper.cx; csPaper.cx = csPaper.cy; csPaper.cy = temp;
   SetPaperSize(csPaper);

   return DoPreparePrinting(pInfo);
}

必要条件

ヘッダー : afxrich.h

参照

参照

CRichEditView クラス

階層図

CRichEditView::GetPaperSize

CRichEditView::GetMargins

CRichEditView::GetPrintWidth

CRichEditView::GetPrintRect

CRichEditView::GetPageRect

CRichEditView::PrintPage

CRichEditView::WrapChanged

その他の技術情報

CRichEditView のメンバ