Article View: borland.public.cppbuilder.nativeapi
Article #15591Re: Open with dialog
From: Adam Versteegen
Date: Sat, 21 Jun 2003 08:15
Date: Sat, 21 Jun 2003 08:15
46 lines
2629 bytes
2629 bytes
Remy Lebeau (TeamB) wrote:
> "Adam Versteegen" <no@email.com> wrote in message
> news:3ef2a89b@newsgroups.borland.com...
>
> > I then went to look for some info on the 'openas' verb and
> > couldn't find it anywhere. Where abouts is that documented?
>
> It is documented at MSDN:
>
> Extending Shortcut Menus
>
>
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/context.asp
>
> Look at the "Canonical Verbs" section.
Thanks for the link....
I'm still having problems though. When I use the openas verb, shellexecute
is failing and is still returing SE_ERR_NOASSOC. The openas dialog never
actually appears. I've tried a few things, but all have the same result.
Currently
i'm attempting to do it like this:
int ShellExReturnVal = (int)ShellExecute(NULL,
"open",FileLocation.c_str(), NULL, NULL, SW_SHOWDEFAULT);
if(ShellExReturnVal == SE_ERR_ASSOCINCOMPLETE || ShellExReturnVal ==
SE_ERR_NOASSOC)
{
ShellExReturnVal = (int)ShellExecute(NULL, "openas", FileLocation.c_str(),
NULL, NULL, SW_SHOWDEFAULT);
if(ShellExReturnVal <=32)
ShowMessage("Error loading file.");
} else if (ShellExReturnVal <= 32) ShowMessage ("Error loading file");
I put in the extra assignments to int's just so that it was easier for me to
see what was being returned...
Any ideas? It seems odd that the openas verb would return 'no association'
seeing as thats the whole point behind passing in 'openas'.
Any thoughts appreciated.
Vesty.
Technical Details
Message-ID:
<3ef4140b@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!canoe.uoregon.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3ef23b06@newsgroups.borland.com> <3ef248f7$1@newsgroups.borland.com> <3ef2a89b@newsgroups.borland.com> <3ef2ab8c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,863d8bda245bcc45 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-06-21 01:37:34 PST From: "Adam Versteegen" <No@email.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3ef23b06@newsgroups.borland.com> <3ef248f7$1@newsgroups.borland.com> <3ef2a89b@newsgroups.borland.com> <3ef2ab8c$1@newsgroups.borland.com> Subject: Re: Open with dialog Date: Sat, 21 Jun 2003 18:15:12 +1000 Lines: 48 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 202.174.228.150 Message-ID: <3ef4140b@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1056183307 202.174.228.150 (21 Jun 2003 01:15:07 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!canoe.uoregon.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail