get printer status............
-
before sending info for printing using CPrintDialog how to check whether selected printer(using printer dialog) is ready to print(attached to server) . i m using following code for printdialog call and getting selected printer name but unable to check status of selected print is there some method ??
bool bNewDlg = true;
// if no special printer-dialog is given, we take the standard printer-dialog
if (m_printDlg == NULL)
{
m_printDlg = new CPrintDialog(FALSE,PD_DISABLEPRINTTOFILE);
bNewDlg = false;
}ASSERT(m\_printDlg != NULL); if (PrinterName == NULL) { // which printer ist desired, and how much copies? if (m\_printDlg->DoModal() == IDCANCEL) return (-1); m\_hprinter = m\_printDlg->GetPrinterDC(); CString cs; cs= m\_printDlg->GetDeviceName(); // AfxMessageBox(cs); m\_hprinter=m\_printDlg->GetPrinterDC(); if(m\_hprinter==NULL) return; m\_numCopies = m\_printDlg->GetCopies ();
-
before sending info for printing using CPrintDialog how to check whether selected printer(using printer dialog) is ready to print(attached to server) . i m using following code for printdialog call and getting selected printer name but unable to check status of selected print is there some method ??
bool bNewDlg = true;
// if no special printer-dialog is given, we take the standard printer-dialog
if (m_printDlg == NULL)
{
m_printDlg = new CPrintDialog(FALSE,PD_DISABLEPRINTTOFILE);
bNewDlg = false;
}ASSERT(m\_printDlg != NULL); if (PrinterName == NULL) { // which printer ist desired, and how much copies? if (m\_printDlg->DoModal() == IDCANCEL) return (-1); m\_hprinter = m\_printDlg->GetPrinterDC(); CString cs; cs= m\_printDlg->GetDeviceName(); // AfxMessageBox(cs); m\_hprinter=m\_printDlg->GetPrinterDC(); if(m\_hprinter==NULL) return; m\_numCopies = m\_printDlg->GetCopies ();
What about calling
GetPrinter(hPrinter, 2, ...)
?"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch