hi evryone

sorry, my eng very poor

GetSaveFileName -> how know what selected combo box filter item?


asm file : *.asm
text file : *.txt

thx
Posted on 2001-12-20 05:50:17 by playh
First, you setup strings that describe the file types, then you put the string address in the OPENFILENAME structure



ofn OPENFILENAME <>
.
szFilter db "All files",0,"*.*",0,
"Assembly files",0,"*.ASM",0,
"Text files",0,"*.TXT",0,0
.
mov ofn.lpstrFilter, OFFSET szFilter


There are some examples included with MASM32, QIKPAD for one. :)
Posted on 2001-12-20 06:19:33 by S/390
Take a look to Icztutes 11-3 or 12.
Posted on 2001-12-20 14:19:33 by CodeLover
nono
i mean
can know selected what item in combo box?
Posted on 2001-12-20 19:26:36 by playh
But you can have a buffer where you store the name of the file. So, in the OPENFILENAME structure you would have lpstrFile initialized with the buffer. Like this:



........
.data
buffer db 260 dup(0); here will be stored name of file
ofn OPENFILENAME <>; Structure
...........................
.......................
.code
example:
.......
.........
mov ofn.lpstrFile, OFFSET buffer ;buffer containing file name
...................
invoke CreateFile,ADDR buffer,\
GENERIC_READ or GENERIC_WRITE ,\
FILE_SHARE_READ or FILE_SHARE_WRITE,\ ;an example
NULL,CREATE_NEW,FILE_ATTRIBUTE_ARCHIVE,\
NULL
mov handle_of_file,eax ;this saves the handle of the file
.................
................
end example


With this code you can know what item has been selected in the combo box. So now you can have all the information you want on that file.

I hope this help, at least it should enlight your problem. :grin:
Posted on 2001-12-20 20:16:34 by CodeLover
qikpad

asm files -> test
text files -> test

i wanna full filename

Intrnet Explorer

web files -> test.htm
text files -> test.txt
Posted on 2001-12-21 04:28:32 by playh