1.system("\"D:\\Program Files (x86)\\Tencent\\QQ\\Bin\QQ.exe\"");
函数功能: 同步执行windows命令
参数: 可执行文件路径 我的电脑windows10 路径上有空格 这个函数是执行不了 加引号也不能执行
百度百科:https://baike.baidu.com/item/system/15078602?fr=aladdin
2.ShellExecuteA(0,"open","QQ.exe",0,0,6);
函数功能:异步打开一个进程 一个文件夹 还可以打开url
百度百科:https://baike.baidu.com/item/ShellExecute/5788449?fr=aladdin
3.HWND FindWindow(LPCSTR Ipclassname,LPCSTR IPwindowname)
函数功能:通过类名和窗口名称查找对话框句柄。不搜索子窗口。
成功返回窗口句柄。失败返回NULL(ps:对于一些不了解的程序 windows 有一个spy工具 可以查看 窗口的类名可窗口名称等信息)。
4.setwindowpos(HWND hWnd,HWND hWndInsertAfter,int X,int Y,int cx,_In_ int cy, UINTuFlags)
函数功能:改变窗口的尺寸 、位置 、等
百度百科:https://baike.baidu.com/item/SetWindowPos/6376849?fr=aladdin
5.showwindow(hwnd , sw_hide|sw_show)
函数功能:显示和隐藏窗口