下面的代码在 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);