home *** CD-ROM | disk | FTP | other *** search
- #include <scl1.h>
- #include <scl1clor.h>
-
- main()
- {
- WData wd;
-
- /* Define a window from rows 5 to 17, columns 19 to 59, with frame
- type 3, white black colors, and with the following styles; save
- screen area, draw a shadow effect, draw a frame, grow when
- opening, shrink when closing and add title */
-
- InitWData(&wd,WHITE_BLACK,W_SAVE | W_SHADOW | W_FRAME | W_GROW | W_SHRINK,5,28,19,73,3,BLACK_WHITE," WINDOW TITLE ");
-
- CreateWindow(&wd); /* create the window */
-
- /* Display centralized text in the first row of the window,
- use HorCenter as column parameter to centralize text
- use HorSize so that the Horizontal window size is used as Count parameter */
-
- WriteWindow(&wd,1,wd.HorCenter,wd.HorSize,W_CENTER,"Text can be\ncentralized...");
-
- WaitTime(300);
-
- /* Display left justified string */
-
- WriteWindow(&wd,5,1,wd.HorSize,W_LEFT,"Left\njustified...");
-
- WaitTime(300);
-
- /* Display right justified string. Use HorSize to know the window right
- column value */
-
- WriteWindow(&wd,8,wd.HorSize-2,wd.HorSize,W_RIGHT,"or right\njustified...");
-
- WaitTime(300);
-
- /* Clear the window */
-
- ClearWindow(&wd);
-
- /* Display string with new lines and tab control codes. Use VerCenter to
- centralize the string vertically */
-
- WriteWindow(&wd,wd.VerCenter,1,wd.HorSize,W_LEFT,"New lines\nand\t\tTab control codes are supported...");
-
- WaitTime(300);
-
- ClearWindow(&wd);
-
- /* this string os longer than window size, it will be clipped */
-
- WriteWindow(&wd,wd.VerCenter,22,wd.HorSize,W_LEFT,"This line will be clipped...");
-
- WaitTime(300);
-
- /* Remove window from screen */
-
- DestroyWindow(&wd);
- }
-
-