How in earth do i get an file and put into a list so that i can play that file whenever i click on it

invoke GetOpenFileName, addr ofn

and then what ?
Posted on 2002-09-15 12:50:53 by Bolle
And then this function fill the OPENFILENAME structure prepared by you.
Then you can do whatever you want to do with filename (ShellExecute for ex.) :)
Posted on 2002-09-15 13:35:50 by masquer
can you give me a sample ?
Posted on 2002-09-15 13:42:13 by Bolle
Something like this


.data
ofn OPENFILENAME <>
FilterString db "All Files",0,"*.*",0
ofnTitle db "Choose the file to open",0
.data?
buf_V db 512 dup (?)
...
.code
...
mov ofn.lStructSize,SIZEOF ofn
push hWd
pop ofn.hWndOwner
push hInstance
pop ofn.hInstance
mov ofn.lpstrFilter, offset FilterString
mov ofn.lpstrFile, offset buf_V
mov ofn.nMaxFile,512
mov ofn.Flags, OFN_FILEMUSTEXIST or OFN_PATHMUSTEXIST or OFN_LONGNAMES or OFN_HIDEREADONLY
mov ofn.lpstrTitle, offset ofnTitle
invoke GetOpenFileName, ADDR ofn
or eax, eax
jz @@finish
invoke SetDlgItemText,hWd,ctrlid,addr buf_V
...
Posted on 2002-09-15 13:53:08 by masquer
can you please put some comments behind the codes ?
it will help me alot
tnx in advance
Posted on 2002-09-15 14:07:03 by Bolle
What exactly comments you need?
I think it's clear enough.
MSDN will help you more. It is just WinAPI usage, not assemler :)
Posted on 2002-09-15 14:11:39 by masquer
MSDN ?

:confused:

:o
Posted on 2002-09-15 14:15:05 by Bolle
See bazik signature :)
MSDN - MicroSoft Developer Network - if you are windows programmer you should know that ;)
http://msdn.microsoft.com/
Posted on 2002-09-15 14:24:04 by masquer

See bazik signature :)
MSDN - MicroSoft Developer Network - if you are windows programmer you should know that ;)
http://msdn.microsoft.com/


:grin:

Bolle,
did you already read some tutorials? Like Iczelion's or Thomas'. That might answer your further questions in advance :)
Posted on 2002-09-15 14:28:05 by bazik
well i try-ed
but uhm well i don't have the patience(or patients) for it
it's like i want to make something and i just go and make it and every thing i don't get i get from other source files but some things i just don't get so i ask them. it's my way of working.

I never use Tuts i learn it by doing it and by asking but i will read the tuts but if i still don't get you will help k ?
Posted on 2002-09-15 14:42:09 by Bolle