求一个C++中调用.EXE的程序 大虾帮帮我

来源:百度知道 编辑:UC知道 时间:2024/09/24 02:49:40
用C++编写一个调用.exe文件来处理图片的程序
该.exe文件处理程序需要用convert.exe a.jpg -compress b.tiff 命令(dos的命令)
include <shellapi.h>

#include <iostream>
using namespace std;

int main()
{
ShellExecute(handle,"open",
"C:\\Program Files\\ImageMagick-6.2.7-Q16\\convert.exe", NULL,
NULL, SW_SHOW );
system("convert.exe a.jpg -compress none b.tiff");

cout<< "我的功能是运行一个记事本." <<endl;
return 0;
}
这是我写的 不对
希望大侠给个标准的答案啊

"a.jpg -compress none b.tiff"是参数吗?
是的话,结果在下面
ShellExecute(handle,"open",
"convert.exe", "a.jpg -compress none b.tiff",
C:\\Program Files\\ImageMagick-6.2.7-Q16\\, SW_SHOW );