🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #1993

Receiving LN_ENTER with a LS_MULTIPLESEL listbox?

#1993
From: Carl+Chris Samos
Date: Sat, 10 Oct 1992 14:33
40 lines
1869 bytes
Has anyone successfully processed the LN_ENTER notification code with a 
multiple selection listbox?  I needed a multiple selection listbox allows
the user to double click an item in the listbox, and have that item expand
to several more items in the listbox.  Then if the original item they
double clicked was double clicked again, it would remove its subitems.

For example, if the listbox contained:

    Item 1
    Item 2
    Item 3
    Item 4

and the user double clicked Item 2, the listbox would expand to look like this:

    Item 1
    Item 2
       subitem 2.1
       subitem 2.2
       subitem 2.3
    Item 3
    Item 4

Then if they double clicked Item 2, the listbox would return to the previous
state.

The problem is this:  When I receive the LN_ENTER code, I need to know which
item was double clicked.  Since it's multiple selection, other items in the
listbox may be selected, so you can't just send an LM_QUERYSELECTION
message to the listbox.  That will return the first selected item, or the
next selected item, if you send multiple LM_QUERYSELECTION messages.

Any ideas on how to accomplish this?  I spent about 2 hours last night, and
I found a solution, but I'm interested to hear if anybody else has any ideas
on how to do it.  I'll post my solution if anyone is interested.

Thanks in advance.

-Carl Samos
 cjs33278@uxa.cso.uiuc.edu
Technical Details
Message-ID: <Bvwts7.EIF@news.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!swrinde!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!cjs33278

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!swrinde!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!cjs33278
From: cjs33278@uxa.cso.uiuc.edu (Carl+Chris Samos)
Subject: Receiving LN_ENTER with a LS_MULTIPLESEL listbox?
Message-ID: <Bvwts7.EIF@news.cso.uiuc.edu>
Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
Organization: University of Illinois at Urbana
Date: Sat, 10 Oct 1992 14:33:42 GMT
Lines: 41