NListBoxis a class that is based on XVT's native list box control, which allows a user to select one or more items from a scrollable list. In contrast to
CListBox, which has an XVT-Power++ look-and-feel,
NListBoxhas the look-and-feel of the native window manager.
CNativeView. The drawing properties of native views are system-defined.
const CRect& theRegion,
const CStringCollection& theItems,
long theControlAttributes = CTL_FLAG_MULTIPLE);
theEnclosureis a pointer to the subview that will contain the list box.
theRegionis a coordinate location, local to the enclosure, that is used to place the native list.
theItemsis a list of the strings that the native select list will contain.
theControlAttributesspecifies the XVT attributes that determine the special characteristics and initial state of a control when it is created. The possible XVT control flags vary from control to control, and only a couple of them are generic to all controls. For information on the possible attributes a particular type of control can have, see the discussions of
CTL_FLAGin the XVT Portability Toolkit Reference. Note that this method takes no title and that the function
SetTitlehas no effect on this object. It has no title because the list box is simply a list of selections.
long theContainerId, long theId);
const CStringCollection& theItems);
theItems) into it. It returns a
TRUEif it succeeds and
FALSEif it fails.
NListBox(const NListBox& theNativeList);
NListBox& operator=(const NListBox& theNativeList);
virtual void DoHit(CONTROL_INFO theControlInfo);
CONTROL_INFO, which is defined by XVT in the XVT Portability Toolkit Guide. When the user clicks, it passes a click command, and when the user double clicks, it passes a double click command-all through the
DoCommandmechanism. This method not only gets the click command but also the object that is clicked or double clicked. In short,
DoHittranslates single and double clicks through the
virtual void Size(const CRect& theRect);