🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.programmer
1 messages
1 total messages Started by Neil Tue, 21 Jul 1992 13:02
listbox problem.
#400
Author: Neil
Date: Tue, 21 Jul 1992 13:02
50 lines
1756 bytes
the following code for some reason only pulls the first selected item from the listbox,and 
I cannot figure out why it does not do all of them...

Any suggestions are appreciated.
 Thank you.

Here is the code:

void Move()
{	int selNum;
	int index;
	char text[256]; 
	PSZ selection, 
		newp,
		oldp;
	char newst[256];
	char oldst[256];

	text[0]=NULL;
	newst[0]=NULL;
	oldst[0]=NULL;
	selection = (PSZ) text;

	selNum = SHORT1FROMMR( WinSendMsg(hwndList,
				LM_QUERYSELECTION,
				MPFROMSHORT( LIT_FIRST ),
				NULL ));

	while  ( selNum != LIT_NONE)
	{	WinSendMsg(hwndList,
			LM_QUERYITEMTEXT,
			MPFROM2SHORT( selNum,sizeof(text)),
			MPFROMP( selection ));	
	 	strcat( newst, p2);
		if (newst[strlen(newst) -1] != '\\' )
			strcat( newst, "\\" );
		strcat( newst, selection);
		strcpy( oldst,  p1);
		if (oldst[strlen(oldst) -1] != '\\' )
			strcat( oldst, "\\" );
		strcat( oldst,  selection);
		newp = (PSZ) newst;
		oldp = (PSZ) oldst;
		DosMove(oldp, newp, 0L);
		selNum=SHORT1FROMMR(WinSendMsg(hwndList,
                                            LM_QUERYSELECTION,
                                            MPFROMSHORT(selNum),
                                            0L));
	};
};
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads