home *** CD-ROM | disk | FTP | other *** search
- #include <scl1.h>
- #include <scl1clor.h>
-
- /*********************
- ListWindow example */
-
- char *Items[]={ /* Array of items to display */
- "11111",
- "22222",
- "33333",
- "44444",
- "55555",
- "66666",
- "77777",
- "88888",
- "99999",
- "00000",
- 0, /* terminated with a "0" */
- };
-
- char TagA[10];
-
- main()
- {
- int EMess;
- LWData lw; /* set lw as type LWData */
-
- Cls(7,CLS_ALL);
- ListWindow(LW_INIT,&lw);
- lw.UpperRow=5; /* Set window size */
- lw.LowerRow=9;
- lw.LeftCol=20;
- lw.RightCol=34;
- lw.RColor=WHITE_BLACK+HIGHLIGHT;
-
- lw.TagArray=TagA; /* tag array */
- lw.Array=Items; /* data */
-
- ListWindow(LW_DRAW,&lw); /* draw */
- InitMouse(IM_SHOW);
-
- do
- {
- EMess=ListWindow(LW_ACTIVE,&lw);
- if(EMess==LW_ILLEGAL_KEY)
- LW_MoveTo(&lw);
- }while(EMess != LW_EXIT_KEY);
- }