各位专家大家好,我在做一个关于打印对话框中控件输入信息的程序,建立的是面向单对话框的程序,由于只打印一些编辑框中的信息,所以要屏蔽掉一些诸如静态文本信息,请问如何对打印进行设定? 下面是摘录的关于处理打印的一段代码,请问有什么问题?
StartDoc(PrinterDC,&docinfo);
StartPage(PrinterDC);
CDialog* CurrentDlg = (CDialog*)AfxGetMainWnd();
CEdit* CurrentEdit = (CEdit*)CurrentDlg->GetDlgItem(IDC_EDIT1);
CString Item;
RECT* CurrentRect = NULL;
CurrentEdit->GetWindowText(Item);
CurrentEdit->GetWindowRect(CurrentRect);
pDC->TextOut(CurrentRect->left, CurrentRect->top, Item);
EndPage(PrinterDC);
EndDoc(PrinterDC);
我是个处学者,能不能说清楚些,非常感谢!
StartDoc(PrinterDC,&docinfo);
StartPage(PrinterDC);
CDialog* CurrentDlg = (CDialog*)AfxGetMainWnd();
CEdit* CurrentEdit = (CEdit*)CurrentDlg->GetDlgItem(IDC_EDIT1);
CString Item;
RECT* CurrentRect = NULL;
CurrentEdit->GetWindowText(Item);
CurrentEdit->GetWindowRect(CurrentRect);
pDC->TextOut(CurrentRect->left, CurrentRect->top, Item);
EndPage(PrinterDC);
EndDoc(PrinterDC);
我是个处学者,能不能说清楚些,非常感谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货