/*===========================================================================
 *
 * CUSTOMLIST.H - 2 April 1999, Dave Humphrey (uesp@m0use.net)
 *
 *=========================================================================*/
#ifndef __CUSTOMLIST_H
#define __CUSTOMLIST_H

#if _MSC_VER > 1000
  #pragma once
#endif


/*===========================================================================
 *
 * Class CCustomList Definition
 *
 * A class based off of the standard list box control with additional
 * features such as popup menus, etc...
 *
 *=========================================================================*/
class CCustomList : public CListBox {

public:
  CMenu   m_Menu;	/* The entire menu containing the popup menu */
  boolean LoseSelect;	/* Lose the currently selected item when lost focus? */

public:

	/* Class Constructor */
  CCustomList();
  
	/* ClassWizard generated virtual function overrides */
  //{{AFX_VIRTUAL(CCustomList)
  //}}AFX_VIRTUAL

	/* Initializes the popup menu */
  void InitPopupMenu (const UINT MenuID) { m_Menu.LoadMenu(MenuID); }

	/* Sets the LostSelect member variable */
  void SetLoseSelect (const boolean NewSelect = TRUE) { LoseSelect = NewSelect; }

	/* Generated message map functions */
protected:
  //{{AFX_MSG(CCustomList)
  afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  afx_msg void OnKillFocus(CWnd* pNewWnd);
  //}}AFX_MSG

  DECLARE_MESSAGE_MAP()

 };
/*===========================================================================
 *		End of Class CCustomList Definition
 *=========================================================================*/

//{{AFX_INSERT_LOCATION}}
//}}AFX

#endif
/*===========================================================================
 *		End of File CUSTOMLIST.H
 *=========================================================================*/