Jump to content
  • Advertisement
Sign in to follow this  
Desdemona

mailto

This topic is 4828 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to add a button in my current Win32 project that allows the user to use their default email client to send an email message. I have it set up like this: WinExec("explorer \"mailto:aaa@aaa.com?subject=aaa\""); This works fine, except that it opens up a bogus browser window also. Does anyone have a better solution for this? Thanks, Joe

Share this post


Link to post
Share on other sites
Advertisement
I tried that also, but it doesnt show -any- windows. I also looking into the command line args for explorer/start, but that didnt yield anything useful either.

Share this post


Link to post
Share on other sites
Maybe ShellExecute instead of WinExec?

ShellExecute("mailto:aaa@aaa.com?subject=aaa");

Share this post


Link to post
Share on other sites
Thanks, that worked. Didn't know about that function:

ShellExecute(m_hWnd, "open", "mailto:aaa@aaa.com?subject=aaa", NULL, NULL, SW_SHOW);

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!