Pimp.exe Posted November 11, 2007 Posted November 11, 2007 I know this should be simple and to many of you it probably is, but I am using RadASM and have a dialog with a listbox on it. What I want to do is fill this listbox with every .mp3 file in D:\Music. I have tried the invoke DlgDirList and the SendMessage LB_DIR but with no success. Program would either crash or simply give me an empty list box.I did debug it with olly, and still am unable to find out the solution. If anyone could, can I get a working way to do this? Please remember that the less code the better as asm isnt my strongest language. Thanks guys.
zako Posted November 12, 2007 Posted November 12, 2007 (edited) handle dd 0wfd WIN32_FIND_DATA <>folder db "C:\music\*.mp3",0 invoke FindFirstFile,offset folder,offset wfd mov handle,eax .While eax != ERROR_BAD_PATHNAME && eax != NULL invoke GetLastError invoke SendDlgItemMessage, hWin, IDC_LST1, LB_ADDSTRING, handle, offset wfd.cFileName invoke FindNextFile, handle, offset wfd .endw Edited November 12, 2007 by zako
Pimp.exe Posted November 12, 2007 Author Posted November 12, 2007 Awesome. Thanks zako. Worked just fine!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now