Hi, does anyone have an example for the use of GetOpenFileName with OFN_ALLOWMULTISELECT flag?
For the Buffer.... wich size? Allocated through GlobalAlloc or defined in ".data?" ?



[...]
mov ofn.lStructSize, sizeof OPENFILENAME
push hWin
pop ofn.hwndOwner
mov ofn.hInstance, 40000h
mov ofn.lpstrFilter, offset szOFNFilter
mov ofn.lpstrFile, offset szOFNBuffer
mov ofn.nMaxFile, 8192
mov ofn.lpstrTitle, offset szAppName
mov ofn.Flags, OFN_EXPLORER or OFN_FILEMUSTEXIST or OFN_HIDEREADONLY or OFN_ALLOWMULTISELECT

invoke GetOpenFileName, addr ofn
[...]
Posted on 2001-12-29 20:06:59 by bazik
No one? :(
Posted on 2001-12-30 07:46:26 by bazik
never used it actually but this might work ...

mov ofn.lStructSize, sizeof OPENFILENAME
push hWin
pop ofn.hwndOwner
push hInstance
pop ofn.hInstance
mov ofn.lpstrFilter,offset szOFNFilter
invoke GlobalAlloc,GPTR,8192
mov ptMulSel,eax
mov ofn.lpstrFile, offset szOFNBuffer
mov ofn.nMaxFile, 8192
mov ofn.lpstrTitle, offset szAppName
mov ofn.Flags, OFN_EXPLORER or OFN_FILEMUSTEXIST or OFN_HIDEREADONLY or OFN_ALLOWMULTISELECT
invoke GetOpenFileName, addr ofn
mov eax,ptMulSel
add ax,ofn.nFileOffset ; this would be the offset to the first file name
Posted on 2001-12-30 11:21:29 by Allanon
Thanx!
Got it!
Posted on 2001-12-30 16:47:03 by bazik