Regrding for Print Options from SDI application
Hi ,
i want to print for sdi screen manually,means,because i didnt choosen
for print tools for during the sdi application creation time so
application itself i added for OnPrint fuction and i followed for
following code,
after that the print dialog is display ,but if i click for print not
printing.
in my application, there is no BeginPrinting,PreparePrinting and
EndPrinting function..
the code loike this....
void CCABS_GUIView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
{
CPrintDialog dlg(FALSE, PD_PAGENUMS | PD_USEDEVMODECOPIES);
dlg.m_pd.nMinPage = dlg.m_pd.nFromPage =1;
dlg.m_pd.nMaxPage = dlg.m_pd.nToPage = 1;
if (dlg.DoModal() == IDOK)
{
// Determine the starting and ending page numbers for the range
// of pages to be printed.
int from_page, to_page;
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("Print from %d to %d\n", from_page, to_page);
}
}
please send me some solution about this..
regards,
ramc