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.2 2002/05/07 03:16:44 theoddone33
12 * The Great Newline Fix
14 * Revision 1.1.1.1 2002/05/03 03:28:08 root
18 * 2 10/07/98 6:28p Dave
19 * Initial checkin. Renamed all relevant stuff to be Fred2 instead of
20 * Fred. Globalized mission and campaign file extensions. Removed Silent
21 * Threat specific code.
23 * 1 10/07/98 3:01p Dave
25 * 1 10/07/98 3:00p Dave
27 * 4 2/17/97 5:28p Hoffoss
28 * Checked RCS headers, added them were missing, changing description to
29 * something better, etc where needed.
35 #include "shipchecklistbox.h"
37 BEGIN_MESSAGE_MAP(ShipCheckListBox, CCheckListBox)
38 //{{AFX_MSG_MAP(CCheckListBox)
43 BOOL ShipCheckListBox::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID)
47 b = CCheckListBox::Create(LBS_OWNERDRAWFIXED | dwStyle, rect, pParentWnd, nID);
48 SetCheckStyle(BS_AUTOCHECKBOX);
52 void ShipCheckListBox::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
54 if (nChar == VK_SPACE)
58 list_size = GetCount();
59 for (i=0; i<list_size; i++)
69 CCheckListBox::OnKeyDown(nChar, nRepCnt, nFlags);