Article View: borland.public.cppbuilder.nativeapi
Article #12568Re: Running the email default program with ShellExecute
From: Giovanni Benintende
Date: Fri, 28 Nov 2003 04:54
Date: Fri, 28 Nov 2003 04:54
34 lines
2066 bytes
2066 bytes
Very quick answer, Remy!
I forgot to put the quotation marks in the example; the original code was ok.
Now I specified "mailto:" in front of the mail address and the code works great.
Thank you!
Giovanni Benintende
"Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> ha scritto nel messaggio news:3fc6d276@newsgroups.borland.com...
>
> "Giovanni Benintende" <benint@gbsoft.it> wrote in message
> news:3fc6d044@newsgroups.borland.com...
>
> > ShellExecute(Handle, open, Label1->Caption.c_str(), 0, 0,
> SW_SHOWDEFAULT)
>
> The second parameter needs quotation marks:
>
> ShellExecute(Handle, "open", Label1->Caption.c_str(), 0, 0,
> SW_SHOWDEFAULT);
>
> > where Label1->Caption is a current email address.
>
> Did you specify "mailto:" in the front of the string? If not, you need to,
> that's the only way ShellExecute() will recognize it as an email address.
> If you don't put it in the TLabel, then you will have to specify it
> separately, ie:
>
> ShellExecute(Handle, "open", ("mailto:" + Label1->Caption).c_str(), 0,
> 0, SW_SHOWDEFAULT);
>
>
> Gambit
>
>
Technical Details
Message-ID:
<3fc6d52a@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fc6d044@newsgroups.borland.com> <3fc6d276@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,3b8d3cd3765abba9 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-11-27 21:09:00 PST From: "Giovanni Benintende" <benint@gbsoft.it> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fc6d044@newsgroups.borland.com> <3fc6d276@newsgroups.borland.com> Subject: Re: Running the email default program with ShellExecute Date: Fri, 28 Nov 2003 05:54:48 +0100 Lines: 38 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 NNTP-Posting-Host: 82.84.36.6 Message-ID: <3fc6d52a@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1069995306 82.84.36.6 (27 Nov 2003 20:55:06 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail