Click here to Skip to main content
15,897,371 members
Articles / Programming Languages / C++

Dialog to select and sort data with CListBox

Rate me:
Please Sign up or sign in to vote.
4.60/5 (2 votes)
17 Oct 2013CPOL1 min read 20.8K   419   8  
Dialog box to choose data / Items and sort them
/////////////////////////////////////////////////////////
//Fonctions diverses et utiles
//
//by MaxMax14 13/10/13
//
///////////////////////////////////////////////////////////
//Function_1D.h

#ifndef FUNCTION_1_H
#define FUNCTION_1_H

#include <windows.h>
#include <tchar.h>
#include <stdio.h>
#include <Winnetwk.h>

#include <strsafe.h>	//pour GetOSDisplayString( LPTSTR pszOS)
#define BUFSIZE_2 256	//pour GetOSDisplayString( LPTSTR pszOS)


#include <iostream>
using namespace std;

namespace Func_1  
{
	BOOL FillListBox(CListBox* pListBox, CString sListItems, CString sSep = "," );	//Rempli un CListBox (supprimer les �l�ments et recr�e tout) avec donn�es du CArray2D (colonnes d�finies dans sListColListCtrl)
	CString GetListBox(CListBox* pListBox, CString sSep = ",");	//Renvoi liste des �l�ments du CListBox
	BOOL ListBox_UpItem( CListBox* pListBox );		//Remonte d'une ligne l'�l�ment s�lectionn� : http://www.codeproject.com/Tips/654882/Moving-listbox-items-up-and-down?cmt=512946#cmt2_654882
	BOOL ListBox_DownItem( CListBox* pListBox  );	//Descend d'une ligne l'�l�ment s�lectionn� : http://www.codeproject.com/Tips/654882/Moving-listbox-items-up-and-down?cmt=512946#cmt2_654882
	void GetListBox_Selected( CListBox* pListBox, CArray<int,int> &aArray);	//Renvoi dans aArray les �l�ments s�lectionn�s
	void SetListBox_Selected( CListBox* pListBox, CArray<int,int> &aArray);	//S�lectionne les �lements d�fin dans aArray
}

#endif // FUNCTION_1_H

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
France France
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions