Solar OS API - PROC - Functions
8 Kilobytes should be enough for any listbox...
You are here:
Main API ->
Controls API -> Listbox
PROC API_List_Box_Setup STDCALL
USES esi,edi
ARG wnd_handle,item_size,nr_blocks
This function setups the item size and memory allocated for listbox items.
Arguments:
| Argument |
Type |
Description |
|
wnd_handle
|
dword
|
handle of target listbox
|
|
item_size
|
dword
|
size of one listbox item
|
|
nr_blocks
|
dword
|
number of 4K blocks to allocate for listbox items
|
Returns:
Possible errors:
- item size = 0 or < 16
- wrong wnd_handle
- not enough memory
Remarks:
- Default listbox are created with:
- number of blocks = 2; ie 2x4K = 8K of memory for items
- item size = 64bytes. This makes space for 128 items.
- This function will re-alloc memory only if "nr_blocks" is diffrent.
- On each item 12 bytes are used by item_id,icon_id and icon_phase,
the rest is item string