Open File Dialog 
Author Message
 Open File Dialog

How do you make a Open File dialog using assembly (NASM), such as the ones
in EDIT and QBASIC, etc?  I don't care if it deosn't like good, but how can
you find out the files in a directory, find out the directories, and change
directories?




Sun, 08 Jul 2001 03:00:00 GMT  
 Open File Dialog
The interrupts you'll want to use to get a list of files is INT 21h/AH=4Eh
(Find First Matching File) and INT 21h/AH=4Fh (Find Next Matching File).  For
the specs on these interrupts, check out Ralf Brown's Interrupt List at
ftp://ftp.cs.cmu.edu/afs/cs.cmu.edu/user/ralf/pub/interrupt-list/ .  INT
21h/AH=3Bh will change the directory.

As for making the dialog, you'll probably wanna use text memory at segment
B800h (or B000h if you want to support monochromes and your program detects
one...  then again, let anyone stuck using a monochrome monitor suffer!  =)
)  I'm not sure how you'd want to go about handling the dialog buttons and
menus (let alone {GASP}scroll bars!), and let's not even think about mouse
support...  =)  (If you really want to do mouse support, INT 33h will provide
you all the functions, and you might want to use the turn on/off mouse cursor
calls and install an event service routine to get called when a mouse event
happens, rather than constant polling.)

Good luck, and I hope this helps!
-- Derek

Quote:

> How do you make a Open File dialog using assembly (NASM), such as the ones
> in EDIT and QBASIC, etc?  I don't care if it deosn't like good, but how can
> you find out the files in a directory, find out the directories, and change
> directories?





Sun, 08 Jul 2001 03:00:00 GMT  
 Open File Dialog

says...

Quote:
> How do you make a Open File dialog using assembly (NASM), such as the ones
> in EDIT and QBASIC, etc?  I don't care if it deosn't like good, but how can
> you find out the files in a directory, find out the directories, and change
> directories?

Assuming you're writing your program for DOS, finding
files/directories in a directory involves using DOS functions 4E and
4F.  Changing directories involves using DOS function 3B, and getting
the current directory is done with DOS function 47 (all numbers in
hex).

Since you're apparently just starting out in assembly language, I'll
point out that this might be a bit more than you want to attempt right
away -- to even make a start at it, you'll need to write a routine to
do output in decimal, a routine to enumerate files, and a number of
routines to handle input and output -- things like making something
that looks and acts like a button on-screen is non-trivial all by
itself.



Sun, 08 Jul 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Open File Dialog boxes sort files backwards

2. Open File Dialog

3. Open File Dialog

4. 32-bit open-file dialog

5. Open file dialog box

6. Open File Dialog in Windows

7. opening 'file open' dialog from console

8. File Dialog - Open button (Existing/new file)

9. File dialog for opening multiple files?

10. Selecting multiple files in the file open dialog

11. Multiple file types in open dialog

12. Whitespace, parentheses, methods, and arrays (was: Multiple file types in open dialog)

 

 
Powered by phpBB® Forum Software