Using native Chrome OS FilesApp for file chooser

Esme Povirk (they/them) esme at codeweavers.com
Mon May 17 16:10:08 CDT 2021


I'd say the important ones are GetOpenFileName/GetSaveFileName, and
the Common Item Dialog API introduced in Vista.

With GetOpenFileName, applications can perform customizations by
providing a hook procedure, which would be impossible to translate to
another API. If an application provides a hook, it must be given a
win32 dialog that has a specific layout.
https://docs.microsoft.com/en-us/windows/win32/api/commdlg/nc-commdlg-lpofnhookproc

The Common Item Dialog API also allows applications to perform
customizations, but these are done through a COM interface which could
be passed along to a native API that supported the same features:
https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-ifiledialogcustomize?redirectedfrom=MSDN

I'm guessing, though, that the dbus API does not provide for adding
custom controls of any type to the dialog, so once again you would
have to use a win32 dialog if the application requests customizations.

At best, you're going to be able to replace the dialog in some
applications but not others. To provide the functionality in the
general case, I think you will need a shell extension, but that would
result in some confusing UI. I don't think there's a good solution to
this problem.



More information about the wine-devel mailing list