Brian Somers wrote: > Basically, I’m trying to implement a dual listbox interface quite > similar to what Eric Hansen wrote about in 1999. What I can’t find > anywhere is how to fill the left listbox with the files in a given > directory, although the closest I found was a tutorial in VB out on the > web. I’m trying to use the methods Dir and AddFile, but something’s not > working. I can’t figure out what the Dir method is supposed to return, > nor what parameters/arguments to send. I try AddFile and my app crashes. > I can make AddString work, though.
MSDN is your friend! (Seriously, MSDN is your best bet for figuring out undocumented Win32::GUI methods.) AddFile($path) http://msdn.microsoft.com/en-us/library/bb775165(VS.85).aspx Take note: "The list box to which lParam is added must have been filled by the DlgDirList function." This is presumably why you're crashing Unfortunately, however, Win32::GUI does not expose the DlgDirList function to Perl. (At least, a search of the source files does not find "DlgDirList".) Dir($path, $flags) http://msdn.microsoft.com/en-us/library/bb775185(VS.85).aspx Some notes: 2) The order of parameters is swapped in Win32::GUI. 3) The constants don't seem to be available via Win32::GUI::Constants, so here they are: DDL_READWRITE = 0x00 DDL_READONLY = 0x01 DDL_HIDDEN = 0x02 DDL_SYSTEM = 0x04 DDL_DIRECTORY = 0x10 DDL_ARCHIVE = 0x20 DDL_DRIVES = 0x4000 DDL_EXCLUSIVE = 0x8000 (I hope these are correct - I found them on the web and haven't tested them.) ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/