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 - selstr http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SelStr
Select a string from an array

Header File.....TCXLsel.h

Prototype.......IntT CTYP SelStr(IntT sr, IntT sc, IntT er,IntT ec,
                     BytT bt, AtrT ba, AtrT wa, AtrT sa, ChrP as  ,
                     IntT ie, VfvCP fo);

Source File.....SEL\SELSTR.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)
                as -  Base of array of string pointers
                ie -  Initial Element to default to
                fo -  Function to call when window is opened

Returns.........The array subscript of the selected string.  If an error
                occurred, then -1 (ERR_ARG) 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_INVCOORD  -  Invalid Window Coordinates
                   W_INVBTYPE  -  Invalid Border Type
                   W_STRLONG   -  Window Not Wide Enough To Hold Largest
                      String
                   W_INVPATH   -  Invalid Path Or Path Not Found

Notes...........This function will open up a window and display as many of
                the input strings in it as it can.  The user can use a
                selection bar to move through the strings and select one.
                If all of the strings cannot fit in the window, scrolling
                and paging is allowed. After the selection is made,
                SelStr() will return the array subscript of the string that
                was selected.

Example.........SelStr(LeftRow,32, LeftRow + 5, -1, 0, LGREEN|_RED,
                      LCYAN|_RED, RED|_LGREY, months, 0, _VFVCP(PrePick1));

See Also: Appendix A

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