2

下面的代码在 Windows 8 Microsoft Reader 中打开一个 .pdf 文件,但它不打印该文档。如果无法从 Reader 的命令行完成打印,请告诉我们此代码执行。

SHELLEXECUTEINFO seInfo;
ZeroMemory(&seInfo, sizeof(seInfo));
seInfo.cbSize = sizeof(seInfo);
seInfo.fMask = SEE_MASK_NOCLOSEPROCESS|SEE_MASK_FLAG_DDEWAIT;
seInfo.lpDirectory = NULL;
seInfo.lpClass = NULL;
seInfo.lpIDList = NULL;
seInfo.nShow = SW_NORMAL;
seInfo.hwnd = ::GetForegroundWindow();
seInfo.lpVerb       = _T("open");
seInfo.lpFile       = (const _TCHAR *)szShortPath;//File name including the path
seInfo.lpParameters = _T("/p");
ShellExecuteEx(&seInfo);
4

1 回答 1

1

看起来 Microsoft Reader 应用程序没有注册 print 或 printto 动词。可能>>因为在 PrintManager 类中没有用于自动打印的方法。我建议>>>当PDF文件类型的注册程序不>>>>没有注册pint或printto动词时禁用打印功能,并指示用户更改默认的>>>>>PDF文件程序。

于 2012-11-30T13:34:32.743 回答