List Box Related Dialog Functions

 

COS.ListAddString - Adds a string to a list box control

 

On Entry:          <cosCtlId>                   contains the control ID

 

                        <cosCtlText$> contains the string to be added

 

On Exit:            <cosItemId>                contains resulting item index

 

 

COS.ListAddStringData - Same as above but includes an additional 32 bits of data that is stored separately

 

On Entry:          <cosCtlId>                   contains the control ID

 

                        <cosCtlText$> contains the string to be added

 

                        <coswParam>  contains the 32 bits (4 bytes) of data

 

On Exit:

 

 

COS.ListSetCurSel - Selects the current item in a list box

 

On Entry:          <cosCtlId>                   contains the control ID

 

                        <cosItemId>                contains the index of the item to select

On Exit:

 

 

COS.ListSetSel - Selects an item in a multiple-select list box

 

On Entry:          <cosCtlId>                   contains the control ID

 

                        <cosItemId>                contains the index of the item to select

On Exit:

 

 

COS.ListGetCurSel - Returns the index of the currently selected item

 

On Entry:          <cosCtlId>                   contains the control ID

 

On Exit:            <cosItemId>                contains the index of the selected item

 


COS.ListSetItemData - Adds 32 bits of hidden data to a list control item

 

On Entry:          <cosCtlId>                   contains the control ID

 

                        <coslParam>                contains the 32 bits (4 bytes) value

On Exit:

 

 

COS.ListGetItemData - Retrieves the stored 32 bits of hidden item data

 

On Entry:          <cosCtlId>                   contains the control ID

 

On Exit:            <cosFuncResult>          contains 32 bit value

 

 

COS.ListSetTabStops - Set the tab stops for a list box

 

To respond to the COS.ListSetTabStops function, the list box must have been created with the LBS.USETABSTOPS style.

 

On Entry:          <cosCtlId>                   contains the control ID

 

<cosCtlText$>             Is an array of 16 bit integers containing the tab stops, in dialog box units. The tab stops must be sorted in increasing order; back tabs are not allowed.

On Exit:

 

 

COS.ListGetCount - Returns the number of items in a list box

 

On Entry:          <cosCtlId>                   contains the control ID

 

On Exit:            <cosItemCount>          contains the number of items

 

 

COS.ListGetSelCount - Returns the number of items select in a multi-select list box

 

On Entry:          <cosCtlId>                   contains the control ID

 

On Exit:            <cosItemCount>          contains the number of selected items

 

 

COS.ListGetSelItemsEx - Returns a list of selected items in a multi-select list box

 

On Entry:          <cosCtlId>                   contains the control ID

 

                        <cosItemCount>          contains the number of items to get (63 max)

 

On Exit:            <cosCtlText$> contains a list of up to 63 4 byte entries