Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I get multiple selection result set with getpict(
Message
From
16/03/2010 20:05:53
 
 
To
24/09/2009 10:17:15
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9
OS:
Vista
Miscellaneous
Thread ID:
01425830
Message ID:
01454984
Views:
54
>>>>Thanks, Greg, that did the trick. Don't think I understand much of the code but as long as it works I'm happy...
>>>>
>>>>Calvin
>>>
>>>Your welcome.
>>
>>Hi Greg,
>>
>>I haven't checked it - could you please tell us what it's based on?
>>
>>Thanks in advance.
>
>Basicly it is the same as the GetFile() function, except with two additional arguments. An argument to tell it how to present the UI, and a argument to initialize the default file. You will find the list of values in a set of #Define statement in the body of the code. If look close to it, you find that it can also be a PutFile() replacement by changing the object method call of oGetFile.GetOpenFileName() to a oGetFile.GetSaveFileName() (I am not sure if it supports multiple filename thou.) The function returns a carriage return/linefeed delimited list of the selected filenames.
>
>Sorry for the lake of comments in the code. I did not write the code. But you can find documentation about the DLL functions used by googling GetOpenFileNameA and GetSaveFileNameA.
>
>
>*-- cheap example
>c=CHR(13)+CHR(10)
>? mgetfile("bmp~Bitmap"+c+"ico~icon"+c+"gif~gif"+c+"jpg~jpeg","text","open",0xFFFFFFFF,"title",.t.,"Test.bmp")
>
Greg,

You specified the first parameter wrong. The description comes first, then the extension which can also exist of several, delimited by a semicolon.
? MGetFile( "Icons and Cursors~*.ico;*.cur" + chr(13)+chr(10) + "Sound Files~*.wav", "Selected", "Select", 0xFFFFFFFF, "Select an icon, cur of wav file", .t., "" )
There are some other problems I encounter. The 2nd and 3rd parameters seem to have no visual effect on my computer (XP). Further, you specified 0xFFFFFFFF. Also seems to have no effect (I specified 0, 1 or 2, as documented for Getfile(), also without effect.)

Should I debug the code?
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform