Send multiples Images to printer - C++

依然范特西╮ 提交于 2019-12-11 01:50:15

问题


I have a folder with .jpg files I want to send all this images to a printer.

I tried with ShellExecute, with two files :

UnicodeString filePath1 = "something1.jpg";
UnicodeString filePath2 = "something2.jpg";
UnicodeString cmd = "print";


ShellExecute(Form1->Handle, cmd.c_str(), filePath1.c_str(), NULL, NULL, SW_SHOWNORMAL);
ShellExecute(Form1->Handle, cmd.c_str(), filePath2.c_str(), NULL, NULL, SW_SHOWNORMAL);

But 2 instances of the Windows printer are created. One for each file. I would like to have a single instance, with the two files : one image per file.

I also tried filePath = "something1.jpg something2.jpg" but its not working.

Thanks.

来源:https://stackoverflow.com/questions/44073316/send-multiples-images-to-printer-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!