Page 1 of 2

One more Parameter in Getfile()

Posted: Thu Sep 05, 2013 2:40 pm
by quartz565
Hi,
I think it would be very useful to set an extra parameter in the function getfile() for the file(s) view in the predefined folder? i.e. 1,2,3,4,5,6 where 1=Details, 2=List, 3=Icons, 4= Tiles, 5=Thumbnails, 6=Filmstrip. This way it wouldn’t be necessary to change this setting from the view menu.

It would make it a lot easier if someone (like my): would like to choose one or more images at once (if you do not know the name of the file...)

Nikos

Re: One more Parameter in Getfile()

Posted: Thu Sep 05, 2013 2:46 pm
by quartz565
It would make it a lot easier if someone (like my): would like to choose one or more images at once (OR if you do not know the name of the IMAGE file...)

Re: One more Parameter in Getfile()

Posted: Thu Sep 05, 2013 3:22 pm
by esgici
quartz565 wrote: I think it would be very useful to set an extra parameter in the function getfile() for the file(s) view in the predefined folder? i.e. 1,2,3,4,5,6 where 1=Details, 2=List, 3=Icons, 4= Tiles, 5=Thumbnails, 6=Filmstrip. This way it wouldn’t be necessary to change this setting from the view menu.

It would make it a lot easier if someone (like my): would like to choose one or more images at once (OR if you do not know the name of the IMAGE file...)
I guess acFilter parameter of GetFile() function may meets your need ( at least a portion ) ;)
Screenshoot of GetFileTest.prg
Screenshoot of GetFileTest.prg
GetFileTest.jpg (46.17 KiB) Viewed 5017 times
GetFileTest.zip
Source files of GetFileTest
(843 Bytes) Downloaded 290 times
Happy HMG'ing :D

Re: One more Parameter in Getfile()

Posted: Fri Sep 06, 2013 9:17 am
by quartz565
Hi,
That’s a very useful utility indeed Esgici. Thanks!

What I mean though is:

When we open a folder by using the getfile() command, in that window the listing of the files is always in “List” view so only the names of the files appear. So if you’d want to have a quick look at some images for example you have to go at the view menu and change it to “Thumbnails”. What I’m trying to find out is if there is an option that can be set to the getfile() command as a parameter which could do that and open the window in “Thumbnails” view.

Re: One more Parameter in Getfile()

Posted: Fri Sep 06, 2013 11:56 am
by esgici
quartz565 wrote: What I mean though is:
...
As far as know, GetFile() function of HMG calls GetOpenFileName() of Windows API.

So, "List View" is normal behavior of Windows.

"View menu" and other views are features of Windows Explorer, not sub-functions.

Maybe an expert would develop a solution for your request.

Anyway you would think develop your own GetFile() function.

When done please share with us.

Happy HMG'ing :D

Re: One more Parameter in Getfile()

Posted: Fri Sep 06, 2013 12:35 pm
by Pablo César
Hi Nikos !

It would be good to have something like this:
Image
or something like this:
Image

But you can do it by yourself, creating a windows, selecting path, showing pictures and multiselecting of files. All depends of your imagination and criativity. ;)

Re: One more Parameter in Getfile()

Posted: Mon Sep 09, 2013 10:21 am
by quartz565
Thanks Esgici,Pablo.

I will try...

Nikos

Re: One more Parameter in Getfile()

Posted: Mon Sep 09, 2013 1:49 pm
by srvet_claudio
quartz565 wrote:Hi,
I think it would be very useful to set an extra parameter in the function getfile() for the file(s) view in the predefined folder? i.e. 1,2,3,4,5,6 where 1=Details, 2=List, 3=Icons, 4= Tiles, 5=Thumbnails, 6=Filmstrip. This way it wouldn’t be necessary to change this setting from the view menu.

It would make it a lot easier if someone (like my): would like to choose one or more images at once (if you do not know the name of the file...)

Nikos
Hi Nikos.

In function C_GETFILE (file C:\hmg.3.1.5\SOURCE\c_dialogs.c, line 196) change:

Code: Select all

int flags = OFN_FILEMUSTEXIST;
for:

Code: Select all

int flags = OFN_FILEMUSTEXIST | OFN_EXPLORER;
and rebuild-lib.

Best regards,
Claudio.

PS: see picture

Re: One more Parameter in Getfile()

Posted: Mon Sep 09, 2013 2:32 pm
by esgici
srvet_claudio wrote: In function C_GETFILE (file C:\hmg.3.1.5\SOURCE\c_dialogs.c, line 196) change:

Code: Select all

int flags = OFN_FILEMUSTEXIST;
for:

Code: Select all

int flags = OFN_FILEMUSTEXIST | OFN_EXPLORER;
and rebuild-lib.
I can't believe :o

Can't be simple as that :shock: :shock: :shock:

Viva HMG, viva Dr. Soto :D

Re: One more Parameter in Getfile()

Posted: Mon Sep 09, 2013 5:26 pm
by esgici
srvet_claudio wrote:...
and rebuild-lib.
I couldn't rebuild :(

Will we hope a new release ? :oops:

Best regards :D