home *** CD-ROM | disk | FTP | other *** search
- #include <scl1.h>
- #include <scl1clor.H>
-
- /*************************************
- Shows the use of fileboxs functions */
-
- main()
- {
- char Buffer[FB_BUF_SIZE];
- FBData fb2;
- FB3Data fb3;
- FBData fbw;
-
- memset(Buffer,0,sizeof(Buffer));
- InitMouse(IM_SHOW);
-
- FileBox2(FB_INIT,&fb2); /* initialize the FBData structure */
- WFileBox(FB_INIT,&fbw); /* initialize the FBData structure */
- FileBox3(FB_INIT,&fb3); /* initialize the FB3Data structure */
-
- fb2.NColor=fb3.NColor=fbw.NColor=WHITE_BLACK; /* change display colors */
- fb2.RColor=fb3.RColor=fbw.RColor= BLACK_WHITE;
- fb2.Filename=fb3.Filename=fbw.Filename=Buffer; /* buffer to hold dir.info */
-
- /* set files attributes */
-
- fb2.Attrib=fb3.Attrib=fbw.Attrib=F_READ_ONLY+F_HIDDEN+F_SYSTEM+F_DIRECTORY;
-
- FileBox2(FB_DRAW,&fb2); /* display FileBox */
- FileBox2(FB_ACTIVE,&fb2); /* let user make a selection */
-
- /* sort by name and place directories first in the list */
-
- fb3.SortType=FB_NAME+FB_DIR_FIRST;
-
- FileBox3(FB_DRAW,&fb3); /* display FileBox */
- FileBox3(FB_ACTIVE,&fb3); /* let user make a selection */
-
- WFileBox(FB_DRAW,&fbw); /* display Wide FileBox */
- WFileBox(FB_ACTIVE,&fbw); /* let user make a selection */
- }
-
-
-
-