2 * $Logfile: /Freespace2/code/FRED2/ShipCheckListBox.cpp $
7 * A custom check list box class that allows space bar to toggle the state of all
8 * the selected checkboxes.
11 * Revision 1.1 2002/05/03 03:28:08 root
15 * 2 10/07/98 6:28p Dave
16 * Initial checkin. Renamed all relevant stuff to be Fred2 instead of
17 * Fred. Globalized mission and campaign file extensions. Removed Silent
18 * Threat specific code.
20 * 1 10/07/98 3:01p Dave
22 * 1 10/07/98 3:00p Dave
24 * 4 2/17/97 5:28p Hoffoss
25 * Checked RCS headers, added them were missing, changing description to
26 * something better, etc where needed.
32 #include "shipchecklistbox.h"
34 BEGIN_MESSAGE_MAP(ShipCheckListBox, CCheckListBox)
35 //{{AFX_MSG_MAP(CCheckListBox)
40 BOOL ShipCheckListBox::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID)
44 b = CCheckListBox::Create(LBS_OWNERDRAWFIXED | dwStyle, rect, pParentWnd, nID);
45 SetCheckStyle(BS_AUTOCHECKBOX);
49 void ShipCheckListBox::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
51 if (nChar == VK_SPACE)
55 list_size = GetCount();
56 for (i=0; i<list_size; i++)
66 CCheckListBox::OnKeyDown(nChar, nRepCnt, nFlags);