Coming soon!

BlitzPlus Forums/BlitzPlus Programming/Coming soon!

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

But selectedgadgetitem can't return a value for "none selected" as 0, is counted as the first item


In Windows, all controls have item indicies which are zero based. When an item is not selected, SelectedGadgetItem should return -1.

In fact, it should do this already, assuming Mark is using the standard API commands. From the MSDN documentation for LB_GETCURSEL:

In a single-selection list box, the return value is the zero-based index of the currently selected item. If there is no selection, the return value is LB_ERR [-1].