当我点击PrintPreviewDialog中的“Print”按钮时,我想显示PrintDialog(选择打印机)。我已经在printdocument1_BeginPrint中添加了代码,但它无法正常工作
private: System::Void printDocument1_BeginPrint(
System::Object^ sender,
System::Drawing::Printing::PrintEventArgs^ e)
{
if (printDocument1->BeginPrint!=printDocument1->Print->PrintToPreview)
printDialog1->ShowDialog();
}
我使用visual studio 2012 C ++窗体。