#if !defined(AFX_NOVELLUSERSELDLG_H__581178C0_07AF_4CCB_941F_5AEDCC36BCE5__INCLUDED_)
#define AFX_NOVELLUSERSELDLG_H__581178C0_07AF_4CCB_941F_5AEDCC36BCE5__INCLUDED_

#include "UserInfoDlg.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// NovellUserSelDlg.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CUserTreeCtrl window

class CUserTreeCtrl : public CTreeCtrl
{
// Construction
public:
	CUserTreeCtrl();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CUserTreeCtrl)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CUserTreeCtrl();

	// Generated message map functions
protected:
	//{{AFX_MSG(CUserTreeCtrl)
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnKillfocus(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
private:
	CUserInfoDlg m_userInfo;
};

/////////////////////////////////////////////////////////////////////////////
// CNovellUserSelDlg dialog

class CNovellUserSelDlg : public CDialog
{
// Construction
public:
	BOOL m_allowNoOwner;
	CNovellUserSelDlg(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CNovellUserSelDlg)
	enum { IDD = IDD_NOVELL_USER_SEL_DIALOG };
	CUserTreeCtrl	m_wndUserTree;
	CString	m_sSelectedUser;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CNovellUserSelDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CNovellUserSelDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSelchangedTreeNds(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	void Cleanup( HTREEITEM hItem );
  void InsertUsers( HTREEITEM hParent, const CUserTreeNode* pContainer );
  static int CALLBACK CompareFunc(
    LPARAM lParam1,
    LPARAM lParam2, 
    LPARAM lParamSort);
};

/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_NOVELLUSERSELDLG_H__581178C0_07AF_4CCB_941F_5AEDCC36BCE5__INCLUDED_)
