🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #9206

Re: CmdLine ParamStr and Folder Shell command parameters

#9206
From: Ian Robertson
Date: Sat, 24 Jul 2004 16:57
46 lines
2421 bytes
>
> I think you missed a line there
> Folder
> Shell
> ContextMenuName
> command
> reg_expand_sz
>

I did miss a line :-)

I have changed my command string slighty for the Folder->Shell->Open With
MP3 Catalogue->command

Folder
    Shell
        Open With MP3 Catalogue   <-- ContextMenuName
                command
                   (default)  REG_SZ  = "G:\Project\ADO Database\MP3
Catalogue v1.0\MP3_Catalogue.exe" "OpenFolder" "%1"

I am adding "OpenFolder" as a way to tell that the program was launched by
this particular command

if (AnsiContainsStr(CommandLine,"OpenFolder"))
{
Application->MessageBox(CommandLine.c_str(),"Message",MB_OK);
}

The shell is passing arguements to my program. When right-clicking a folder
and then clicking "Open With MP3 Catalogue", the program launches and the
message box displays:

"G:\Project\ADO Database\MP3 Catalogue v1.0\MP3_Catalogue.exe" "OpenFolder"
"G:\Project\ADO Database\MP3 Catalogue v1.0"

so the CommandLine string is getting %1 = G:\Project\ADO Database\MP3
Catalogue v1.0 from shell.

This happens everytime - no matter which folder I right click %1 always
equals "G:\Project\ADO Database\MP3 Catalogue v1.0".
This is the folder of the exe file, not the folder I selected. How do I get
the right folder instead of the folder my app sits in? For instance if I
right-click a folder called "Elvis", how do I get "Elvis" into my
CommandLine string?
Technical Details
Message-ID: <410294dc$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <410229eb$1@newsgroups.borland.com> <iqv4g05vsc1oo5mqgcg3bb2o97cu89vsc2@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,69b2a3e1b54fedf3
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Ian Robertson" <ian.robertson@zoom.co.uk>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <410229eb$1@newsgroups.borland.com> <iqv4g05vsc1oo5mqgcg3bb2o97cu89vsc2@4ax.com>
Subject: Re: CmdLine ParamStr and Folder Shell command parameters
Date: Sat, 24 Jul 2004 17:57:09 +0100
Lines: 60
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 82.2.134.233
Message-ID: <410294dc$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1090688220 82.2.134.233 (24 Jul 2004 09:57:00 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail