Hi,
I brought this up in January in this thread here
but we never really figured anything out.
I would be interested in knowing if anyone with a Windows 10 machine could try out the "exec" sample. Specifically, does "File -> Open file..." or "File -> Show association for extension..."
work for "jpg" or "png" or "bmp" files for you?
They do not work for most of the Windows 10 machines we have at my office. (Some do, though, and they seem to be those that have been upgraded from Windows 7.)
Note that "File -> Launch file..." always works though.
As I said in the above post from earlier this year, the problem with the first two is that wxFileType::GetOpenCommand() (and similar functions) seem to fail due to "ERROR_NO_ASSOCIATION" from the Windows function AssocQueryString().
The behavior is that wxFileType::GetOpenCommand() returns an empty string.
The "File -> Launch file..." command, on the other hand, uses wxLaunchDefaultApplication() which uses ShellExecuteEx() under the covers.
wxLaunchDefaultApplication works just great except that I could use a way in a couple places in our code to determine if there is an "Open" command rather than actually opening the file.
I have begun to wonder if Windows is not returning open commands for file types like "jpg" or "png" because the default application is a Windows "app" and not a normal program. Such "apps" (which seems to include "Edge" which caused me trouble in the earlier post) are new with Windows 8, 8.1, and 10. But that's just a wild guess.
Thanks for any insight on this,
carl