One more Parameter in Getfile()

Creative ideas/suggestions for HMG

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 179 times

Re: One more Parameter in Getfile()

Post by Pablo César » Mon Sep 09, 2013 11:21 pm

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.
Just for your guidance, the syntax is:

GetFile ( acFilter, cTitle, cDefaultPath, lMultiSelect, lNoChangeDir )-->SelectedFileName(s)

If you pass the 4th parameter (lMultiSelect) and without 5th parameter lNoChangeDir, ie., some like this:

GetFile ( acFilter, cTitle, cDefaultPath, lMultiSelect)

You can see Claudio's picture in his message, that you will not need to mess in the source code.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
quartz565
Posts: 522
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Has thanked: 145 times
Been thanked: 13 times
Contact:

Post by quartz565 » Wed Sep 11, 2013 12:09 pm

Thank you all for your replies.

I am sorry for the disturbance but i've just figured out that this behaviour happens only on Windows 2003 server. I've managed to run the Getfile() function succesfully in windows 7.

In Windows 2003 server when you change your view from details to list or large icons for example, the next time you open the dialog it reverts back to details view always.This only happens when using the Getfile() function and not in the native windows enviroment where the dialog always keeps your last settings view.

On the other hand in Windows 7 when you open the dialog it always keeps your last setting. For example if i use the Getfile() function and in the dialog i choose thumbnails the next time i will use the getfile again it will open the Open File dialog with thumbnails view.

I've tried doing the change in the source code that Claudio suggested and rebuilding the library but i didn't see any changes. Although i am cautious if the building was ok.

I've also tried Pablo's suggestion but the result was the same in Windows 2003 Server.

Nikos
Best Regards,
Nikos.

os: Windows Server 2012 - 64
hw: HP Server E5606, 2.13GHz, 8.00 GB - Intel Xeon CPU

User avatar
quartz565
Posts: 522
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Has thanked: 145 times
Been thanked: 13 times
Contact:

Post by quartz565 » Sun Sep 15, 2013 8:44 pm

After that, I think I owe to those who want to offer help to mention in what environment I'm working (OS and hardware) my examples, so that they don't lose their precious time.:idea:
I'm gonna begin immediately. :)
Best Regards,
Nikos.

os: Windows Server 2012 - 64
hw: HP Server E5606, 2.13GHz, 8.00 GB - Intel Xeon CPU

Post Reply