- wxArrayInt selections;
- listbox->GetSelections( selections );
-
- if (selections.GetCount() == 0)
- {
- // indicate that this is a deselection
- event.SetExtraLong( 0 );
- event.SetInt( -1 );
-
- listbox->HandleWindowEvent( event );
-
- return;
- }
- else
- {
- // indicate that this is a selection
- event.SetExtraLong( 1 );
- event.SetInt( selections[0] );
-
- listbox->HandleWindowEvent( event );
- }