#22002/5/18 13:54:58
ShellExecuteA是shell32.dll(该DLL在系统目录里)里封装的一个函数,可以实现你的功能。
以下的代码可以用自动打开默认的邮件发送程序:
ShellExecuteA(windowhandle, "open","mailto:hellrock@163.net","","",5)
以下的代码可以用自动打开默认的邮件发送程序(有主题):
ShellExecuteA(windowhandle, "open","mailto:hellrock@163.net?Subject=This is the subject","","",5)
以下的代码可以用自动打开默认的邮件发送程序(有主题,抄送):
ShellExecuteA(windowhandle, "open","mailto:hellrock@163.net?Subject=This is the subject&cc=hello@5dmedia.com","","",5)
以下的代码可以用自动打开默认的邮件发送程序(有主题,抄送,密件抄送):
ShellExecuteA(windowhandle, "open","mailto:hellrock@163.net?Subject=This is the subject&cc=hello@5dmedia.com&bcc=rock@rockstudio.com","","",5)
以下的代码可以用自动打开默认的邮件发送程序(有主题,抄送,密件抄送,邮件内容):
ShellExecuteA(windowhandle, "open","mailto:hellrock@163.net?Subject=This is the subject&cc=hello@5dmeida.com&bcc=rock@rockstudio.com&body=This is the body of the mail. This is another sentence.","","",5)
以下的代码可以发送多人:
ShellExecuteA(windowhandle, "open","mailto:hellrock@163net;hellyun@love.com?Subject=This is the subject&body=This is the body of the mail. This is another sentence.","","",5)
以下代码可以抄送多人:
ShellExecuteA(windowhandle, "open","mailto:hellrock@163.net?Subject=This is the subject&cc=hellrock@5dmedia.com;friend@5dmedia.com&body=This is the body of the mail. This is another sentence.","","",5)
以下为ShellExecuteA的API声明相关内容:
Function Name :ShellExecuteA
Parameters:Long,String,String,String,String,Long
Return value :Long