请问如何再程序中判断打印机是否已经准备好了,部分代码如下: CPrintDialog dlg(FALSE);

CDC pDC;
if (dlg.DoModal() == IDOK)
{
pDC.Attach(dlg.GetPrinterDC());
}
else
{
return FALSE;
}
pDC.StartDoc("test");如果把打印机关了或者打印机出了问题,怎么提示一下?还有就是怎么样让DoModal的时候不显示打印对话框?