On Jun 11 17:36 97, Eric Schreiber of 1:115/327 wrote:
ES> I have an MDI text editor that I'm porting from Delphi 1 to Delphi 3.
ES> The 16-bit version could handle loading an associated *.txt file when
ES> that file was double clicked in File Manager or Explorer. For 16-bit
ES> applications, file and directory names never have embedded spaces.
ES> However, since the ported version is recognized as a 32-bit app,
ES> Win95 is sending it the unadulterated long file names when a file is
ES> double clicked in Explorer. My program parses in file name from the
ES> command line, and when it hits a space character it assumes that's
ES> the complete file name and gives me a 'file not found' error.
ES> Anyone know how to handle accepting long file names on the command
ES> line? Is Win95 feeding the file names with some kind of delimiter?
ES> Thanks in advance.
Try this out, it's a function from XTools or something like that. I used it
with my editor to do what you are talking about with the Explorer.
function strCmdLine : string;
var
i : integer;
begin
Result := '';
for i := 1 to ParamCount do
Result := Result + ParamStr(i) + ' ';
Delete(Result,Length(Result),1);
end;
Hope this helps you out...
Chris
--- Msgedsq 2.2e
---------------
* Origin: Esc1.71 - When you're old enough to drive the bus. (1:157/534.30)
|