没有合适的资源?快使用搜索试试~ 我知道了~
通过ActiveX控件方式实现页面的打印控制,这里只是一个简单的例子,具体的实现的方式可以扩展实现。
资源推荐
资源详情
资源评论
void CNkPrintCtrl::InitPrint()
{
// TODO: Add your dispatch handler code here
CFont newFont;
// get the default printer
CPrintDialog dlg(FALSE);
dlg.GetDefaults();
// is a default printer set up?
hdcPrinter = dlg.GetPrinterDC();
if (hdcPrinter == NULL)
{
MessageBox( _T("Buy a printer!"), _T("Buy a printer!"), MB_OK );
return;
}
// create a CDC and attach it to the default printer
if ( attach_flag == 0 ) {
dcPrinter.Attach(hdcPrinter);
attach_flag = 1;
}
// call StartDoc() to begin printing
DOCINFO docinfo;
memset( &docinfo, 0x00, sizeof(docinfo) );
docinfo.cbSize = sizeof(docinfo);
docinfo.lpszDocName = _T("TestPrint");
资源评论
- wwjxiyang202013-06-15没有太多使用价值
- jiajian_222012-12-07对c++还不是太熟悉,学习
iyours
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功