
CListOptionsCtrl v1.22 An
MFC class to provide a properties browser control
Welcome to CListOptionsCtrl, a control
which implements a properties browser control similar to the properties browser
in Visual Basic. In addition to Boolean values, it also allows edit boxes, combo
boxes, file browser, folder browsers, color browsers, font browsers, font
name combo boxes, general opaque objects, date controls, time controls and IP
address controls to be included in the list control. Included below is a
snapshot showing the demo application and what the control looks like

The enclosed zip file contains the CListOptionsCtrl source code and a simple dialog based application which
exercises the class.
Copyright
- You are allowed to include the source code in
any product (commercial, shareware, freeware or otherwise) when your product
is released in binary form.
- You are allowed to modify the source code in
any way you want except you cannot modify the copyright details at the top
of each module.
- If you want to distribute source code with
your application, then you are only allowed to distribute versions released
by the author. This is to maintain a single distribution point for the
source code.
Updates
V1.0 (5
December 2001)
V1.1 (13 January 2002)
- Made _ListOptionsItemData structure globally available
and renamed it to CListOptionsItemData.
- Each child control class now is initialized with the
index of the list view control at which it is created. This allows added
flexibility in what a child control can do.
- Added a method to add an "Opaque Browser" to
the list options control. An Opaque Browser is where the list options
control allows a end user specified structure to be edited by the list
options control without it explicitly knowing what it is editing. A standard
"..." browse button is used and virtual functions are used to
allow end user code to implement the required "browsing"
functionality at the right time.
- Added a WM_SIZE handler to allow the class to work
correctly where the containing view or dialog resizes it for layout reasons.
- Fixed a problem in CListOptionsCtrl::OnKillFocus which
was not checking the value of GetSelectedItem before using it
- Updated copyright messages in code and in documentation
V1.11 (23 January 2002)
- Improved the "Opaque Browser" support to
allow the two runtime classes to be specified e.g. you can have a combo box
in addition to a button.
V1.12 (31 May 2002)
- Color is now optionally drawn in the icon for color
browser items
V1.13 (1 June 2002)
- Moved application and code to VC 6 to allow item 2 below.
- Now fully supports the CDateTimeCtrl for editing of dates and times
V1.14 (2 June 2002)
- Now fully supports the CIPAddressCtrl for editing of IP addresses.
V1.15 (17 October 2002)
- Changed function "BrowserForOpaque" to
"BrowseForOpaque"
V1.16 (5 May 2004)
- Fixed some compiler warnings when the code is compiled
using VC 7.x. Please note that to implement these fixes, the code will now
require the Platform SDK to be installed if you compile the code on VC 6.
V1.17 (26 November 2004)
- Fixed a bug where in place editing would fail on a multiple monitor setup when the listoptions control was on a monitor which had negative coordinates relative to the primary display
V1.18 (3 May 2006)
- Updated the copyright details.
- Control now allows the per item text to be Bold, italic or underlined or
any combination of the three.
- Optimized the construction of member variables in all classes
- Inlined the virtual destructors.
- Provided a set of macros which allow the code to be easily added to an
extension DLL.
- Control now uses WM_USER instead of WM_APP for private messages
- Prompt and value text color and background color can also be customized.
- Updated documentation to use the same style as the web site.
- Did a spell check of the documentation.
V1.19 (8 May 2006)
- Removed unnecessary message map for CListOptionsSpinCtrl WM_CHAR
- Removed unnecessary message map for CListOptionsBrowseButton WM_CHAR
- Reworked CListOptionsDateCtrl::GetDisplayText to handle variable length
data
- Reworked CListOptionsTimeCtrl::GetDisplayText to handle variable length
data
- Removed unnecessary message map for CListOptionsTimeCtrl WM_CREATE
- CListOptionsEdit::GetBrowseForFolderCaption(),
CListOptionsEdit::GetBrowseForFileCaption() and
CListOptionsEdit::GetFileExtensionFilter() now use string resources instead
of string literals.
V1.20 (7 July 2006)
- Code now uses newer C++ style casts instead of C style casts.
- Removed various unused constructors and destructors in the sample app's
code.
- Updated code to compile cleanly using VC 2005.
V1.21 (23 December 2007)
- Updated copyright details.
- Removed VC 6 style AppWizard comments from the code.
- Optimized CListOptionsItemData constructor code
- Boolean member variables of CListOptionsItemData have now been made "bool"
instead of "BOOL"
- Fixed an issue where if you create a combo box with a style of
CBS_DROPDOWN instead of CBS_DROPDOWNLIST, then the combo box would not be
properly deactivated when it loses focus to a control outside of the
ListOptionsCtrl while the cursor is in the combo box edit field. Thanks to
Tobias Wolf for reporting this issue.
- Fixed a crash where you select a combo box item, select something in it
and then hit tab.
- Focus is now correctly transferred to a list options button if you hit
tab on a list options combo box.
V1.22 (15 June 2008)
- Updated copyright details
- Code now compiles cleanly using Code Analysis (/analyze)
- Updated code to compile correctly using _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
define
- The code now only supports VC 2005 or later.
- Replaced all calls to CopyMemory with memcpy