2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
4 * All source code herein is the property of Volition, Inc. You may not sell
5 * or otherwise commercially exploit the source or things you created based on
10 * $Logfile: /Freespace2/code/FRED2/ShipCheckListBox.cpp $
15 * A custom check list box class that allows space bar to toggle the state of all
16 * the selected checkboxes.
19 * Revision 1.3 2002/06/09 04:41:17 relnev
20 * added copyright header
22 * Revision 1.2 2002/05/07 03:16:44 theoddone33
23 * The Great Newline Fix
25 * Revision 1.1.1.1 2002/05/03 03:28:08 root
29 * 2 10/07/98 6:28p Dave
30 * Initial checkin. Renamed all relevant stuff to be Fred2 instead of
31 * Fred. Globalized mission and campaign file extensions. Removed Silent
32 * Threat specific code.
34 * 1 10/07/98 3:01p Dave
36 * 1 10/07/98 3:00p Dave
38 * 4 2/17/97 5:28p Hoffoss
39 * Checked RCS headers, added them were missing, changing description to
40 * something better, etc where needed.
46 #include "shipchecklistbox.h"
48 BEGIN_MESSAGE_MAP(ShipCheckListBox, CCheckListBox)
49 //{{AFX_MSG_MAP(CCheckListBox)
54 BOOL ShipCheckListBox::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID)
58 b = CCheckListBox::Create(LBS_OWNERDRAWFIXED | dwStyle, rect, pParentWnd, nID);
59 SetCheckStyle(BS_AUTOCHECKBOX);
63 void ShipCheckListBox::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
65 if (nChar == VK_SPACE)
69 list_size = GetCount();
70 for (i=0; i<list_size; i++)
80 CCheckListBox::OnKeyDown(nChar, nRepCnt, nFlags);