12 Jul 2019 10:38
#23981
The following works under 32 bit but when compiled with /64 the listbox is empty. I have tried passing the number of items (as noted below) but this results in a winio error.
#include <stdlib.h>
#include <windows.h>
// Compile with;
// scc ls.cpp /link
// or
// scc ls.cpp /link /64
int main()
{
char *lb_items[] = {
'Line 1',
'Line 2',
'Line 3',
'Line 4', NULL};
int selection=2;
int numItems=4;
winio('%ca[Listbox test]&');
// Works in 32 bit, 64 bit shows an empty list.
winio('%40.4ls',lb_items,&selection);
// Trying to pass number of items (as per docs) 'Error - Unused arguments in winio call.'
//winio('%40.4ls',lb_items,&numItems,&selection);
return 0;
}