From 09795a01ef859f072920de9df974d1b03b9ab9a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 28 Dec 2016 20:24:50 +0100 Subject: New upstream version 4.2.4a --- app/wlib/mswlib/mswlist.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'app/wlib/mswlib/mswlist.c') 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; inxcount; 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, -- cgit v1.2.3