diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-12-28 20:24:50 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-12-28 20:24:50 +0100 |
commit | 09795a01ef859f072920de9df974d1b03b9ab9a4 (patch) | |
tree | 4d05907fc37f1bd781e506f5e196f7435aeec0ab /app/wlib/mswlib/mswlist.c | |
parent | 5b4163d8c76b03f0d31b09866aa4bd06b4d8d804 (diff) |
New upstream version 4.2.4aupstream/4.2.4a
Diffstat (limited to 'app/wlib/mswlib/mswlist.c')
-rw-r--r-- | app/wlib/mswlib/mswlist.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/app/wlib/mswlib/mswlist.c b/app/wlib/mswlib/mswlist.c index 968624a..18fa92d 100644 --- a/app/wlib/mswlib/mswlist.c +++ b/app/wlib/mswlib/mswlist.c @@ -285,6 +285,39 @@ void wListDelete( } +/** + * Select all items in list. + * + * \param bl IN list handle + * \return + */ + +void wListSelectAll( wList_p bl ) +{ + wIndex_t inx; + listData *ldp; + + // mark all items selected + SendMessage( bl->hWnd, + LB_SETSEL, + (WPARAM)TRUE, + (DWORD)-1L ); + + // and synchronize the internal data structures + wListGetCount(bl); + for ( inx=0; inx<bl->count; inx++ ) { + ldp = (listData*)SendMessage( bl->hWnd, + (bl->type==B_LIST?LB_GETITEMDATA:CB_GETITEMDATA), + inx, 0L ); + ldp->selected = TRUE; + SendMessage( bl->hWnd, + (UINT)bl->type==B_LIST?LB_SETITEMDATA:CB_SETITEMDATA, + (WPARAM)inx, + (DWORD)ldp ); + } +} + + wIndex_t wListGetCount( wList_p bl ) { @@ -333,6 +366,8 @@ wIndex_t wListGetSelectedCount( } + + wIndex_t wListAddValue( wList_p b, const char * value, |