Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TCXL Database - selfile http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SelFile

Select a file name from sorted list.

Header File.....TCXLsel.h

Prototype.......ChrP CTYP SelFile(IntT sr, IntT sc, IntT er, IntT ec,
                     BytT bt, AtrT ba, AtrT wa, AtrT sa, FlgT ti, ChrP fs,
                     VfvCP fo);

Source File.....SEL\SELFILE.C

Arguments.......sr -  Start Row
                sc -  Start Column
                er -  End Row
                ec -  End Column
                bt -  Border Type (One of the following)
                  BOX_SNG..all single
                  BOX_DBL..all double
                  BOX_VER..horiz single, vert double
                  BOX_HOR..horiz double, vert single
                  BOX_HVY..heavy lines
                  BOX_SPA..spaces  no box
                  BOX_EXP..explode frame on open
                ba -  Border Attribute (See Appendix A)
                wa -  Window Attribute (See Appendix A)
                sa -  Selection Bar Attribute (See Appendix A)
                ti -  Display Filespec Title On Upper Border?  (0=no,
                      1=yes)
                fs -  Filespec to match (ie, "*.*")
                fo -  Function to call when window is opened

Returns.........The address of the string containing the full
                drive:path\filename string of the selected file. If an
                error occurred, NULL will be returned and TcxlErr will be
                set to one of the following:
                   W_ESCPRESS  -  The  Esc  Key Was Pressed
                   W_ALLOCERR  -  Memory Allocation Error
                   W_DOSERROR  -  DOS Error (ie. Invalid Directory)
                   W_INVCOORD  -  Invalid Window Coordinates
                   W_INVBTYPE  -  Invalid Border Type
                   W_STRLONG   -  Window Not Wide Enough To Hold Largest
                      File Name
                   W_NOMATCH   -  No Files Matched Input Filespec
                   W_INVPATH   -  Invalid Path Or Path Not Found

Notes...........This function will open up a window and display as many
                file/directory names in it as it can.  The user can use a
                selection bar to move through the file/directory names and
                select one.  If all of the file/directory names cannot fit
                in the window, scrolling and paging is allowed.  If the
                user selects a directory, SelFile() will change to that
                directory and display the list of files/directories in it.
                After the selection is made, SelFile() will return the
                complete path name of the selected file.

                The file returned by SelFile() is stored in a global
                variable SelNam.  This is allocated on the first call to
                SelFile(), and is not free()'d until the user explicitly
                calls SelFree().

Example.........SelFile(LeftRow, LeftCol - 18, LeftRow + 10, LeftCol + 39,
                      0, LCYAN|_RED, LGREY|_RED, RED|_LGREY, 1, "*.*",
                      _VFVCP(AddShadow));

See Also: Appendix A

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson