OT: modifiying windows fileopen dlg?

This forum is meant for anything you would like to share with other visitors
Post Reply
FFF
Posts: 1580
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

OT: modifiying windows fileopen dlg?

Post by FFF »

Guys,
i use a CAD software, written in C++ (i think). The fileopen looks like:
Fileopen.PNG
Fileopen.PNG (55.5 KiB) Viewed 407 times
I sent a feature request:
"The file open dialogue has the preview field on the right (NB, it would be nice if one could scale the area...) - and some buttons. Among others the "Info" which opens the file info dialogue. The whole area below is empty. Couldn't you just show the content, especially title, subject and comment?
It would be really practical if one could scroll up/down in the file list on the left and see the information on the right without any further interaction..."

And got this response:
"Windows won't let us. The problem is that the file selection dialogue is a system dialogue that can only be extended to a limited extent (e.g. additional buttons or the preview). Unfortunately, Windows calculates the position of the additional control elements a little strangely: The position always refers to the minimum file selection dialogue (click on the dialogue at the bottom right and move it small to the top left). Everything that does not fit into this minimal file selection dialogue is then pushed down somewhere by Windows. We have been trying around for a while, but have not found a solution (based on this system dialogue)."

I have no reason to doubt them, but as i know here is where the knowledge is ;-) , i thought i ask for your opinion - is there a viable way to point them to, or would they have to rebuild the whole dlg, (which surely won't happen...)
The only idea i had, would be to open a separate mini-dialog aside, containing my fields of interest and syncing them. But i have no clue neither of C nor system messaging, so i'm a bit shy to suggest this :whistle:
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

OT: modifiying windows fileopen dlg?

Post by wriedmann »

Hi Karl,

AFAIK they are right.
For more functionality you would need to rewrite that dialog completely.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

OT: modifiying windows fileopen dlg?

Post by ic2 »

Hello Karl,

The more advanced the window technology, the less possibilities with a File & folder dialogs. E.g. in WPF Microsoft forgot to implement it at all, so you have to use either the Win32 or the Winforms dialog. For the FileOpenDialog, the Winform dialog has some more properties and methods than the Win32 dialog but it doesn't allow to return an array of multiple files (OpenFiles) anymore, for example. The FolderBrowserDialog is even worse and if you have the already limited version and convert your program for .Net5 it will convert to a dialog which looks like a FileOpenDialog, confusing the user as I have experienced (as I built exactly the same myself to escape the WPF limitations).

This is the Win32 OpenFileDialog:
https://docs.microsoft.com/en-us/dotnet ... ew=net-5.0

and this is the Winforms one:

https://docs.microsoft.com/en-us/dotnet ... ew=net-5.0

Both use sealed classes, not sure who at Microsoft thought this was a good idea.

There are several libs on Github but the ones I checked were not ideal either, required an external DLL and/or consisted of tons of code. I doubt your CAD supplier wants to investigate the options.

Dick
g.bunzel@domonet.de
Posts: 97
Joined: Tue Mar 01, 2016 11:50 am
Location: Germany

OT: modifiying windows fileopen dlg?

Post by g.bunzel@domonet.de »

Karl,

have a look at the FabOpenDialog inside FabPaint by Fabrice.
There is an example of an extension for the Windows FileOpenDialog.
This extension shows 'only' a preview - but you can also add your own buttons.

HTH

Gerhard Bunzel
Attachments
FabPaint-Sample.jpg
FabPaint-Sample.jpg (93.63 KiB) Viewed 407 times
Post Reply