INFO: OFN_EXPLORER from 32-bit Thunk Brings Up Old CommDlg
PSS ID Number: 140726
Article Last Modified on 11/3/2003
The information in this article applies to:
- Microsoft Windows 98
- Microsoft Windows 95
This article was previously published under Q140726
SUMMARY
You can have a 16-bit application running under Windows 95 take advantage
of the new Explorer-style FileOpen common dialog by thunking up to a 32-bit
DLL, specifying the OFN_EXPLORER style from that DLL, and linking it with
the new COMDLG32.DLL. This, however, causes the old-style dialog to come
up, instead of the new Explorer-style dialog.
MORE INFORMATION
Although the common dialog function is called from the 32-bit DLL,
COMDLG32.DLL detects that the current process is still a 16-bit application
and quickly reverts back to the old-style File Open common dialog. This is
because the new Explorer-style dialog uses multiple threads, which 16-bit
applications do not support.
The only way for a 16-bit application to take advantage of the new Explorer-
style functionality is to port to Win32 and make the call to
GetOpenFileName() directly.
Keywords: kbCmnDlg kbCmnDlgFileO kbCmnDlgSave kbinfo KB140726
Technology: kbWin95search kbWin98 kbWin98search kbZNotKeyword3