summaryrefslogtreecommitdiff
path: root/app/wlib/mswlib/mswlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/wlib/mswlib/mswlist.c')
-rw-r--r--app/wlib/mswlib/mswlist.c35
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,