コード例 #1
0
ファイル: sandbox2.cpp プロジェクト: paxunix/sandbox
/*
	Puts the atom text associated with pLB's currently selected item into psz.  cb is
    max buffer size (including terminating NULL).  L is the list to check for the atom.
	Works with comboboxes too.
	If nIndex is not -1, the nIndex'th element is processed instead.
*/
void GetBoxSel(PTListBox pLB, TList<TValPair>& L, char *psz, int cb, int nIndex)
{
	int n;
	PTValPair pV;

	if (nIndex == -1)
	{
		n = pLB->GetSelIndex();
		if (n == -1)
		{
			psz = "";
			return;
		}
    }
	else
       	n = nIndex;

	pV = L.nth(n);
	GetAtomName(pV->Atom, psz, cb);
}	//GetBoxSel