Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I get multiple selection result set with getpict(
Message
From
17/03/2010 12:09:51
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9
OS:
Vista
Miscellaneous
Thread ID:
01425830
Message ID:
01455113
Views:
65
>>>>>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?

If you like. Update the code with any fixes you may need to do and email me a final copy. I will update the download version with credit to you for the debugging. I do not recall who actually wrote the code. It was given to me over ten years ago.
Greg Reichert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform