다음을 통해 공유


CPrintDialog::m_pd

대화 상자 개체의 특성 멤버를 저장 하는 구조입니다.

PRINTDLG& m_pd;

설명

생성 후에 CPrintDialog 개체를 사용할 수 m_pd 다양 한 대화 상자를 호출 하기 전에 설정 하는 DoModal 멤버 함수.에 대 한 자세한 내용은 m_pd 구조를 참조 하십시오 PRINTDLG 에 있는 Windows SDK.

수정할 경우는 m_pd 데이터 멤버가 직접 모든 기본 동작을 재정의 합니다.

예제

// Display the Windows Print dialog box with "Pages" radio button
// initially selected. "All" and "Pages" radio buttons are
// enabled as well.
CPrintDialog dlg(FALSE, PD_PAGENUMS | PD_USEDEVMODECOPIES);
dlg.m_pd.nMinPage = dlg.m_pd.nFromPage = 1;
dlg.m_pd.nMaxPage = dlg.m_pd.nToPage = 10;
if (dlg.DoModal() == IDOK)
{
   // Determine the starting and ending page numbers for the range 
   // of pages to be printed.

   int from_page = -1, to_page = -1;
   if (dlg.PrintAll())              // print all pages in the document
   {
      from_page = dlg.m_pd.nMinPage;
      to_page = dlg.m_pd.nMaxPage;
   }
   else if (dlg.PrintRange())       // print only a range of pages 
   {                                // in the document 
      from_page = dlg.GetFromPage();
      to_page = dlg.GetToPage();
   }
   else if (dlg.PrintSelection())   // print only the currently selected 
                                    // items
   {
      from_page = to_page = -1;     // -1 to denote unknown yet
   }

   TRACE(_T("Print from %d to %d\n"), from_page, to_page);
}

요구 사항

헤더: afxdlgs.h

참고 항목

참조

CPrintDialog 클래스

계층 구조 차트