R
Robbie Hatley
Guest
I have a program that can open certain types of files (such as
yenc-encoded data files) only from within itself, one of the reasons
being that such files have no standard extension, hence the program
requires the user to specify operations to be performed by clicking
one of several buttons in the program's GUI, before opening the file.
Hence trying to use file associations ("MyProg.exe" "%1") won't work,
because the program has no idea of WHAT you want to do with the
file after opening it.
SO, I put a reminder line in the shell in the registry, like so:
KEY: VALUE:
HKEY_CLASSES_ROOT
.ntx (default) = "yenc_data_file"
yenc_data_file (default) = "Yenc-Encoded Data File"
shell (default) = "launch_myprog"
launch_myprog (default) = "Plz launch MyProg manually."
command (default) = "" [empty string]
Since the command is an empty string, clicking it pops up a std
Windows error message:
"This file does not have a program associated with it for
performing this action. Create an association in the
Folder Options control panel."
Which is invalid advice, because file associations simply cannot
work in this situation.
SO, how do i pop up my OWN message instead, say:
"This file cannot be opened through the shell. Please
launch MyProg manually, specify action to be performed,
then navigate to the file from within MyProg."
Preferably this would be accompanied by the "Critical Stop" event
sound (which, on my computer, is Hal9000 saying "Sorry Dave, I'm
afraid I can't do that".)
Basically, I'm asking if there is a service available in Win2K
which can pop up message boxes with user defined text, either
via registry shell commands, or from within scripts or programs?
(Simultaneously playing a selectable event sound would be a bonus.)
Or perhaps there is a way to access the MessageBox API (I think
it's in user32.dll?) more directly? I could do that from within
a C program, but I don't know how to do it from within the registry.
--
Cheers,
Robbie Hatley
lonewolf aatt well dott com
www dott well dott com slant user slant lonewolf slant
yenc-encoded data files) only from within itself, one of the reasons
being that such files have no standard extension, hence the program
requires the user to specify operations to be performed by clicking
one of several buttons in the program's GUI, before opening the file.
Hence trying to use file associations ("MyProg.exe" "%1") won't work,
because the program has no idea of WHAT you want to do with the
file after opening it.
SO, I put a reminder line in the shell in the registry, like so:
KEY: VALUE:
HKEY_CLASSES_ROOT
.ntx (default) = "yenc_data_file"
yenc_data_file (default) = "Yenc-Encoded Data File"
shell (default) = "launch_myprog"
launch_myprog (default) = "Plz launch MyProg manually."
command (default) = "" [empty string]
Since the command is an empty string, clicking it pops up a std
Windows error message:
"This file does not have a program associated with it for
performing this action. Create an association in the
Folder Options control panel."
Which is invalid advice, because file associations simply cannot
work in this situation.
SO, how do i pop up my OWN message instead, say:
"This file cannot be opened through the shell. Please
launch MyProg manually, specify action to be performed,
then navigate to the file from within MyProg."
Preferably this would be accompanied by the "Critical Stop" event
sound (which, on my computer, is Hal9000 saying "Sorry Dave, I'm
afraid I can't do that".)
Basically, I'm asking if there is a service available in Win2K
which can pop up message boxes with user defined text, either
via registry shell commands, or from within scripts or programs?
(Simultaneously playing a selectable event sound would be a bonus.)
Or perhaps there is a way to access the MessageBox API (I think
it's in user32.dll?) more directly? I could do that from within
a C program, but I don't know how to do it from within the registry.
--
Cheers,
Robbie Hatley
lonewolf aatt well dott com
www dott well dott com slant user slant lonewolf slant