Re: getOpenFileName()

new topic     » goto parent     » topic index » view thread      » older message » newer message

Greg Haberek wrote:
> 
> don cole wrote:
> > 
> > VOID=getOpenFileName()
> > 
> > Always open in folder "Documents".
> > 
> > How can I change this?
> 
> You can pass a path to "file" parameter of the function:
> 
> }}}
<eucode>
> VOID = getOpenFileName( 0, "C:\\WINDOWS\\system32\\", {"All Files", "*.*"} )
> </eucode>
{{{

> 
> You *MUST* end the path in a backslash, else Windows will fill in the last
> part
> as the filename to choose.
> 
> HTH,
> 
> -Greg

Thanks Greg and Mike777,

   Now a new problem had popped up.
Here's my code:

filename = getOpenFileName(
                          MainWin,                  -- parent window
                          "H:\\",                         -- no default name
                          {"Dialog Flags", {OFN_ALLOWMULTISELECT},
                            "Rar Files", "*.RAR" ,    -- rar files
                            "All Files", "*.*" } )    -- everything else

It open in H: which is what I want but
now all files show up in the openDialog box not just the .rar files?
With my old code:
filename=getOpenFileName(0,"",   {"Dialog Flags", {OFN_ALLOWMULTISELECT},
                            "Rar Files", "*.RAR" ,    -- rar files
                            "All Files", "*.*" } )    -- everything else


only the .rar files showed up.

Don Cole

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu