Click here to Skip to main content
13,291,084 members (67,237 online)
Click here to Skip to main content


22 bookmarked
Posted 17 Nov 1999

Subselection Dialog

, 17 Nov 1999
Subselection dialog.
//    Project     : any                                                       
//    Customer    : intern                                               
//    Plattform   : WINDOWS 32bit                                            
//    File        : SubSelectionDlg.h                                                       
//    Programmer  : dz, Softtoys                                    
//    Copyright   : Public Domain                                          
//    Contact     :                                       
//    Description : Class for selection and ordering subsets
//    History     : 01.09.1998                                                    

#ifndef AFX_SUBSELECTIONDLG_H__C369BCB1_52CA_11D2_AA4E_0000E818075B__INCLUDED_
#define AFX_SUBSELECTIONDLG_H__C369BCB1_52CA_11D2_AA4E_0000E818075B__INCLUDED_

// SubSelectionDlg.h : Header-Datei
#include "resource.h" 

// Dialogfeld CSubSelectionDlg 

class CSubSelectionDlg : public CDialog
// Construction
	int Include(int nSel);
	virtual void InitListBox2();
	virtual void InitListBox1();
	CSubSelectionDlg(UINT idd, UINT ListBox1ID, UINT ListBox2ID, CWnd* pParent = NULL);   // Standard constructor

	inline void SetAttributes(BOOL bShowAll = TRUE, int nInsertPos = SELDLG_INSERT_AFTER)
					{ m_bShowAll = bShowAll; m_nInsertPos = nInsertPos; };
	// set to true if the origin selection list (list1) has to show all
	// items at all time (e.g the already selected items too)

// Dialogfelddaten
	enum { IDD = IDD_SELECTDLG };

	CListBox*	m_pSelectionList1;
	CListBox*	m_pSelectionList2;

// �berschreibungen
	// Vom Klassen-Assistenten generierte virtuelle Funktions�berschreibungen
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV-Unterst�tzung

// Implementierung
	int m_nInsertPos;

	int getLastSelectedItem(CListBox* p);
	int getFirstSelectedItem(CListBox * p);

	BOOL m_bShowAll; // when TRUE the origin box is not reduced by the selected items but 
	                 // always contains ALL items
	int m_nLastDeletedItem;

	UINT m_nListBox1ID;
	UINT m_nListBox2ID;

	// Generierte Nachrichtenzuordnungsfunktionen
	afx_msg void OnExclude();
	afx_msg void OnInclude();
	afx_msg void OnMovedown();
	afx_msg void OnMoveup();
	afx_msg void OnSelectAll();
	afx_msg void OnDblclkSelectionList1();
	afx_msg void OnDblclkSelectionList2();
	virtual BOOL OnInitDialog();

// Microsoft Developer Studio f�gt zus�tzliche Deklarationen unmittelbar vor der vorhergehenden Zeile ein.

#endif // AFX_SUBSELECTIONDLG_H__C369BCB1_52CA_11D2_AA4E_0000E818075B__INCLUDED_

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.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Daniel Zuppinger
Chief Technology Officer
Switzerland Switzerland
Professional IT developer since 1983. First projects with Cobol, then Pascal, Modula2, C and since Visual C++ 1.0 also with C++. Works since 1986 as Consultant, between 1990 and 2008 for Infobrain in Switzerland, from 2008 until 2013 for enValue (also Switzerland) and currently I'm working for Comfone (Bern, Switzerland).

Married, two daughters, Hobbies : Paragliding, Orienteering, Mountainbiking, Photography

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.171207.1 | Last Updated 18 Nov 1999
Article Copyright 1999 by Daniel Zuppinger
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid