Hi--
How do I call the "open with" dialog in 2000????
I've been using the following code to open a text file with unusual extension for viewing or call the "open with" dialog if user has not registered a favorite viewer/editor:
"openas" isn't documented by MS but it did work until QA upgraded to windows 2000, and now nothing happens if the type isn't registered. I've also tried the version where "open" is used with filename replaced by:
rundll32.exe shell32.dll,OpenAs_RunDLL <<FILENAME>>
which I got from several other sources including a thread here, and again nothing happens. The first example returns SE_ERR_NOASSOC and the second returns ERROR_FILE_NOT_FOUND even though rundll32 and shell32 directories are in PATH and FILENAME (full path btw) exists...
Any idea?
How do I call the "open with" dialog in 2000????
I've been using the following code to open a text file with unusual extension for viewing or call the "open with" dialog if user has not registered a favorite viewer/editor:
Code:
if(int(ShellExecute(m_hWnd,"open",g_awhost_copy,NULL,
NULL,SW_SHOWNORMAL))==SE_ERR_NOASSOC)
ShellExecute(m_hWnd,"openas",g_awhost_copy,NULL,
NULL,SW_SHOWNORMAL);
rundll32.exe shell32.dll,OpenAs_RunDLL <<FILENAME>>
which I got from several other sources including a thread here, and again nothing happens. The first example returns SE_ERR_NOASSOC and the second returns ERROR_FILE_NOT_FOUND even though rundll32 and shell32 directories are in PATH and FILENAME (full path btw) exists...
Any idea?