OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TListViewCtrl Class Reference

Encapsulates the ListView control, a window that displays a collection of items, each item consisting of an icon and a label. More...

#include <owl/listviewctrl.h>

Inheritance diagram for owl::TListViewCtrl:
owl::TControl owl::TWindow owl::TEventHandler owl::TStreamableBase owl::TListViewCtrlView

Classes

class  TCompareFunc
 Pure virtual base class for comparing sort items. More...
 

Public Types

enum  TArrangeCode { Default = LVA_DEFAULT , Left = LVA_ALIGNLEFT , Top = LVA_ALIGNTOP , SnapToGrid = LVA_SNAPTOGRID }
 TArrangeCode is used to describe how to arrange the items in a list window control. More...
 
enum  TImageListType { Normal = LVSIL_NORMAL , Small = LVSIL_SMALL , State = LVSIL_STATE }
 Describes the type of image list for use with the list window control. More...
 
enum  TItemRectType { Bounds = LVIR_BOUNDS , Icon = LVIR_ICON , Label = LVIR_LABEL , SelectBounds = LVIR_SELECTBOUNDS }
 Describes the type of rectangle boundaries to retrieve. More...
 
enum  TNextItemCode {
  Above = LVNI_ABOVE , All = LVNI_ALL , Below = LVNI_BELOW , Previous = LVNI_PREVIOUS , ToLeft = LVNI_TOLEFT , ToRight = LVNI_TORIGHT , DirectionMask = LVNI_DIRECTIONMASK , Cut = LVNI_CUT , DropHilited = LVNI_DROPHILITED , Focused = LVNI_FOCUSED ,
  Selected = LVNI_SELECTED , StateMask = LVNI_STATEMASK , VisibleOrder = LVNI_VISIBLEORDER , VisibleOnly = LVNI_VISIBLEONLY , SameGroupOnly = LVNI_SAMEGROUPONLY
}
 Describes the next item to retrieve from the current item. More...
 
enum  TViewType { Details = LV_VIEW_DETAILS , NormalIcon = LV_VIEW_ICON , List = LV_VIEW_LIST , SmallIcon = LV_VIEW_SMALLICON , Tile = LV_VIEW_TILE }
 Describes the type of views. More...
 
enum  TSetItemCountBehavior { Unspecified = 0 , NoInvalidateAll = LVSICF_NOINVALIDATEALL , NoScroll = LVSICF_NOSCROLL }
 Describes the behavior for the control when setting the item count. More...
 
- Public Types inherited from owl::TWindow
typedef HWND THandle
 TWindow encapsulates an HWND.
 
using TChildrenIterator = TChildrenIteratorTemplate<TWindow>
 
using TConstChildrenIterator = TChildrenIteratorTemplate<const TWindow>
 
using TChildrenRange = TChildrenRangeTemplate<TWindow>
 
using TConstChildrenRange = TChildrenRangeTemplate<const TWindow>
 
typedef std::pair< int, intTScrollRange
 
- Public Types inherited from owl::TEventHandler
typedef bool(* TEqualOperator) (const TGenericTableEntry &, const TEventInfo &)
 

Public Member Functions

Constructors
 TListViewCtrl (TWindow *parent, int id, int x, int y, int w, int h, TModule *module=0)
 Constructor that simply passes the parameters to the parent TControl::TControl(TWindow*, int, LPCTSTR, int, int, int, int, TModule*) and adds the extended style WS_EX_CLIENTEDGE.
 
 TListViewCtrl (TWindow *parent, int resourceId, TModule *module=0)
 Constructor that simply passes the parameters to the parent TControl::TControl(TWindow*, int, TModule*).
 
Column manipulation
auto InsertColumn (int colNum, const TLvColumn &column) -> int
 Inserts a new column in a list-view control.
 
auto DeleteColumn (int colNum) -> bool
 Deletes a column in a list-view control.
 
auto GetColumn (int colNum, TLvColumn &column) const -> bool
 Retrieves the attributes of a list-view control's column.
 
auto GetColumnWidth (int colNum) const -> int
 Retrieves the width of a column in report or list view.
 
auto SetColumn (int colNum, const TLvColumn &column) -> bool
 Sets the attributes of a list-view control's column.
 
auto SetColumnWidth (int colNum, int width) -> bool
 Sets the width of a column in report or list view.
 
Item accessors and mutators
auto GetItem (TLvItem &item, int index=-1, int subitemIndex=-1) const -> bool
 Retrieves a list-view item's attributes.
 
auto GetItem (int index=-1, int subitemIndex=-1) const -> TLvItem
 TLvItem return overload for GetItem(TLvItem&, int, int) const .
 
auto SetItem (const TLvItem &item, int index=-1, int subitemIndex=-1) -> bool
 Sets a list-view item's attributes.
 
auto GetNextItem (int index, uint flags=TNextItemCode::All) const -> int
 Searches for a list-view item that has the specified properties and bears the specified relationship to a specified item.
 
auto GetItemCount () const -> int
 Retrieves the number of items in the list-view control.
 
auto SetItemCount (int numItems, TSetItemCountBehavior behavior=Unspecified) -> bool
 Sets the number of items that the list-view control will ultimately contain.
 
auto GetItemPosition (int index, TPoint &pt) const -> bool
 Retrieves the position of a list-view item.
 
auto GetItemPosition (int index) const -> TPoint
 TPoint return overload for GetItemPosition(int, TPoint&) const .
 
auto SetItemPosition (int index, const TPoint &pt) -> bool
 Sets the position of a list-view item.
 
auto SetItemPosition32 (int index, const TPoint &pt) -> void
 Sets the position of a list-view item.
 
auto GetItemRect (int index, TRect &rect, TItemRectType type) const -> bool
 Retrieves the bounding rectangle of a list-view item.
 
auto GetItemRect (int index, TItemRectType type) const -> TRect
 TRect return overload for GetItemRect(int, TRect&, TItemRectType) const .
 
auto GetItemState (int index, uint mask) const -> TLvItem::TListState
 Retrieves the current state for an item.
 
auto SetItemState (int index, TLvItem::TListState state, uint mask) -> bool
 Sets the current state for an item.
 
auto GetItemText (int index, TLvItem &item) const -> int
 Retrieves the text of the item.
 
auto GetItemText (int index, int subitemIndex, TCHAR *buffer, int bufferSize) const -> int
 C string overload for GetItemText(int, TLvItem&) const .
 
auto GetItemText (int index, int subitemIndex=0) const -> tstring
 String return overload for GetItemText(int, TLvItem&) const .
 
auto SetItemText (int index, const TLvItem &item) -> bool
 Sets the text of a list-view item or subitem.
 
auto SetItemText (int index, int subitemIndex, LPCTSTR text) -> bool
 C string overload for SetItemText(int, const TLvItem&).
 
auto SetItemText (int index, int subitemIndex, const tstring &text) -> bool
 String overload for SetItemText(int, const TLvItem&).
 
Item insertion and deletion
auto AddItem (const TLvItem &item) -> int
 Adds a new item to the end of the list.
 
auto AddItem (const tstring &text) -> int
 Adds a new item with the given text to the end of the list.
 
auto InsertItem (const TLvItem &item, int index=-1) -> int
 Inserts a new item to the list.
 
auto InsertItem (const tstring &text, int index=0) -> int
 Inserts a new item with the given text to the list.
 
auto DeleteItem (int index) -> bool
 Deletes an item from the list.
 
auto DeleteAllItems () -> bool
 Deletes all items from the list.
 
Find/Sort/Arrange
auto FindItem (int index, const TLvFindInfo &findInfo) const -> int
 Searches for an item with the specified characteristics.
 
auto SortItems (const TCompareFunc &Comparator, LPARAM lParam=0) -> bool
 Sorts the list items.
 
auto SortItemsEx (const TCompareFunc &Comparator, LPARAM lParam=0) -> bool
 Sorts the list items.
 
auto Arrange (TArrangeCode code) -> bool
 Arranges items in icon view.
 
Item selection
auto IsSelected (int index) const -> bool
 Queries if an item is selected.
 
auto GetNextSelIndex (int index=-1) const -> int
 Searches for the next selected item after a given index.
 
auto GetSelIndex () const -> int
 Retrieves the selected item index.
 
auto GetSelCount (void) const -> int
 Retrieves the number of selected items.
 
auto GetSelIndexes (int *indexes, int maxCount) const -> int
 Retrieves the indexes of the selected items.
 
auto GetSelString (tchar *str, int maxChars, int subitemIndex=0) const -> bool
 Retrieves the selected item or item subitem text.
 
auto GetSelString (int subitemIndex=0) const -> tstring
 String overload for GetSelString(tchar*, int, int) const .
 
auto GetSelStrings (tchar **strs, int maxCount, int maxChars, int subitemIndex=0) const -> int
 Retrieves the item or subitem strings of the selected items.
 
auto SetSel (int index, bool select) -> bool
 Selects or deselects an item.
 
auto SetSelIndexes (int *indexes, int numSelections, bool select) -> bool
 Selects or deselects items.
 
auto SetSelItemRange (bool select, int first, int last) -> bool
 Selects or deselects a range of items.
 
auto GetSelectedColumn () const -> int
 Retrieves the currently selected column number.
 
auto SetSelectedColumn (int colNum) -> void
 Sets the selected column number.
 
Image list manipulation
auto CreateDragImage (int index, TPoint *upLeft) -> HIMAGELIST
 Creates a drag image list for an item.
 
auto GetImageList (TImageListType type) const -> HIMAGELIST
 Retrieves the handle to an image list used for drawing list-view items.
 
auto SetImageList (HIMAGELIST list, TImageListType type) -> HIMAGELIST
 Assigns an image list to a list-view control.
 
Color accessors and manipulation
auto GetBkColor () const -> TColor
 Retrieves the background color of a list-view control.
 
auto SetBkColor (const TColor &c) -> bool
 Sets the background color of a list-view control.
 
auto GetTextBkColor () const -> TColor
 Retrieves the text background color of a list-view control.
 
auto SetTextBkColor (const TColor &c) -> bool
 Sets the background color of text in a list-view control.
 
auto GetTextColor () const -> TColor
 Retrieves the text color of a list-view control.
 
auto SetTextColor (const TColor &c) -> bool
 Sets the color of text in a list-view control.
 
Callbacks
auto GetCallBackMask () const -> TLvItem::TListState
 Retrieves the callback mask for a list-view control.
 
auto SetCallBackMask (TLvItem::TListState mask) -> bool
 Sets the callback mask for a list-view control.
 
Miscellaneous
auto GetTopIndex () const -> int
 Retrieves the topmost visible item index when in list or report view.
 
auto EditLabel (int index) -> HWND
 Begins in-place editing of the list-view item's text.
 
auto GetEditControl () const -> HWND
 Retrieves the handle to the edit control used to edit a list-view item's text.
 
auto CancelEditLabel () -> void
 Cancels an item text editing operation.
 
auto Update (int index) -> bool
 Updates a list-view item.
 
auto HitTest (TLvHitTestInfo &) const -> int
 Determines whether a list-view item is at a specified position.
 
auto HitTest (const TPoint &) const -> TLvHitTestInfo
 Functional-style overload.
 
auto Scroll (int dx, int dy) -> bool
 Scrolls the content of a list-view control.
 
auto GetOrigin (TPoint &pt) const -> bool
 Retrieves the current view origin for a list-view control.
 
auto GetStringWidth (LPCTSTR text) const -> int
 Calculates the exact width in pixels of the given string using the control's current font.
 
auto GetStringWidth (const tstring &text) const -> int
 String overload for GetStringWidth(LPCTSTR) const .
 
auto CalculateColumnWidth (LPCTSTR text, int padding=12) const -> int
 Calculates a suitable column pixel width for the given string.
 
auto CalculateColumnWidth (const tstring &text, int padding=12) const -> int
 String overload for CalculateColumnWidth(LPCTSTR, int) const .
 
auto GetViewRect (TRect &rect) const -> bool
 Retrieves the bounding rectangle of all items in the list-view control when in icon or small icon view.
 
auto IsItemVisible (int index) const -> bool
 Queries whether an item is visible.
 
auto EnsureVisible (int index, bool partialOk) -> bool
 Ensures that a list-view item is either partially or entirely visible, scrolling the list-view control if necessary.
 
auto RedrawItems (int startIndex, int endIndex) -> bool
 Forces a list-view control to redraw a range of items.
 
auto GetCountPerPage () const -> int
 Calculates the number of items that can fit vertically in the visible area of a list-view control when in list or report view.
 
auto GetISearchString () const -> tstring
 Retrieves the incremental search string.
 
auto GetFocusItem () -> int
 Retrieves the item index of the item that has the focus.
 
auto SetFocusItem (int index, bool focused=true) -> bool
 Sets or removes the focus for an item.
 
New commctrl messages - version 4.70
auto GetApproxRect (int x=-1, int y=-1, int count=-1) const -> TSize
 Calculates the approximate width and height required to display a given number of items.
 
auto GetApproxRect (const TPoint &pt, int count=-1) const -> TSize
 TPoint overload for GetApproxRect(int, int, int) const .
 
auto GetColumnOrder (int count, int *array) const -> bool
 Retrieves the current left-to-right order of columns in a list-view control.
 
auto SetColumnOrder (int count, const int *array) -> bool
 Sets the current left-to-right order of columns in a list-view control.
 
auto GetExtStyle () const -> uint32
 Retrieves the extended styles that are currently in use for a given list-view control.
 
auto SetExtStyle (uint32 mask, uint32 style) -> uint32
 Sets the extended styles to use for a given list-view control.
 
auto GetHeaderCtrl () const -> HWND
 Retrieves the handle to the header control used by the list-view control.
 
auto GetHotCursor () const -> HCURSOR
 Retrieves the cursor handle used when the pointer is over an item while hot tracking is enabled.
 
auto SetHotCursor (HCURSOR cur) -> HCURSOR
 Sets the cursor handle to use when the pointer is over an item while hot tracking is enabled.
 
auto GetHotItem () const -> int
 Retrieves the index of the hot item.
 
auto SetHotItem (int index) -> int
 Sets the index of the hot item.
 
auto GetSubItemRect (TRect &rect, int subitemIndex=0, int index=0, TItemRectType type=Bounds) const -> bool
 Retrieves the bounding rectangle for a subitem in a list-view control when in report view.
 
auto SubItemHitTest (TLvHitTestInfo &info) const -> int
 Determines which list-view item or subitem is at a given position.
 
auto SubItemHitTest (const TPoint &) const -> TLvHitTestInfo
 Functional-style overload.
 
auto GetItemSpacing (bool smallIcon) const -> TSize
 Retrieves the amount of horizontal and vertical spacing between items.
 
auto SetIconSpacing (int x, int y) -> TSize
 Sets the spacing between icons in list-view controls that have the LVS_ICON style.
 
auto SetIconSpacing (const TPoint &pt) -> TSize
 TPoint overload for SetIconSpacing(int, int).
 
auto ResetIconSpacing () -> TSize
 Resets the icon spacing to the default spacing.
 
New commctrl messages - version 4.71
auto GetBkImage (TLvBkImage &bkimg) const -> bool
 Retrieves the background image in a list-view control.
 
auto SetBkImage (const TLvBkImage &bkimg) -> bool
 Sets the background image in a list-view control.
 
auto GetHoverTime () const -> uint32
 Retrieves the amount of time that the mouse cursor must hover over an item before it is selected.
 
auto SetHoverTime (uint32 tm) -> uint32
 Sets the amount of time that the mouse cursor must hover over an item before it is selected.
 
auto GetNumOfWorkAreas () const -> uint
 Retrieves the number of working areas in a list-view control.
 
auto GetWorkAreas (int count, TRect *areas) const -> void
 Retrieves the working areas from a list-view control.
 
auto SetWorkAreas (int count, TRect *areas) -> void
 Sets the working areas for a list-view control.
 
auto GetSelectionMark () const -> int
 Retrieves the selection mark from a list-view control.
 
auto SetSelectionMark (int index) -> int
 Sets the selection mark for a list-view control.
 
New commctrl messages - version 6.00
auto GetItemIndexRect (int index, int group, int subitemIndex, TRect &rect, TItemRectType type) const -> bool
 Sets the bounding rectangle for a subitem.
 
auto GetNextItemIndex (int index, int group, uint flags=TNextItemCode::All) const -> int
 Searches for a list-view item that has the specified properties and bears the specified relationship to a specified item.
 
auto SetItemIndexState (const TLvItem &item, int index, int group) -> bool
 Sets the state of a list-view item.
 
auto GetEmptyText () const -> tstring
 Retrieves the string to display when the list-view control appears empty.
 
auto GetFooterInfo (TLvFooterInfo &info) const -> bool
 Retrieves information about the footer of a list-view control.
 
auto GetFooterItems () const -> int
 Footer item count return overload for GetFooterInfo(TLvFooterInfo&) const .
 
auto GetFooterItem (int index, TLvFooterItem &item) const -> bool
 Retrieves information for a footer item in a list-view control.
 
auto GetFooterItemText (int index) const -> std::wstring
 Footer item text string return overload for GetFooterItem(int, TLvFooterItem&) const .
 
auto GetFooterItemState (int index, TLvFooterItem::TState mask=TLvFooterItem::All) const -> TLvFooterItem::TState
 Footer item state return overload for GetFooterItem(int, TLvFooterItem&) const .
 
auto GetFooterItemRect (int index, TRect &rect) const -> bool
 Retrieves the coordinates of a footer for an item in a list-view control.
 
auto GetFooterItemRect (int index) const -> TRect
 TRect return overload for GetFooterItemRect(int, TRect&) const .
 
auto GetFooterRect (TRect &rect) const -> bool
 Retrieves the coordinates of the footer for a list-view control.
 
auto GetFooterRect () const -> TRect
 TRect return overload for GetFooterRect(TRect&) const .
 
auto GetGroupInfo (int groupId, uint mask=0xFFFFFFFF) -> LVGROUP
 Gets group information.
 
Unicode setting messages
auto GetUnicodeFormat () const -> bool
 Queries whether the Unicode character set is being used instead of ANSI.
 
auto SetUnicodeFormat (bool useUnicode=true) -> bool
 Sets whether the Unicode character set is being used instead of ANSI.
 
Tooltip messages
auto GetToolTips () const -> HWND
 Retrieves the handle of the tooltip control that the list-view control uses to display tooltips.
 
auto SetToolTips (THandle handle) -> HWND
 Sets the handle of the tooltip control that the list-view control uses to display tooltips.
 
auto SetInfoTip (LPCWSTR text, int index, int subitemIndex=0) -> bool
 Sets tooltip text in delayed response to the LVN_GETINFOTIP notification.
 
auto SetInfoTip (LPCSTR text, int index, int subitemIndex=0) -> bool
 C single-byte string overload for SetInfoTip(LPCWSTR, int, int).
 
auto SetInfoTip (const tstring &text, int index, int subitemIndex=0) -> bool
 String overload for SetInfoTip(LPCWSTR, int, int).
 
View type messages
auto GetView () const -> TViewType
 Retrieves the view type.
 
auto SetView (TViewType viewType) -> bool
 Sets the view type.
 
Tile view messages
auto GetTileInfo (PLVTILEINFO lvTileInfo) const -> void
 Retrieves information about a tile in a list-view control.
 
auto GetTileInfo (LVTILEINFO &lvTileInfo) const -> void
 Reference overload for GetTileInfo(PLVTILEINFO) const .
 
auto SetTileInfo (PLVTILEINFO lvTileInfo) -> bool
 Sets information about a tile in a list-view control.
 
auto SetTileInfo (LVTILEINFO &lvTileInfo) -> bool
 Reference overload for SetTileInfo(PLVTILEINFO).
 
auto GetTileViewInfo (TLvTileViewInfo &tileViewInfo) const -> void
 Retrieves tile view information.
 
auto SetTileViewInfo (const TLvTileViewInfo &tileViewInfo) -> bool
 Sets tile view information.
 
Border outline color messages
auto GetOutlineColor () const -> TColor
 Retrieves the list-view control border color.
 
auto SetOutlineColor (const TColor &color) -> TColor
 Sets the list-view control border color.
 
- Public Member Functions inherited from owl::TControl
 TControl (TWindow *parent, int id, LPCTSTR title, int x, int y, int w, int h, TModule *module=nullptr)
 Invokes TWindow's constructor, passing it parent (parent window), title (caption text), and module.
 
 TControl (TWindow *parent, int id, const tstring &title, int x, int y, int w, int h, TModule *module=nullptr)
 String-aware overload.
 
 TControl (TWindow *parent, int resourceId, TModule *module=nullptr)
 Constructs an object to be associated with an interface control of a TDialog object.
 
 TControl (TWindow *parent, int resourceId, const tstring &title, TModule *=nullptr)
 Overload for controls loaded from resource Allows the title specified in the resource data to be overridden.
 
 ~TControl () override
 
- Public Member Functions inherited from owl::TWindow
void TraceWindowPlacement ()
 
 TWindow (TWindow *parent, LPCTSTR title=nullptr, TModule *module=nullptr)
 Adds this to the child list of parent if nonzero, and calls EnableAutoCreate so that this will be created and displayed along with parent.
 
 TWindow (TWindow *parent, const tstring &title, TModule *module=nullptr)
 String-aware overload.
 
 TWindow (HWND handle, TModule *module=nullptr)
 Constructs a TWindow that is used as an alias for a non-ObjectWindows window, and sets wfAlias.
 
virtual ~TWindow () override
 Destroys this window (unless this is an alias) and the children.
 
TApplicationGetApplication () const
 Gets a pointer to the TApplication object associated with this.
 
virtual bool Register ()
 Registers the Windows registration class of this window, if this window is not already registered.
 
TScrollerGetScroller ()
 Returns the associated scroller object for this window.
 
void SetScroller (TScroller *scroller)
 Sets the scroller object for this window.
 
virtual void CloseWindow (int retVal=0)
 Determines if it is okay to close a window before actually closing the window.
 
TWindowAttrGetWindowAttr ()
 Returns the TWindowAttr structure, which contains the window's creation attributes.
 
const TWindowAttrGetWindowAttr () const
 Returns the TWindowAttr structure, which contains the window's creation attributes.
 
LPCTSTR GetCaption () const
 Returns the Title member of TWindow.
 
virtual bool CanClose ()
 Use this function to determine if it is okay to close a window.
 
void ChildBroadcastMessage (TMsgId, TParam1=0, TParam2=0)
 Sends the specified message to all immediate children using SendMessage.
 
TResult HandleMessage (TMsgId, TParam1=0, TParam2=0)
 Dispatches the given message using the response table.
 
virtual TResult EvCommand (uint id, HWND hWndCtl, uint notifyCode)
 WindowProc calls EvCommand to handle WM_COMMAND messages.
 
virtual TResult EvNotify (uint id, TNotify &notifyInfo)
 Handles WM_NOTIFY and subdispatch messages from child controls.
 
TResult DefaultProcessing ()
 Handles default processing of events, which includes continued processing of menu/accelerators commands and enablers, as well as notifications.
 
virtual void Paint (TDC &dc, bool erase, TRect &rect)
 Repaints the client area (the area you can use for drawing) of a window.
 
void SubclassWindowFunction ()
 Installs the instance thunk as the WindowProc and saves the old window function in DefaultProc.
 
void SetFlag (uint mask)
 Sets the specified TWindow wfXxxx constant flags (for example wfAlias, wfTransfer, and so on) in the Flags member.
 
void ClearFlag (uint mask)
 Clears the specified TWindow wfXxxx constant flags (for example wfAlias, wfTransfer, and so on) in the Flags member.
 
bool IsFlagSet (uint mask)
 Returns the state of the bit flag in Attr.Flags whose mask is supplied.
 
void EnableAutoCreate ()
 Ensures that an associated child window interface element is created and displayed along with its parent window.
 
void DisableAutoCreate ()
 Disables the feature that allows an associated child window interface element to be created and displayed along with its parent window.
 
virtual TTooltipGetTooltip () const
 
virtual void EnableTooltip (bool enable=true)
 
void SetTooltip (TTooltip *tooltip)
 
void EnableTransfer ()
 Enables the transfer mechanism, which allows state data to be transferred between the window and a transfer buffer.
 
void DisableTransfer ()
 Disables (for the interface object) the transfer mechanism, which allows state data to be transferred to and from a transfer buffer.
 
TModuleGetModule () const
 Returns a pointer to the module object.
 
void SetModule (TModule *module)
 Sets the default module for this window.
 
tstring LoadString (uint id) const
 
HBITMAP LoadBitmap (TResId id) const
 
HACCEL LoadAccelerators (TResId id) const
 
HMENU LoadMenu (TResId id) const
 
HCURSOR LoadCursor (TResId id) const
 
HICON LoadIcon (TResId id) const
 
std::string LoadHtml (TResId id) const
 
virtual bool Create ()
 Creates the window interface element to be associated with this ObjectWindows interface element.
 
bool CreateChildren ()
 Creates the child windows in the child list whose auto-create flags (with wfAutoCreate mask) are set.
 
virtual void Destroy (int retVal=0)
 Destroys an MS-Windows element associated with the TWindow.
 
virtual int Execute ()
 Creates the underlying HWND and makes it modal with the help of TApplication's BeginModal support.
 
virtual int DoExecute ()
 Do actual modal execution using the Begin/End Modal support of TApplication.
 
void AttachHandle (HWND handle)
 
void DetachHandle ()
 
virtual bool PreProcessMsg (MSG &msg)
 Called from TApplication::ProcessAppMsg() to give the window an opportunity to perform preprocessing of the Windows message.
 
virtual bool IdleAction (long idleCount)
 Called when no messages are waiting to be processed, IdleAction performs idle processing as long as true is returned.
 
virtual bool HoldFocusHWnd (HWND hLose, HWND hGain)
 Responds to a request by a child window to hold its HWND when it is losing focus.
 
int GetId () const
 Returns Attr.Id, the ID used to find the window in a specified parent's child list.
 
auto ChildWithId (int id) const -> const TWindow *
 
auto ChildWithId (int id) -> TWindow *
 Returns a pointer to the window in the child window list that has the supplied id.
 
HWND GetParentH () const
 Return the handle of the parent.
 
TWindowGetParentO () const
 Return the OWL's parent for this window.
 
TWindowGetParent () const
 Retrieves the OWL object of the parent window. If none exists, returns 0.
 
virtual void SetParent (TWindow *newParent)
 Sets the parent for the specified window by setting Parent to the specified new Parent window object.
 
void SetNext (TWindow *next)
 Sets the next window in the sibling list.
 
virtual bool SetDocTitle (LPCTSTR docname, int index)
 Default behavior for updating document title is to pass it to parent frame.
 
bool SetDocTitle (const tstring &docname, int index)
 
void SetCaption (LPCTSTR title)
 Copies title to an allocated string pointed to by title.
 
void SetCaption (const tstring &title)
 
void SetCaption (uint resourceStringId)
 Sets the window title to the resource string identified by the given id.
 
bool SetCursor (TModule *module, TResId resId)
 Sets the mouse cursor for the window, loading the given resId from the given module.
 
auto GetBkgndColor () const -> TColor
 Returns the overriding background color set for the window.
 
void SetBkgndColor (TColor color, bool shouldUpdate=true)
 Sets the background color for the window.
 
auto GetTextColor () const -> TColor
 Returns the overriding text color set for the window.
 
void SetTextColor (TColor color, bool shouldUpdate=true)
 Sets the text color for the window.
 
void SetAcceleratorTable (TResId resId)
 
TResult ForwardMessage (HWND handle, bool send=true)
 Forwards the window's current message.
 
TResult ForwardMessage (bool send=true)
 Forwards the window's current message.
 
void SendNotification (int id, int notifyCode, HWND hCtl, TMsgId=WM_COMMAND)
 Repacks a command message (msg) so that a child window (hCtl) can send a message to its parent regardless of whether this is a WIN16 or WIN32 application.
 
void SendNotification (HWND receiver, int id, int notifyCode, HWND hCtl, TMsgId=WM_COMMAND)
 Repacks a command message (msg) so that a child window (hCtl) can send a message to its parent regardless of whether this is a WIN16 or WIN32 application.
 
TResult SendNotification (int id, NMHDR &, TMsgId=WM_NOTIFY)
 Repacks a command message (msg) so that a child window (hCtl) can send a message to its parent regardless of whether this is a WIN16 or WIN32 application.
 
TResult SendNotification (HWND receiver, uint id, NMHDR &, TMsgId=WM_NOTIFY)
 Repacks a command message (msg) so that a child window (hCtl) can send a message to its parent regardless of whether this is a WIN16 or WIN32 application.
 
virtual TResult WindowProc (TMsgId, TParam1, TParam2)
 First virtual function called to handling incoming messages to a TWindow.
 
virtual TResult DefWindowProc (TMsgId, TParam1, TParam2)
 Virtual function provides final default processing for an incoming message Calls original window proc that was subclassed, using ::CallWindowProc to make sure that registers get setup correctly.
 
virtual void EvCommandEnable (TCommandEnabler &ce)
 Called by WindowProc to handle WM_COMMAND_ENABLE messages, EvCommandEnable calls the CmXxxx command-handling function or calls DefaultProcessing to handle the incoming message.
 
void RouteCommandEnable (HWND hInitCmdTarget, TCommandEnabler &ce)
 Walks the chain of windows from the initial target window to this window.
 
void SetTransferBuffer (void *transferBuffer, uint size)
 Sets TransferBuffer and TransferBufferSize.
 
template<class TBuffer >
void SetTransferBuffer (TBuffer *transferBuffer)
 Sets TransferBuffer and TransferBufferSize.
 
template<class TElement , uint Count>
void SetTransferBuffer (TElement(&transferBuffer)[Count])
 Sets TransferBuffer and TransferBufferSize.
 
voidGetTransferBuffer () const
 
uint GetTransferBufferSize () const
 
virtual uint Transfer (void *buffer, TTransferDirection direction)
 Transfers data to or from any window with or without children and returns the total size of the data transferred.
 
virtual void TransferData (TTransferDirection direction)
 Transfers data between the TWindow's data buffer and the child windows in its ChildList (data is not transfered between any child windows whose wfTransfer flag is not set)
 
HWND GetHandle () const
 Returns the handle of the window.
 
 operator HWND () const
 Allows a TWindow& to be used as an HWND in Windows API calls by providing an implicit conversion from TWindow to HWND.
 
bool IsWindow () const
 Returns true if an HWND is being used.
 
auto GetClassName (TCHAR *className, int maxCount) const -> int
 Returns the Windows class name for this object's window handle.
 
long GetClassLong (int index) const
 Retrieves the 32-bit value containing information about the window class.
 
long SetClassLong (int index, long newLong)
 Sets the long value at the specified offset (index).
 
uint16 GetClassWord (int index) const
 Gets a 16-bit value containing information about the class or style of the window.
 
uint16 SetClassWord (int index, uint16 newWord)
 Sets the word value at the specified offset (index).
 
LONG_PTR GetWindowLongPtr (int index) const
 Retrieves information about the window depending on the value stored in index.
 
LONG_PTR SetWindowLongPtr (int index, LONG_PTR newLong)
 Changes information about the window. For a list of constants, see GetWindowLongPtr()
 
long GetWindowLong (int index) const
 Retrieves information about the window depending on the value stored in index.
 
long SetWindowLong (int index, long newLong)
 Changes information about the window.
 
uint16 GetWindowWord (int index) const
 Retrieves information about this window depending on the value of index.
 
uint16 SetWindowWord (int index, uint16 newWord)
 Changes information about the window.
 
WNDPROC GetWindowProc () const
 
WNDPROC SetWindowProc (WNDPROC wndProc)
 
int EnumProps (PROPENUMPROC proc)
 Enumerates all the items in the property list of the current window and passes them one by one to the callback function indicated in proc.
 
HANDLE GetProp (uint16 atom) const
 Returns a handle to the property list of the specified window.
 
HANDLE RemoveProp (uint16 atom) const
 Removes the property specified by atom from the application's property list.
 
bool SetProp (uint16 atom, HANDLE data) const
 Adds an item to the property list of the specified window.
 
HANDLE GetProp (LPCTSTR str) const
 Returns a handle to the property list of the specified window.
 
HANDLE GetProp (const tstring &str) const
 
HANDLE RemoveProp (LPCTSTR str) const
 Removes the property specified by str, a null-terminated string, from the application's property list.
 
HANDLE RemoveProp (const tstring &str) const
 
bool SetProp (LPCTSTR str, HANDLE data) const
 Adds an item to the property list of the specified window.
 
bool SetProp (const tstring &str, HANDLE data) const
 
uint32 GetStyle () const
 Gets the style bits of the underlying window or the 'Style' member of the attribute structure associated with this TWindow object.
 
uint32 SetStyle (uint32 style)
 Sets the style bits of the underlying window or the 'Style' member of the attribute structure associated with this TWindow object.
 
uint32 GetExStyle () const
 Gets the extra style bits of the window.
 
uint32 SetExStyle (uint32 style)
 Sets the extra style bits of the window.
 
bool ModifyStyle (uint32 offBits, uint32 onBits, uint swpFlags=0)
 Modifies the style bits of the window.
 
bool ModifyExStyle (uint32 offBits, uint32 onBits, uint swpFlags=0)
 Modifies the style bits of the window.
 
bool MoveWindow (int x, int y, int w, int h, bool repaint=false)
 Repositions the specified window.
 
bool MoveWindow (const TRect &rect, bool repaint=false)
 Repositions the window.
 
virtual bool ShowWindow (int cmdShow)
 Displays this TWindow in a given state.
 
void ShowOwnedPopups (bool show)
 Shows or hides all owned pop-up windows according to the value of show.
 
bool IsWindowVisible () const
 Returns true if the window is visible.
 
bool IsZoomed () const
 Returns true if window is zoomed or maximized.
 
bool IsIconic () const
 Returns true if window is iconic or minimized.
 
int GetWindowTextLength () const
 Returns the length, in characters, of the specified window's title.
 
int GetWindowText (TCHAR *str, int maxCount) const
 Copies the window's title into a buffer pointed to by string.
 
tstring GetWindowText () const
 String-aware overload.
 
void SetWindowText (LPCTSTR str)
 Sets the window's text to the given string (by copying).
 
void SetWindowText (const tstring &str)
 
void SetWindowText (uint resourceStringId)
 Sets the window title to the resource string identified by the given id.
 
WINDOWPLACEMENT GetWindowPlacement () const
 Wrapper for Windows API.
 
void SetWindowPlacement (const WINDOWPLACEMENT &place)
 Wrapper for Windows API.
 
virtual void Invalidate (bool erase=true)
 Invalidates (mark for painting) the entire client area of a window.
 
virtual void InvalidateRect (const TRect &rect, bool erase=true)
 Invalidates a specified client area.
 
void InvalidateRgn (HRGN hRgn, bool erase=true)
 Invalidates a client area within a region specified by the hRgn parameter when the application receives a WM_PAINT message.
 
void Validate ()
 Calls the function ValidateRect to validate (that is, remove from the area to be updated) the entire client area (the area you can use for drawing).
 
void ValidateRect (const TRect &rect)
 Validates a portion of the client area indicated by rect.
 
void ValidateRgn (HRGN hRgn)
 Validates the client area within a region of the current window.
 
void UpdateWindow ()
 Updates the client area of the specified window by immediately sending a WM_PAINT message.
 
bool FlashWindow (bool invert)
 Changes the window from active to inactive or vice versa.
 
bool GetUpdateRect (TRect &rect, bool erase=true) const
 Retrieves the screen coordinates of the rectangle that encloses the updated region of the specified window.
 
int GetUpdateRgn (TRegion &rgn, bool erase=true) const
 Copies a window's update region into a region specified by region.
 
bool LockWindowUpdate (bool lock=true)
 Prevents or enables window drawing for one window at a time.
 
bool RedrawWindow (TRect *update, HRGN hUpdateRgn, uint redrawFlags=RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE)
 Redraws the rectangle specified by update and the region specified by hUpdateRgn.
 
auto GetWindowRgn (TRegion &) const -> int
 Obtains a copy of the region of the window within which the system permits drawing.
 
void ResetWindowRgn (bool repaint=false)
 Calls SetWindowRgn(nullptr, repaint).
 
auto SetWindowRgn (HRGN, bool repaint=false) -> bool
 Sets the area within the window where the system permits drawing.
 
auto SetWindowRgn (const TRegion &, bool repaint=false) -> bool=delete
 
auto SetWindowRgn (TRegion &&r, bool repaint=false) -> bool
 Overload for TRegion.
 
int GetDlgCtrlID () const
 Returns the ID of the control.
 
HWND GetDlgItem (int childId) const
 Retrieves the handle of a control specified by childId.
 
uint GetDlgItemInt (int childId, bool *translated=0, bool isSigned=true) const
 Translates the text of a specified control into an integer value and returns it.
 
void SetDlgItemInt (int childId, uint value, bool isSigned=true) const
 Sets the child window with the Id (childId) in the window to the integer value specified in value.
 
int GetDlgItemText (int childId, TCHAR *text, int maxValue) const
 Retrieves the text of a control specified by childId.
 
tstring GetDlgItemText (int childId) const
 String-aware overload.
 
void SetDlgItemText (int childId, LPCTSTR text) const
 Sets the title or text of a control in a dialog box.
 
void SetDlgItemText (int childId, const tstring &text) const
 
void SetDlgItemText (int childId, uint resourceStringId) const
 
uint IsDlgButtonChecked (int buttonId) const
 Indicates if the child button specified in the integer parameter, buttonId, is checked, or if a button is grayed, checked, or neither.
 
bool IsChild (HWND hWnd) const
 Returns true if the window is a child window or a descendant window of this window.
 
HWND GetNextDlgGroupItem (HWND hWndCtrl, bool previous=false) const
 Returns either the next or the previous control in the dialog box.
 
HWND GetNextDlgTabItem (HWND hWndCtrl, bool previous=false) const
 Returns the handle of the first control that lets the user press the Tab key to move to the next control (that is, the first control with the WS_TABSTOP style associated with it).
 
void CheckDlgButton (int buttonId, uint check)
 Places a check mark in (or removes a check mark from) the button specified in buttonId.
 
void CheckRadioButton (int firstButtonId, int lastButtonId, int checkButtonId)
 Checks the radio button specified by checkButtonId and removes the check mark from the other radio buttons in the group.
 
void SetDlgItemFont (int childId, HFONT f, bool redraw=false) const
 
HFONT GetDlgItemFont (int childId) const
 
TRect GetDlgItemRect (int childId) const
 Returns the window rectangle of the given child, specified in this window's client coordinates.
 
HMENU GetMenu () const
 Returns the handle to the menu of the indicated window.
 
HMENU GetSystemMenu (bool revert=false) const
 Returns a handle to the system menu so that an application can access the system menu.
 
bool SetMenu (HMENU hMenu)
 Sets the specified window's menu to the menu indicated by hMenu.
 
bool HiliteMenuItem (HMENU hMenu, uint idItem, uint hilite)
 Either highlights or removes highlighting from a top-level item in the menu.
 
void DrawMenuBar ()
 DrawMenuBar redraws the menu bar.
 
bool KillTimer (UINT_PTR timerId)
 Gets rid of the timer and removes any WM_TIMER messages from the message queue.
 
UINT_PTR SetTimer (UINT_PTR timerId, uint timeout, TIMERPROC proc=0)
 Creates a timer object associated with this window.
 
bool RegisterHotKey (int idHotKey, uint modifiers, uint virtKey)
 Registers a hotkey ID with the current application.
 
bool UnregisterHotKey (int idHotKey)
 Unregisters a hotkey ID with the current application.
 
bool WinHelp (LPCTSTR helpFile, uint command, ULONG_PTR data) const
 Invokes a specified help system.
 
bool WinHelp (const tstring &helpFile, uint command, ULONG_PTR data) const
 
void AssignContextMenu (TPopupMenu *menu)
 Associates a pop-up menu with the window so that it can automatically handle a WM_CONTEXTMENU message.
 
TPopupMenuGetContextMenu () const
 Returns the associated popup menu used by the window.
 
int MessageBox (LPCTSTR text, LPCTSTR caption=0, uint flags=MB_OK) const
 Creates and displays a message box that contains a message (text), a title (caption), and icons or push buttons (type).
 
int MessageBox (const tstring &text, const tstring &caption=tstring(), uint flags=MB_OK) const
 
int MessageBox (uint resId, LPCTSTR caption=0, uint flags=MB_OK) const
 
int MessageBox (uint resId, const tstring &caption, uint flags=MB_OK) const
 
auto MessageBoxIndirect (HINSTANCE resourceModule, TResId text, TResId caption, uint flags, TResId icon, DWORD_PTR contextHelpId, MSGBOXCALLBACK, DWORD languageId) const -> int
 Displays a standard message box.
 
auto MessageBoxIndirect (TResId icon, const tstring &text, const tstring &caption, uint flags=MB_OK) const -> int
 Displays a standard message box using the given icon.
 
auto FormatMessageBox (const tstring &formatStr, const tstring &caption, uint flags,...) const -> int
 
auto FormatMessageBox (const tstring &, std::nullptr_t, uint,...) const -> int=delete
 
HTASK GetWindowTask () const
 Returns a handle to the task that created the specified window.
 
void DragAcceptFiles (bool accept)
 If a window can process dropped files, DragAcceptFiles sets accept to true.
 
TCurrentEventGetCurrentEvent ()
 Returns the current event to be processed in the message queue.
 
void SethAccel (HACCEL)
 
auto GetChildren ()
 Returns a TWindow::TChildrenRange that can be iterated by standard means.
 
auto GetChildren () const
 Const overload of TWindow::GetChildren.
 
TWindowNext ()
 Returns a pointer to the next sibling window in the window's sibling list.
 
auto Next () const -> const TWindow *
 
TWindowPrevious ()
 Returns a pointer to the TWindow's previous sibling (the window previous to the TWindow in its parent's child window list)
 
auto Previous () const -> const TWindow *
 
TWindowGetFirstChild ()
 Returns a pointer to the first child window, which is the first window created in the interface object's child list.
 
auto GetFirstChild () const -> const TWindow *
 
TWindowGetLastChild ()
 Returns a pointer to the last child window in the interface object's child list.
 
auto GetLastChild () const -> const TWindow *
 
uint NumChildren () const
 Returns the number of child windows of the window.
 
bool GetScrollInfo (int bar, SCROLLINFO *scrollInfo) const
 Retrieves the properties of the given scroll bar.
 
SCROLLINFO GetScrollInfo (int bar, uint mask=SIF_ALL) const
 Function-style overload Returns selected properties of the given scroll bar.
 
int SetScrollInfo (int bar, SCROLLINFO *scrollInfo, bool redraw=true)
 Sets the properties of the given scroll bar.
 
int GetScrollPos (int bar) const
 Returns the thumb position in the scroll bar.
 
int SetScrollPos (int bar, int pos, bool redraw=true)
 Sets the thumb position in the scroll bar.
 
int GetScrollTrackPos (int bar) const
 Returns the thumb track position in the scroll bar.
 
void GetScrollRange (int bar, int &minPos, int &maxPos) const
 Returns the minimum and maximum positions in the scroll bar.
 
TScrollRange GetScrollRange (int bar) const
 Function-style overload.
 
void SetScrollRange (int bar, int minPos, int maxPos, bool redraw=true)
 Sets the thumb position in the scroll bar.
 
void SetScrollRange (int bar, const TScrollRange &, bool redraw=true)
 Overload taking the range as a pair.
 
int GetScrollPage (int bar) const
 Returns the page property (SCROLLINFO::nPage) of the given scroll bar.
 
void SetScrollPage (int bar, int page, bool redraw=true)
 Sets the page property (SCROLLINFO::nPage) of the given scroll bar.
 
bool EnableScrollBar (uint sbFlags=SB_BOTH, uint arrowFlags=ESB_ENABLE_BOTH)
 Disables or enables one or both of the scroll bar arrows on the scroll bars associated with this window.
 
void ShowScrollBar (int bar, bool show=true)
 Displays or hides the scroll bar.
 
void ScrollWindow (int dx, int dy, const TRect *scroll=nullptr, const TRect *clip=nullptr)
 Scrolls a window in the vertical (dx) and horizontal (dy) directions.
 
void ScrollWindowEx (int dx, int dy, const TRect *scroll=0, const TRect *clip=0, HRGN hUpdateRgn=nullptr, TRect *update=0, uint flags=0)
 Scrolls a window in the vertical (dx) and horizontal (dy) directions.
 
void ShutDownWindow (int retVal=0)
 This inline version of ShutDownWindow calls the static version of ShutDownWindow.
 
TResult SendMessage (TMsgId, TParam1=0, TParam2=0) const
 Sends a message (msg) to a specified window or windows.
 
TResult SendDlgItemMessage (int childId, TMsgId, TParam1=0, TParam2=0)
 Sends a message (msg) to the control specified in childId.
 
bool PostMessage (TMsgId, TParam1=0, TParam2=0)
 Posts a message (msg) to the window in the application's message queue.
 
HWND SetCapture ()
 Sets the mouse capture to the current window.
 
HWND SetFocus ()
 Sets the keyboard focus to current window and activates the window that receives the focus by sending a WM_SETFOCUS message to the window.
 
bool IsWindowEnabled () const
 Returns true if the window is enabled.
 
virtual bool EnableWindow (bool enable)
 Allows the given window to receive input from the keyboard of mouse.
 
void SetRedraw (bool redraw)
 Sends a WM_SETREDRAW message to a window so that changes can be redrawn (redraw = true) or to prevent changes from being redrawn (redraw = false).
 
bool TrackMouseEvent (uint flags=TME_HOVER|TME_LEAVE, int hoverTime=HOVER_DEFAULT)
 Posts messages when the mouse pointer leaves a window or hovers over a window for a specified amount of time.
 
bool CancelMouseEvent (uint flags=TME_HOVER|TME_LEAVE)
 Encapsulates a call to TrackMouseEvent, passing the TME_CANCEL flag.
 
TRACKMOUSEEVENT QueryMouseEventTracking () const
 Returns the current state of mouse event tracking initiated by TrackMouseEvent.
 
void ClientToScreen (TPoint &point) const
 Converts the client coordinates specified in point to screen coordinates for the new window.
 
TPoint MapClientToScreen (const TPoint &p) const
 Function-style version of ClientToScreen.
 
void MapClientToScreen (TPoint *p, int count) const
 Maps the given points, specified in client coordinates in this window, to screen coordinates.
 
template<size_t Count>
void MapClientToScreen (TPoint(&p)[Count]) const
 Overload for array See MapClientToScreen(TPoint*, int).
 
TRect MapClientToScreen (const TRect &r) const
 Functional-style overload for TRect; converts the given rectangle coordinates and returns the result.
 
void ScreenToClient (TPoint &point) const
 Uses the screen coordinates specified in point to calculate the client window's coordinates and then places the new coordinates into point.
 
TPoint MapScreenToClient (const TPoint &p) const
 Functional-style version of ScreenToClient.
 
void MapScreenToClient (TPoint *p, int count) const
 Maps the given points, specified in screen coordinates, to client coordinates in this window.
 
template<size_t Count>
void MapScreenToClient (TPoint(&p)[Count]) const
 Overload for array See MapScreenToClient(TPoint*, int).
 
TRect MapScreenToClient (const TRect &r) const
 Functional-style overload for TRect; converts the given rectangle coordinates and returns the result.
 
void MapWindowPoints (HWND hWndTo, TPoint *pts, int count) const
 Maps a set of points in one window to a relative set of points in another window.
 
void MapWindowPoints (const TWindow &wndTo, TPoint *p, int n) const
 Overload for TWindow See MapWindowPoints(HWND, TPoint*, int).
 
template<size_t Count>
void MapWindowPoints (HWND hWndTo, TPoint(&p)[Count]) const
 Overload for array See MapWindowPoints(HWND, TPoint*, int).
 
template<size_t Count>
void MapWindowPoints (const TWindow &wndTo, TPoint(&p)[Count]) const
 Overload for TWindow and array See MapWindowPoints(HWND, TPoint*, int).
 
TPoint MapWindowPoints (HWND hWndTo, const TPoint &p) const
 Functional-style overload for TPoint; converts the given point coordinates and returns the result.
 
TPoint MapWindowPoints (const TWindow &wndTo, const TPoint &p) const
 Overload for TWindow and TPoint See MapWindowPoints(HWND, const TPoint&).
 
TRect MapWindowPoints (HWND hWndTo, const TRect &r) const
 Functional-style overload for TRect; converts the given rectangle coordinates and returns the result.
 
TRect MapWindowPoints (const TWindow &wndTo, const TRect &r) const
 Overload for TWindow and TRect See MapWindowPoints(HWND, const TRect&).
 
TRect MapWindowRect (HWND hWndTo) const
 Maps the window's rectangle (GetWindowRect) to client coordinates in the given destination window.
 
TRect MapWindowRect (const TWindow &wndTo) const
 Overload for TWindow See MapWindowRect(HWND).
 
TRect MapClientRect (HWND hWndTo) const
 Maps the window's client rectangle (GetClientRect) to client coordinates in the given destination window.
 
TRect MapClientRect (const TWindow &wndTo) const
 Overload for TWindow See MapClientRect(HWND).
 
void GetClientRect (TRect &rect) const
 Gets the coordinates of the window's client area and then copies them into the object referred to by TRect.
 
TRect GetClientRect () const
 Gets the coordinates of the window's client area (the area in a window you can use for drawing).
 
HWND ChildWindowFromPoint (const TPoint &point) const
 Determines which of the child windows contains the point specified in TPoint.
 
void GetWindowRect (TRect &rect) const
 Gets the screen coordinates of the window's rectangle and copies them into rect.
 
TRect GetWindowRect () const
 Gets the screen coordinates of the window's rectangle.
 
TRect GetChildRect (HWND hWnd) const
 Returns the window rectangle of the given window, specified in this window's client coordinates.
 
TRect GetChildRect (const TWindow &wnd) const
 Overload for TWindow See GetChildRect(HWND).
 
void BringWindowToTop ()
 Brings a pop-up or child window to the top of the stack of overlapping windows and activates it.
 
HWND SetActiveWindow ()
 Activates a top-level window.
 
HWND GetLastActivePopup () const
 Returns the last active pop-up window in the list.
 
HWND GetNextWindow (uint dirFlag) const
 Finds the handle associated with either the next or previous window in the window manager's list.
 
HWND GetTopWindow () const
 Returns a handle to the top window currently owned by this parent window.
 
HWND GetWindow (uint cmd) const
 Returns the handle of the window that has the indicated relationship to this window.
 
bool SetWindowPos (HWND hWndInsertAfter, const TRect &rect, uint flags)
 Changes the size of the window pointed to by rect.
 
bool SetWindowPos (HWND hWndInsertAfter, int x, int y, int w, int h, uint flags)
 Set the new window position.
 
void CreateCaret (HBITMAP hBitmap)
 Creates a new caret for the system.
 
void CreateCaret (bool isGray, int width, int height)
 Create a new caret for the system with the specified shape, bitmap shade, width, and height.
 
void HideCaret ()
 Removes the caret from the specified display screen.
 
void ShowCaret ()
 Displays the caret in the specified shape in the active window at the current position.
 
void SetWindowFont (HFONT font, bool redraw=true)
 Sets the font that a control uses to draw text.
 
void SetWindowFont (const TFont &font, bool redraw=true)
 Sets the font that a control uses to draw text.
 
HFONT GetWindowFont ()
 Gets the font the control uses to draw text.
 
- Public Member Functions inherited from owl::TEventHandler
virtual bool Find (TEventInfo &info, TEqualOperator op=0)
 Searches the list of response table entries looking for a match.
 
TResult Dispatch (TEventInfo &info, TParam1, TParam2=0)
 Takes the message data from TEventInfo's Msg data member and dispatches it to the correct event-handling function.
 
TResult DispatchMsg (TMsgId, uint id, TParam1, TParam2)
 Search for the event given the message and it and dispatch to the event handler if found.
 
- Public Member Functions inherited from owl::TStreamableBase
virtual ~TStreamableBase ()
 

Protected Member Functions

virtual auto GetWindowClassName () -> TWindowClassName
 
virtual void DeleteItem (DELETEITEMSTRUCT &deleteInfo)
 Function called when a WM_DELETEITEM is sent to parent on our behalf.
 
- Protected Member Functions inherited from owl::TControl
 TControl (HWND hWnd, TModule *module=nullptr)
 Constructor to alias non-OWL control.
 
virtual int CompareItem (COMPAREITEMSTRUCT &compareInfo)
 Function called when a WM_COMPAREITEM is sent to parent on our behalf.
 
virtual void MeasureItem (MEASUREITEMSTRUCT &measureInfo)
 Function called when a WM_MEASUREITEM is sent to parent on our behalf.
 
virtual void DrawItem (DRAWITEMSTRUCT &drawInfo)
 Function called when a WM_DRAWITEM is sent to parent on our behalf.
 
virtual void ODADrawEntire (DRAWITEMSTRUCT &drawInfo)
 Responds to a notification message sent to a drawable control when the control needs to be drawn.
 
virtual void ODAFocus (DRAWITEMSTRUCT &drawInfo)
 Responds to a notification sent to a drawable control when the focus has shifted to or from the control.
 
virtual void ODASelect (DRAWITEMSTRUCT &drawInfo)
 Responds to a notification sent to a drawable control when the selection state of the control changes.
 
void EvPaint ()
 Intercept WM_PAINT to redirect from TWindow to the underlying control if this Owl object is just a wrapper for a predefined class.
 
auto EvEraseBkgnd (HDC) -> bool
 Provides special handling for predefined controls.
 
int EvCompareItem (uint ctrlId, const COMPAREITEMSTRUCT &comp)
 Handles WM_COMPAREITEM message (for owner draw controls) by calling the corresponding virtual function.
 
void EvDeleteItem (uint ctrlId, const DELETEITEMSTRUCT &del)
 Handles WM_DELETEITEM message (for owner draw controls) by calling the corresponding virtual function.
 
void EvDrawItem (uint ctrlId, const DRAWITEMSTRUCT &draw)
 Handles WM_DRAWITEM message (for owner draw controls) by calling the corresponding virtual function.
 
void EvMeasureItem (uint ctrlId, MEASUREITEMSTRUCT &meas)
 Handles WM_MEASUREITEM message (for owner draw controls) by calling the corresponding virtual function.
 
- Protected Member Functions inherited from owl::TWindow
 TWindow ()
 Protected constructor for use by immediate virtually derived classes.
 
void Init (TWindow *parent, LPCTSTR title, TModule *module)
 Normal initialization of a default constructed TWindow.
 
void Init (TWindow *parent, const tstring &title, TModule *module)
 
void Init (HWND hWnd, TModule *module)
 Wrapper initialization of a default constructed TWindow.
 
virtual THandle PerformCreate ()
 Called from Create to perform the final step in creating an Windows interface element to be associated with a TWindow.
 
void SetHandle (THandle)
 Sets the window handle in a derived class.
 
void GetHWndState (bool forceStyleSync=false)
 Copies the style, coordinate, and the resource id (but not the title) from the existing HWnd into the TWindow members.
 
void GetWindowTextTitle ()
 Updates the TWindow internal caption (Title) from the current window's caption.
 
virtual void GetWindowClass (WNDCLASS &wndClass)
 Redefined by derived classes, GetWindowClass fills the supplied MS-Windows registration class structure with registration attributes, thus, allowing instances of TWindow to be registered.
 
void PerformSetupAndTransfer ()
 Ensures that the window is fully set up; then transfers data into the window.
 
virtual void SetupWindow ()
 Performs setup following creation of an associated MS-Windows window.
 
virtual void CleanupWindow ()
 Always called immediately before the HWindow becomes invalid, CleanupWindow gives derived classes an opportunity to clean up HWND related resources.
 
void DispatchScroll (uint scrollCode, uint thumbPos, HWND hWndCtrl)
 Called by EvHScroll and EvVScroll to dispatch messages from scroll bars.
 
void LoadAcceleratorTable ()
 Loads a handle to the window's accelerator table specified in the TWindowAttr structure (Attr.AccelTable).
 
virtual void RemoveChild (TWindow *child)
 Removes a child window.
 
TWindowGetWindowPtr (HWND hWnd) const
 Calls TApplication:GetWindowPtr on the application associated with this window.
 
void EvClose ()
 The default response to a WM_CLOSE message is to call CloseWindow() and then have the window deleted if the Handle was really destroyed.
 
bool EvCreate (CREATESTRUCT &)
 Response method for an incoming WM_CREATE message.
 
void EvDestroy ()
 Responds to an incoming WM_DESTROY message.
 
int EvCompareItem (uint ctrlId, const COMPAREITEMSTRUCT &compareInfo)
 Handles WM_COMPAREITEM message (for owner draw controls) by forwarding message to control itself.
 
void EvDeleteItem (uint ctrlId, const DELETEITEMSTRUCT &deleteInfo)
 Handles WM_DELETEITEM message (for owner draw controls) by forwarding message to control itself.
 
void EvDrawItem (uint ctrlId, const DRAWITEMSTRUCT &drawInfo)
 
void EvMeasureItem (uint ctrlId, MEASUREITEMSTRUCT &measureInfo)
 Handles WM_MEASUREITEM message (for owner draw controls & menus) by forwarding message to control itself.
 
void EvHScroll (uint scrollCode, uint thumbPos, HWND hWndCtl)
 Response method for an incoming WM_HSCROLL message.
 
void EvVScroll (uint scrollCode, uint thumbPos, HWND hWndCtl)
 Response method for an incoming WM_VSCROLL message.
 
void EvMove (const TPoint &clientOrigin)
 Save the normal position of the window.
 
void EvNCDestroy ()
 Responds to an incoming WM_NCDESTROY message, the last message sent to an MS-Windows interface element.
 
bool EvQueryEndSession (uint flags)
 Respond to Windows attempt to close down.
 
void EvSize (uint sizeType, const TSize &size)
 Response method for an incoming WM_SIZE message.
 
void EvLButtonDown (uint modKeys, const TPoint &point)
 Response method for an incoming WM_LBUTTONDOWN message.
 
bool EvEraseBkgnd (HDC)
 Handler for WM_ERASEBKGND.
 
void EvPaint ()
 Response method for an incoming WM_PAINT message.
 
void EvSysColorChange ()
 Respond to WM_SYSCOLORCHANGE by broadcasting it to all children.
 
void EvChildInvalid (HWND hWnd)
 Handle message posted to us by a control needing assistance in dealing with invalid inputs.
 
void EvCompacting (uint compactRatio)
 The default message handler for WM_COMPACTING.
 
void EvDevModeChange (LPCTSTR devName)
 The default message handler for WM_DEVMODECHANGE.
 
void EvEnable (bool enabled)
 The default message handler for WM_ENABLE.
 
void EvEndSession (bool endSession, uint flags)
 Provides default handling for WM_ENDSESSION.
 
void EvFontChange ()
 The default message handler for WM_FONTCHANGE.
 
void EvSysCommand (uint cmdType, const TPoint &point)
 Responds to a user-selected command from the System menu or when the user selects the maximize or minimize box.
 
void EvTimeChange ()
 The default message handler for WM_TIMECHANGE.
 
void EvTimer (uint timerId)
 The default message handler for WM_TIMER.
 
void EvSettingChange (uint flags, LPCTSTR section)
 
void EvActivate (uint active, bool minimized, HWND hWndOther)
 Default message handler for WM_ACTIVATE.
 
void EvActivateApp (bool active, DWORD threadId)
 The default message handler for WM_ACTIVATEAPP.
 
void EvCancelMode ()
 The default message handler for WM_CANCELMODE.
 
void EvGetMinMaxInfo (MINMAXINFO &minmaxinfo)
 The default message handler for WM_GETMINMAXINFO.
 
int EvGetText (int bufSize, TCHAR *buf)
 The default message handler for WM_GETTEXT.
 
int EvGetTextLength ()
 The default message handler for WM_GETTEXTLENGTH.
 
void EvKillFocus (HWND hWndGetFocus)
 Handle WM_KILLFOCUS so that we can have a parent window hold onto our Handle and possibly restore focus later.
 
uint EvMouseActivate (HWND hTopLevel, uint hitCode, TMsgId)
 The default message handler for WM_MOUSEACTIVATE.
 
void EvHotKey (int idHotKey, uint modifiers, uint vk)
 
bool EvCopyData (HWND hwnd, const COPYDATASTRUCT &)
 
void EvNextDlgCtl (TParam1 handleOrDirectionFlag, bool isHandle)
 
void EvParentNotify (const TParentNotify &)
 The default message handler for WM_PARENTNOTIFY.
 
HICON EvQueryDragIcon ()
 The default message handler for WM_QUERYDRAGICON.
 
bool EvQueryOpen ()
 The default message handler for WM_QUERYOPEN.
 
void EvQueueSync ()
 The default message handler for WM_QUEUESYNC.
 
bool EvSetCursor (HWND hWndCursor, uint codeHitTest, TMsgId mouseMsg)
 Response method for an incoming WM_SETCURSOR message.
 
void EvSetFocus (HWND hWndLostFocus)
 The default message handler for WM_SETFOCUS.
 
HFONT EvGetFont ()
 The default message handler for WM_GETFONT.
 
void EvSetFont (HFONT hFont, bool redraw)
 The default message handler for WM_SETFONT.
 
void EvSetRedraw (bool redraw)
 The default message handler for WM_SETREDRAW.
 
void EvSetText (LPCTSTR text)
 The default message handler for WM_SETTEXT.
 
void EvShowWindow (bool show, uint status)
 The default message handler for WM_SHOWWINDOW.
 
void EvWindowPosChanged (const WINDOWPOS &windowPos)
 The default message handler for WM_WINDOWPOSCHANGED.
 
bool EvWindowPosChanging (WINDOWPOS &)
 The default message handler for WM_WINDOWPOSCHANGING.
 
HBRUSH EvCtlColor (HDC hDC, HWND hWndChild, uint ctlType)
 Handler for control color messages (WM_CTLCOLOR family).
 
void EvChar (uint key, uint repeatCount, uint flags)
 The default message handler for WM_CHAR.
 
void EvDeadChar (uint deadKey, uint repeatCount, uint flags)
 The default message handler for WM_DEADCHAR.
 
void EvKeyDown (uint key, uint repeatCount, uint flags)
 The default message handler for WM_KEYDOWN.
 
void EvKeyUp (uint key, uint repeatCount, uint flags)
 The default message handler for WM_KEYUP.
 
void EvSysChar (uint key, uint repeatCount, uint flags)
 The default message handler for WM_SYSCHAR.
 
void EvSysDeadChar (uint key, uint repeatCount, uint flags)
 The default message handler for WM_SYSDEADCHAR.
 
void EvSysKeyDown (uint key, uint repeatCount, uint flags)
 The default message handler for WM_SYSKEYDOWN.
 
void EvSysKeyUp (uint key, uint repeatCount, uint flags)
 The default message handler for WM_SYSKEYUP.
 
void EvLButtonDblClk (uint modKeys, const TPoint &point)
 The default message handler for WM_LBUTTONDBLCLK.
 
void EvLButtonUp (uint modKeys, const TPoint &point)
 The default message handler for WM_LBUTTONUP.
 
void EvMButtonDblClk (uint modKeys, const TPoint &point)
 The default message handler for WM_MBUTTONDBLCLK.
 
void EvMButtonDown (uint modKeys, const TPoint &point)
 The default message handler for WM_MBUTTONDOWN.
 
void EvMButtonUp (uint modKeys, const TPoint &point)
 The default message handler for WM_MBUTTONUP.
 
void EvMouseMove (uint modKeys, const TPoint &point)
 The default message handler for WM_MOUSEMOVE.
 
void EvMouseHWheel (uint modKeys, int zDelta, const TPoint &point)
 Event handler for WM_MOUSEHWHEEL.
 
void EvMouseWheel (uint modKeys, int zDelta, const TPoint &point)
 Event handler for WM_MOUSEWHEEL.
 
void EvRButtonDblClk (uint modKeys, const TPoint &point)
 The default message handler for WM_RBUTTONDBLCLK.
 
void EvRButtonDown (uint modKeys, const TPoint &point)
 The default message handler for WM_RBUTTONDOWN.
 
void EvRButtonUp (uint modKeys, const TPoint &point)
 The default message handler for WM_RBUTTONUP.
 
void EvInitMenu (HMENU hMenu)
 The default message handler for WM_INITMENU.
 
void EvInitMenuPopup (HMENU hPopupMenu, uint index, bool isSysMenu)
 Handle WM_INITMENUPOPUP while embeded to generate command enable messages for our server menu items.
 
int32 EvMenuChar (uint nChar, uint menuType, HMENU hMenu)
 The default message handler for WM_MENUCHAR.
 
void EvMenuSelect (uint menuItemId, uint flags, HMENU hMenu)
 The default message handler for WM_MENUSELECT.
 
void EvContextMenu (HWND childHwnd, int x, int y)
 The default message handler for WM_CONTEXTMENU.
 
uint EvGetDlgCode (const MSG *msg)
 The default message handler for WM_GETDLGCODE.
 
void EvEnterIdle (uint source, HWND hWndDlg)
 The default message handler for WM_ENTERIDLE.
 
void EvSpoolerStatus (uint jobStatus, uint jobsLeft)
 The default message handler for WM_SPOOLERSTATUS.
 
void EvAskCBFormatName (uint bufLen, TCHAR *buffer)
 The default message handler for WM_ASKCBFORMATNAME.
 
void EvChangeCBChain (HWND hWndRemoved, HWND hWndNext)
 The default message handler for WM_CHANGECBCHAIN.
 
void EvDrawClipboard ()
 The default message handler for WM_DRAWCLIPBOARD.
 
void EvDestroyClipboard ()
 The default message handler for WM_DESTROYCLIPBOARD.
 
void EvHScrollClipboard (HWND hCBViewer, uint scrollCode, uint pos)
 The default message handler for WM_HSCROLLCLIPBOARD.
 
void EvPaintClipboard (HWND hWnd, const PAINTSTRUCT &)
 The default message handler for WM_PAINTCLIPBOARD.
 
void EvRenderAllFormats ()
 The default message handler for WM_RENDERALLFORMATS.
 
void EvRenderFormat (uint dataFormat)
 The default message handler for WM_RENDERFORMAT.
 
void EvSizeClipboard (HWND hWndViewer, const TRect &)
 The default message handler for WM_SIZECLIPBOARD.
 
void EvVScrollClipboard (HWND hCBViewer, uint scrollCode, uint pos)
 The default message handler for WM_VSCROLLCLIPBOARD.
 
void EvPaletteChanged (HWND hWndPalChg)
 The default message handler for WM_PALETTECHANGED.
 
void EvPaletteIsChanging (HWND hWndPalChg)
 The default message handler for WM_PALETTEISCHANGING.
 
bool EvQueryNewPalette ()
 The default message handler for WM_QUERYNEWPALETTE.
 
void EvDropFiles (TDropInfo dropInfo)
 The default message handler for WM_DROPFILES.
 
int EvCharToItem (uint ch, HWND hWndListBox, int caretIndex)
 The default message handler for WM_CHARTOITEM.
 
int EvVKeyToItem (uint key, HWND hWndListBox, int caretIndex)
 The default message handler for WM_VKEYTOITEM.
 
bool EvNCActivate (bool active)
 The default message handler for WM_NCACTIVATE.
 
uint EvNCCalcSize (bool calcValidRects, NCCALCSIZE_PARAMS &)
 The default message handler for WM_NCCALCSIZE.
 
bool EvNCCreate (CREATESTRUCT &)
 The default message handler for WM_NCCREATE.
 
uint EvNCHitTest (const TPoint &)
 The default message handler for WM_NCHITTEST.
 
void EvNCLButtonDblClk (uint codeHitTest, const TPoint &)
 The default message handler for WM_NCLBUTTONDBLCLK.
 
void EvNCLButtonDown (uint codeHitTest, const TPoint &)
 The default message handler for WM_NCLBUTTONDOWN.
 
void EvNCLButtonUp (uint codeHitTest, const TPoint &)
 The default message handler for WM_NCLBUTTONUP.
 
void EvNCMButtonDblClk (uint codeHitTest, const TPoint &)
 The default message handler for WM_NCMBUTTONDBLCLK.
 
void EvNCMButtonDown (uint codeHitTest, const TPoint &)
 The default message handler for WM_NCMBUTTONDOWN.
 
void EvNCMButtonUp (uint codeHitTest, const TPoint &)
 The default message handler for WM_NCMBUTTONUP.
 
void EvNCMouseMove (uint codeHitTest, const TPoint &)
 The default message handler for WM_NCMOUSEMOVE.
 
void EvNCPaint (HRGN)
 The default message handler for WM_NCPAINT.
 
void EvNCRButtonDblClk (uint codeHitTest, const TPoint &)
 The default message handler for WM_NCRBUTTONDBLCLK.
 
void EvNCRButtonDown (uint codeHitTest, const TPoint &)
 The default message handler for WM_NCRBUTTONDOWN.
 
void EvNCRButtonUp (uint codeHitTest, const TPoint &)
 The default message handler for WM_NCRBUTTONUP.
 
HICON EvGetIcon (bool isBigIcon)
 
HICON EvSetIcon (bool isBigIcon, HICON)
 
- Protected Member Functions inherited from owl::TEventHandler
bool SearchEntries (const TGenericTableEntry *entries, TEventInfo &info, TEqualOperator op)
 Low-level response table search function.
 

Unique item identifier messages

using TItemId = TParam1
 Defines the type of a unique identifier for an item.
 
auto MapIndexToId (int index) const -> TItemId
 Associates a unique identifier with an item.
 
auto MapIdToIndex (TItemId id) const -> int
 Retrieves the current index for the item with the given unique identifier.
 

Additional Inherited Members

- Static Public Member Functions inherited from owl::TWindow
static void ShutDownWindow (TWindow *win, int retVal=0)
 This version of ShutDownWindow unconditionally shuts down a given window, calls Destroy on the interface element, and then deletes the interface object.
 
static HWND GetCapture ()
 Returns the handle of the window that has captured the mouse.
 
static void ReleaseCapture ()
 Releases the mouse capture from this window.
 
static HWND GetFocus ()
 Gets a handle to the window that has the focus.
 
static HWND WindowFromPoint (const TPoint &point)
 Returns the handle of the window in which the specified point (point) lies.
 
static void AdjustWindowRect (TRect &rect, uint32 style, bool menu)
 Calculates the size of the window rectangle according to the indicated client-rectangle size.
 
static void AdjustWindowRectEx (TRect &rect, uint32 style, bool menu, uint32 exStyle)
 Calculates the size of a window rectangle that has an extended style.
 
static HWND GetActiveWindow ()
 Retrieves the handle of the active window.
 
static HWND GetDesktopWindow ()
 Returns a handle to the desktop window.
 
static uint GetCaretBlinkTime ()
 Retrieves the caret blink rate in milliseconds.
 
static void GetCaretPos (TPoint &point)
 Gets the position of the caret in the coordinates of the client window.
 
static TPoint GetCaretPos ()
 
static void SetCaretBlinkTime (uint16 milliSecs)
 Sets the caret blink rate in milliseconds.
 
static void SetCaretPos (int x, int y)
 Sets the position of the caret in the coordinates of the client window.
 
static void SetCaretPos (const TPoint &pos)
 Sets the position of the caret in the coordinates of the client window.
 
static void DestroyCaret ()
 DestroyCaret first checks the ownership of the caret.
 
static void GetCursorPos (TPoint &pos)
 Retrieves the cursor's current position (in window screen coordinates) and copies the values into the structure pointed to by pos.
 
static TPoint GetCursorPos ()
 
static TPoint GetMessagePos ()
 
- Static Protected Member Functions inherited from owl::TWindow
static LRESULT CALLBACK InitWndProc (HWND, UINT msg, WPARAM, LPARAM)
 Callback process for hooking TWindow to native window.
 

Detailed Description

Encapsulates the ListView control, a window that displays a collection of items, each item consisting of an icon and a label.

List view controls provide several ways of arranging items and displaying individual items. For example, additional information about each item can be displayed in columns to the right of the icon and label.

See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774737.aspx

Definition at line 584 of file listviewctrl.h.

Member Typedef Documentation

◆ TItemId

Defines the type of a unique identifier for an item.

Definition at line 928 of file listviewctrl.h.

Member Enumeration Documentation

◆ TArrangeCode

TArrangeCode is used to describe how to arrange the items in a list window control.

Enumerator
Default 

Use default for control style.

Left 

Align items to the left edge.

Top 

Align items to the top edge.

SnapToGrid 

Snap icons to nearest grid position.

Definition at line 592 of file listviewctrl.h.

◆ TImageListType

Describes the type of image list for use with the list window control.

Enumerator
Normal 

Normal image list.

Small 

Small icons for LVS_SMALLICON.

State 

State image.

Definition at line 603 of file listviewctrl.h.

◆ TItemRectType

Describes the type of rectangle boundaries to retrieve.

Enumerator
Bounds 

Entire boundary (icon and label)

Icon 

Only the icon.

Label 

Only the label.

SelectBounds 

Union of Icon+Label but no colmns.

Definition at line 613 of file listviewctrl.h.

◆ TNextItemCode

Describes the next item to retrieve from the current item.

Can have only one relational property, but can have multiple search states.

Note
Flags within the DirectionMask are mutually exclusive. Flags within the the StateMask are not mutually exclusive.
Enumerator
Above 

Directly above.

All 

By index.

Below 

Directly below.

Previous 

Ordered before.

ToLeft 

Left of.

ToRight 

Right of.

DirectionMask 

Directional flag mask combining Above, Below, ToLeft, and ToRight.

Cut 

Marked for cut & paste.

DropHilited 

Marked for drop target.

Focused 

Marked as having focus.

Selected 

Marked as selected.

StateMask 

State flag mask combining Cut, DropHilited, Focused, and Selected.

VisibleOrder 

Search the visible order.

VisibleOnly 

Search the visible items.

SameGroupOnly 

Search the current group.

Definition at line 628 of file listviewctrl.h.

◆ TSetItemCountBehavior

Describes the behavior for the control when setting the item count.

Enumerator
Unspecified 

No behavior specified.

NoInvalidateAll 

Do not repaint unless affected items are currently in view.

NoScroll 

Do not change the scroll position.

Definition at line 670 of file listviewctrl.h.

◆ TViewType

Describes the type of views.

Enumerator
Details 

Detailed view.

NormalIcon 

Icon view.

List 

List view.

SmallIcon 

Small icon view.

Tile 

Tile view.

Definition at line 658 of file listviewctrl.h.

Constructor & Destructor Documentation

◆ TListViewCtrl() [1/2]

owl::TListViewCtrl::TListViewCtrl ( TWindow * parent,
int id,
int x,
int y,
int w,
int h,
TModule * module = 0 )

Constructor that simply passes the parameters to the parent TControl::TControl(TWindow*, int, LPCTSTR, int, int, int, int, TModule*) and adds the extended style WS_EX_CLIENTEDGE.

Definition at line 1107 of file listviewctrl.cpp.

References owl::InitializeCommonControls(), and WS_EX_CLIENTEDGE.

◆ TListViewCtrl() [2/2]

owl::TListViewCtrl::TListViewCtrl ( TWindow * parent,
int resourceId,
TModule * module = 0 )

Constructor that simply passes the parameters to the parent TControl::TControl(TWindow*, int, TModule*).

Definition at line 1119 of file listviewctrl.cpp.

References owl::InitializeCommonControls().

Member Function Documentation

◆ AddItem() [1/2]

auto owl::TListViewCtrl::AddItem ( const TLvItem & item) -> int

Adds a new item to the end of the list.

Parameters
[in]itemis the class containing the item.
Returns
the index of the new item if successful, otherwise -1.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761107.aspx

Definition at line 1639 of file listviewctrl.cpp.

References PRECONDITION.

◆ AddItem() [2/2]

auto owl::TListViewCtrl::AddItem ( const tstring & text) -> int

Adds a new item with the given text to the end of the list.

Parameters
[in]textis the text to add.
Returns
the index of the new item if successful, otherwise -1.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761107.aspx

Definition at line 1656 of file listviewctrl.cpp.

◆ Arrange()

auto owl::TListViewCtrl::Arrange ( TArrangeCode code) -> bool

Arranges items in icon view.

Parameters
[in]codeis the class specifying the type of arrangement.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774884.aspx

Definition at line 1832 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ CalculateColumnWidth() [1/2]

auto owl::TListViewCtrl::CalculateColumnWidth ( const tstring & text,
int padding = 12 ) const -> int

String overload for CalculateColumnWidth(LPCTSTR, int) const .

Parameters
[in]textis the string to analyze.
[in]paddingis the number of pixels to add for a suitable column width.
Returns
column pixel width.

Definition at line 2499 of file listviewctrl.cpp.

References PRECONDITION.

◆ CalculateColumnWidth() [2/2]

auto owl::TListViewCtrl::CalculateColumnWidth ( LPCTSTR text,
int padding = 12 ) const -> int

Calculates a suitable column pixel width for the given string.

This value can be used to set a column width using InsertColumn or SetColumnWidth.

Parameters
[in]textis the string to analyze.
[in]paddingis the number of pixels to add for a suitable column width.
Returns
column pixel width.

Definition at line 2479 of file listviewctrl.cpp.

References PRECONDITION.

◆ CancelEditLabel()

auto owl::TListViewCtrl::CancelEditLabel ( ) -> void

Cancels an item text editing operation.

Returns
none.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774886.aspx

Definition at line 2342 of file listviewctrl.cpp.

References PRECONDITION.

◆ CreateDragImage()

auto owl::TListViewCtrl::CreateDragImage ( int index,
TPoint * upLeft ) -> HIMAGELIST

Creates a drag image list for an item.

Parameters
[in]indexis the item index.
[in]upLeftis the initial location of the upper-left corner of the image, in view coordinates.
Returns
the handle to the drag image list if successful, otherwise NULL.
Note
The application is responsible for destroying the image list when it is no longer needed.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774890.aspx

Definition at line 2120 of file listviewctrl.cpp.

References PRECONDITION.

◆ DeleteAllItems()

auto owl::TListViewCtrl::DeleteAllItems ( ) -> bool

Deletes all items from the list.

Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774891.aspx

Definition at line 1730 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ DeleteColumn()

auto owl::TListViewCtrl::DeleteColumn ( int colNum) -> bool

Deletes a column in a list-view control.

Parameters
[in]colNumis the column number.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774894.aspx

Definition at line 1155 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ DeleteItem() [1/2]

void owl::TControl::DeleteItem ( DELETEITEMSTRUCT & deleteInfo)
protectedvirtual

Function called when a WM_DELETEITEM is sent to parent on our behalf.

Used with owner-draw buttons and list boxes. In such cases, the derived class supplies the delete logic.

Reimplemented from owl::TControl.

Definition at line 66 of file control.cpp.

References owl::TWindow::Init(), OWL_CDLEVEL, and TRACEX.

◆ DeleteItem() [2/2]

auto owl::TListViewCtrl::DeleteItem ( int index) -> bool

Deletes an item from the list.

Parameters
[in]indexis the item index to delete.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774895.aspx

Definition at line 1716 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ EditLabel()

auto owl::TListViewCtrl::EditLabel ( int index) -> HWND

Begins in-place editing of the list-view item's text.

Parameters
[in]indexis the item index, or -1 to cancel editing.
Returns
the handle to the edit control that is used to edit the item text if successful, otherwise NULL.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774898.aspx

Definition at line 2314 of file listviewctrl.cpp.

References PRECONDITION.

◆ EnsureVisible()

auto owl::TListViewCtrl::EnsureVisible ( int index,
bool partialOk ) -> bool

Ensures that a list-view item is either partially or entirely visible, scrolling the list-view control if necessary.

Parameters
[in]indexis the item index.
[in]partialOkspecifies whether to ensure partially or entirely visible.
Note
The function will not succeed if the window style has LVS_NOSCROLL.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774902.aspx

Definition at line 2551 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ FindItem()

auto owl::TListViewCtrl::FindItem ( int index,
const TLvFindInfo & findInfo ) const -> int

Searches for an item with the specified characteristics.

Parameters
[in]indexis the item index from where to begin the search, non-inclusive. If -1 the search will start from the beginning.
[in]findInfois the class containing the search characteristics.
Returns
the index of the item if found, otherwise -1.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774903.aspx

Definition at line 1748 of file listviewctrl.cpp.

References PRECONDITION.

◆ GetApproxRect() [1/2]

auto owl::TListViewCtrl::GetApproxRect ( const TPoint & pt,
int count = -1 ) const -> TSize
inline

TPoint overload for GetApproxRect(int, int, int) const .

Definition at line 849 of file listviewctrl.h.

◆ GetApproxRect() [2/2]

auto owl::TListViewCtrl::GetApproxRect ( int x = -1,
int y = -1,
int count = -1 ) const -> TSize

Calculates the approximate width and height required to display a given number of items.

Parameters
[in]xis the proposed x-dimension of the list-view control; -1 specifies to use the current width.
[in]yis the proposed y-dimension of the list-view control; -1 specifies to use the current height.
[in]countis the number of items to be displayed in the list-view control; -1 specifies to use the total number of items.
Note
  1. Setting the size of the list-view control based on the dimensions provided by this message can optimize redraw and reduce flicker.
  2. If the coordinates are outside a valid range, a TXOwl exception is thrown.
Returns
the calculated size.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774883.aspx

Definition at line 2672 of file listviewctrl.cpp.

References _T, owl::MkParam2(), and PRECONDITION.

◆ GetBkColor()

auto owl::TListViewCtrl::GetBkColor ( ) const -> TColor

Retrieves the background color of a list-view control.

Returns
the background color.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774905.aspx

Definition at line 2167 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetBkImage()

auto owl::TListViewCtrl::GetBkImage ( TLvBkImage & bkimg) const -> bool

Retrieves the background image in a list-view control.

Parameters
[out]bkimgis the class that will contain the background image information.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774907.aspx

Definition at line 2924 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ GetCallBackMask()

auto owl::TListViewCtrl::GetCallBackMask ( ) const -> TLvItem::TListState

Retrieves the callback mask for a list-view control.

Returns
the callback mask.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774909.aspx

Definition at line 2261 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetColumn()

auto owl::TListViewCtrl::GetColumn ( int colNum,
TLvColumn & column ) const -> bool

Retrieves the attributes of a list-view control's column.

Parameters
[in]colNumis the column number.
[out]columncontains the column attributes.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774911.aspx

Definition at line 1172 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ GetColumnOrder()

auto owl::TListViewCtrl::GetColumnOrder ( int count,
int * array ) const -> bool

Retrieves the current left-to-right order of columns in a list-view control.

Parameters
[in]countis the number of columns to be retrieved.
[out]arrayis an array where the columns will be stored.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774913.aspx

Definition at line 2692 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ GetColumnWidth()

auto owl::TListViewCtrl::GetColumnWidth ( int colNum) const -> int

Retrieves the width of a column in report or list view.

Parameters
[in]colNumis the column number.
Returns
the column width.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774915.aspx

Definition at line 1188 of file listviewctrl.cpp.

References PRECONDITION.

◆ GetCountPerPage()

auto owl::TListViewCtrl::GetCountPerPage ( ) const -> int

Calculates the number of items that can fit vertically in the visible area of a list-view control when in list or report view.

Returns
the number of fully visible items if successful; if in icon or small icon view, the total number of items.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774917.aspx

Definition at line 2588 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetEditControl()

auto owl::TListViewCtrl::GetEditControl ( ) const -> HWND

Retrieves the handle to the edit control used to edit a list-view item's text.

Returns
the handle to the edit control if successful, otherwise NULL.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774919.aspx

Definition at line 2328 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetEmptyText()

auto owl::TListViewCtrl::GetEmptyText ( ) const -> tstring

Retrieves the string to display when the list-view control appears empty.

Returns
the string to display.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774921.aspx

Definition at line 3143 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetExtStyle()

auto owl::TListViewCtrl::GetExtStyle ( ) const -> uint32

Retrieves the extended styles that are currently in use for a given list-view control.

Returns
the extended styles.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774923.aspx

Definition at line 2723 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetFocusItem()

auto owl::TListViewCtrl::GetFocusItem ( ) -> int

Retrieves the item index of the item that has the focus.

Returns
the item index, or -1 if no item has the focus.

Definition at line 2632 of file listviewctrl.cpp.

References owl::TLvItem::Focus.

◆ GetFooterInfo()

auto owl::TListViewCtrl::GetFooterInfo ( TLvFooterInfo & info) const -> bool

Retrieves information about the footer of a list-view control.

Parameters
[in,out]infocontains the information to retrieve on the footer and will contain those values upon return.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774927.aspx

Definition at line 3172 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ GetFooterItem()

auto owl::TListViewCtrl::GetFooterItem ( int index,
TLvFooterItem & item ) const -> bool

Retrieves information for a footer item in a list-view control.

Parameters
[in]indexis the item index.
[in,out]itemcontains the information to retrieve on a footer item and will contain those values upon return.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774928.aspx

Definition at line 3202 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ GetFooterItemRect() [1/2]

auto owl::TListViewCtrl::GetFooterItemRect ( int index) const -> TRect

TRect return overload for GetFooterItemRect(int, TRect&) const .

Definition at line 3279 of file listviewctrl.cpp.

References _T, owl::InUse(), and WARN.

◆ GetFooterItemRect() [2/2]

auto owl::TListViewCtrl::GetFooterItemRect ( int index,
TRect & rect ) const -> bool

Retrieves the coordinates of a footer for an item in a list-view control.

Parameters
[in]indexis the item index.
[out]rectcontains the coordinates of the footer upon return.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774929.aspx

Definition at line 3269 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ GetFooterItems()

auto owl::TListViewCtrl::GetFooterItems ( ) const -> int

Footer item count return overload for GetFooterInfo(TLvFooterInfo&) const .

Definition at line 3182 of file listviewctrl.cpp.

References _T, GetFooterInfo(), owl::InUse(), and WARN.

◆ GetFooterItemState()

auto owl::TListViewCtrl::GetFooterItemState ( int index,
TLvFooterItem::TState mask = TLvFooterItem::All ) const -> TLvFooterItem::TState

Footer item state return overload for GetFooterItem(int, TLvFooterItem&) const .

Parameters
[in]maskcontains the mask of state values to return.

Definition at line 3240 of file listviewctrl.cpp.

References _T, owl::InUse(), and WARN.

◆ GetFooterItemText()

auto owl::TListViewCtrl::GetFooterItemText ( int index) const -> std::wstring

Footer item text string return overload for GetFooterItem(int, TLvFooterItem&) const .

Returns an empty string on failure.

Definition at line 3213 of file listviewctrl.cpp.

References _T, owl::InUse(), WARN, and wcslen().

◆ GetFooterRect() [1/2]

auto owl::TListViewCtrl::GetFooterRect ( ) const -> TRect

TRect return overload for GetFooterRect(TRect&) const .

Definition at line 3307 of file listviewctrl.cpp.

References _T, GetFooterRect(), owl::InUse(), and WARN.

◆ GetFooterRect() [2/2]

auto owl::TListViewCtrl::GetFooterRect ( TRect & rect) const -> bool

Retrieves the coordinates of the footer for a list-view control.

Parameters
[out]rectcontains the coordinates of the footer upon return.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774930.aspx

Definition at line 3297 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ GetGroupInfo()

auto owl::TListViewCtrl::GetGroupInfo ( int groupId,
uint mask = 0xFFFFFFFF ) -> LVGROUP

Gets group information.

Parameters
[in]maskdetermines which fields to retrieve (optional).
See also
http://docs.microsoft.com/en-us/windows/desktop/Controls/lvm-getgroupinfo

Definition at line 3322 of file listviewctrl.cpp.

References _T, owl::InUse(), and WARN.

◆ GetHeaderCtrl()

auto owl::TListViewCtrl::GetHeaderCtrl ( ) const -> HWND

Retrieves the handle to the header control used by the list-view control.

Returns
the handle to the header control.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774937.aspx

Definition at line 2754 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetHotCursor()

auto owl::TListViewCtrl::GetHotCursor ( ) const -> HCURSOR

Retrieves the cursor handle used when the pointer is over an item while hot tracking is enabled.

Note
A list-view control uses hot tracking and hover selection when the LVS_EX_TRACKSELECT style is set.
Returns
the handle to the cursor.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774938.aspx

Definition at line 2770 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetHotItem()

auto owl::TListViewCtrl::GetHotItem ( ) const -> int

Retrieves the index of the hot item.

Returns
the hot item index.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774939.aspx

Definition at line 2802 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetHoverTime()

auto owl::TListViewCtrl::GetHoverTime ( ) const -> uint32

Retrieves the amount of time that the mouse cursor must hover over an item before it is selected.

Note
The hover time only affects list-view controls that have the LVS_EX_TRACKSELECT, LVS_EX_ONECLICKACTIVATE, or LVS_EX_TWOCLICKACTIVATE extended list-view style.
Returns
the amount of time in milliseconds, which is the maximum value for this data type if the default time is used.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774941.aspx

Definition at line 2960 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetImageList()

auto owl::TListViewCtrl::GetImageList ( TImageListType type) const -> HIMAGELIST

Retrieves the handle to an image list used for drawing list-view items.

Parameters
[in]typespecifies the type of image list to retrieve.
Returns
the handle to the image list if successful, otherwise NULL.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774943.aspx

Definition at line 2136 of file listviewctrl.cpp.

References PRECONDITION.

◆ GetISearchString()

auto owl::TListViewCtrl::GetISearchString ( ) const -> tstring

Retrieves the incremental search string.

Returns
the incremental search string, which will be empty if the list-view control is not in incremental search mode.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774951.aspx

Definition at line 2603 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetItem() [1/2]

auto owl::TListViewCtrl::GetItem ( int index = -1,
int subitemIndex = -1 ) const -> TLvItem

TLvItem return overload for GetItem(TLvItem&, int, int) const .

Parameters
[in]indexis the item index, which defaults to the first item if -1.
[in]subitemIndexis the subitem index, which defaults to no subitem if -1.
Returns
TLvItem.

Definition at line 1259 of file listviewctrl.cpp.

References _T, owl::InUse(), and WARN.

◆ GetItem() [2/2]

auto owl::TListViewCtrl::GetItem ( TLvItem & item,
int index = -1,
int subitemIndex = -1 ) const -> bool

Retrieves a list-view item's attributes.

Parameters
[in,out]itemspecifies the attributes to retrieve, and upon return contains those attributes.
[in]indexis the item index, which overrides the setting in item unless -1.
[in]subitemIndexis the subitem index, which overrides the setting in item unless -1.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774953.aspx

Definition at line 1240 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ GetItemCount()

auto owl::TListViewCtrl::GetItemCount ( ) const -> int

Retrieves the number of items in the list-view control.

Returns
number of items.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761044.aspx

Definition at line 1324 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetItemIndexRect()

auto owl::TListViewCtrl::GetItemIndexRect ( int index,
int group,
int subitemIndex,
TRect & rect,
TItemRectType type ) const -> bool

Sets the bounding rectangle for a subitem.

Parameters
[in]indexis the item index.
[in]groupis the group number.
[in]subitemIndexis the subitem index.
[in]rectis the bounding rectangle to set.
[in]typespecifies the type of rectangle to set.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761046.aspx

Definition at line 3085 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ GetItemPosition() [1/2]

auto owl::TListViewCtrl::GetItemPosition ( int index) const -> TPoint

TPoint return overload for GetItemPosition(int, TPoint&) const .

Parameters
[in]indexis the item index.
Returns
position of the list-view item.

Definition at line 1388 of file listviewctrl.cpp.

References _T, owl::InUse(), and WARN.

◆ GetItemPosition() [2/2]

auto owl::TListViewCtrl::GetItemPosition ( int index,
TPoint & pt ) const -> bool

Retrieves the position of a list-view item.

Parameters
[in]indexis the item index.
[out]ptis where the position will be stored.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761048.aspx

Definition at line 1374 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ GetItemRect() [1/2]

auto owl::TListViewCtrl::GetItemRect ( int index,
TItemRectType type ) const -> TRect

TRect return overload for GetItemRect(int, TRect&, TItemRectType) const .

Parameters
[in]indexis the item index.
[in]typespecifies the type of rectangle to retrieve.
Returns
the bounding rectangle.

Definition at line 1466 of file listviewctrl.cpp.

References _T, owl::InUse(), and WARN.

◆ GetItemRect() [2/2]

auto owl::TListViewCtrl::GetItemRect ( int index,
TRect & rect,
TItemRectType type ) const -> bool

Retrieves the bounding rectangle of a list-view item.

Parameters
[in]indexis the item index.
[out]rectwill contain the bounding rectangle.
[in]typespecifies the type of rectangle to retrieve.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761049.aspx

Definition at line 1450 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ GetItemSpacing()

auto owl::TListViewCtrl::GetItemSpacing ( bool smallIcon) const -> TSize

Retrieves the amount of horizontal and vertical spacing between items.

Parameters
[in]smallIconif true, the spacing refers to small icon view rather than normal icon view.
Returns
the item spacing.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761051.aspx

Definition at line 2883 of file listviewctrl.cpp.

References owl::HiUint16(), owl::LoUint16(), and PRECONDITION.

◆ GetItemState()

auto owl::TListViewCtrl::GetItemState ( int index,
uint mask ) const -> TLvItem::TListState

Retrieves the current state for an item.

Parameters
[in]indexis the item index.
[in]maskspecifies which state attributes to return.
Returns
current state of the item.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761053.aspx

Definition at line 1485 of file listviewctrl.cpp.

References PRECONDITION.

◆ GetItemText() [1/3]

auto owl::TListViewCtrl::GetItemText ( int index,
int subitemIndex,
TCHAR * buffer,
int bufferSize ) const -> int

C string overload for GetItemText(int, TLvItem&) const .

Parameters
[in]indexis the item index.
[in]subitemIndexis the subitem index; 0 specifies to retrieve the item text rather than the text of a subitem.
[out]bufferpoints to a buffer to hold the retrieved text.
[in]bufferSizeis the size of the buffer pointed to by text.
Returns
length of the retrieved string.

Definition at line 1545 of file listviewctrl.cpp.

References PRECONDITION, owl::TLvItem::SetSubItem(), and owl::TLvItem::SetTextBuffer().

◆ GetItemText() [2/3]

auto owl::TListViewCtrl::GetItemText ( int index,
int subitemIndex = 0 ) const -> tstring

String return overload for GetItemText(int, TLvItem&) const .

Parameters
[in]indexis the item index.
[in]subitemIndexis the subitem index; 0 specifies to retrieve the item text rather than the text of a subitem.
Returns
retrieved string.

Definition at line 1564 of file listviewctrl.cpp.

References owl::TLvItem::GetText(), PRECONDITION, and owl::TLvItem::SetSubItem().

◆ GetItemText() [3/3]

auto owl::TListViewCtrl::GetItemText ( int index,
TLvItem & item ) const -> int

Retrieves the text of the item.

Parameters
[in]indexis the item index.
[in,out]itemis the class where the buffer, buffer size, and subitem index are specified. Before calling this function:
  1. call item.SetTextBuffer(buffer, bufferSize) to set the buffer and buffer size where the text will get stored.
  2. call item.SetSubItem(subitemIndex) where subitemIndex is 0 to retrieve the item text rather than the text of a subitem.
Returns
length of the retrieved string.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761055.aspx

Definition at line 1527 of file listviewctrl.cpp.

References PRECONDITION.

◆ GetNextItem()

auto owl::TListViewCtrl::GetNextItem ( int index,
uint flags = TNextItemCode::All ) const -> int

Searches for a list-view item that has the specified properties and bears the specified relationship to a specified item.

Parameters
[in]indexis the item index to begin the search; -1 specifies to find the first item.
[in]flagsis a combination of TNextItemCode flags that specify the relationship to the item given by index.
Returns
item index if found, otherwise -1.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761057.aspx, TListViewCtrl::TNextItemCode

Definition at line 1310 of file listviewctrl.cpp.

References PRECONDITION.

◆ GetNextItemIndex()

auto owl::TListViewCtrl::GetNextItemIndex ( int index,
int group,
uint flags = TNextItemCode::All ) const -> int

Searches for a list-view item that has the specified properties and bears the specified relationship to a specified item.

Parameters
[in]indexis the item index to begin the search; -1 specifies to find the first item.
[in]groupis the group number.
[in]flagsis a combination of TNextItemCode flags that specify the relationship to the item given by index.
Returns
item index if found, otherwise -1.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761059.aspx, TListViewCtrl::TNextItemCode

Definition at line 3109 of file listviewctrl.cpp.

References PRECONDITION.

◆ GetNextSelIndex()

auto owl::TListViewCtrl::GetNextSelIndex ( int index = -1) const -> int

Searches for the next selected item after a given index.

Parameters
[in]indexis the item index to begin the search; -1 specifies to find the first item.
Returns
the item index of the next selected item, or -1 if there isn't one.

Definition at line 1859 of file listviewctrl.cpp.

References owl::MkParam2().

◆ GetNumOfWorkAreas()

auto owl::TListViewCtrl::GetNumOfWorkAreas ( ) const -> uint

Retrieves the number of working areas in a list-view control.

Returns
the number of working areas.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761061.aspx

Definition at line 2992 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetOrigin()

auto owl::TListViewCtrl::GetOrigin ( TPoint & pt) const -> bool

Retrieves the current view origin for a list-view control.

Parameters
[out]ptupon return will contain the view origin.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761063.aspx

Definition at line 2425 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ GetOutlineColor()

auto owl::TListViewCtrl::GetOutlineColor ( ) const -> TColor

Retrieves the list-view control border color.

Note
Only valid if the LVS_EX_BORDERSELECT extended window style is set.
Returns
the control border color.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761065.aspx

Definition at line 3668 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetSelCount()

auto owl::TListViewCtrl::GetSelCount ( void ) const -> int

Retrieves the number of selected items.

Note
Useful before calling GetSelIndexes and GetSelStrings.
Returns
the number of selected items, or -1 if there are no selected items.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761069.aspx

Definition at line 1888 of file listviewctrl.cpp.

References owl::TWindow::SendMessage().

◆ GetSelectedColumn()

auto owl::TListViewCtrl::GetSelectedColumn ( ) const -> int

Retrieves the currently selected column number.

Returns
the currently selected column number, or -1 if no column is selected.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761067.aspx

Definition at line 2085 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetSelectionMark()

auto owl::TListViewCtrl::GetSelectionMark ( ) const -> int

Retrieves the selection mark from a list-view control.

The selection mark is the item index from which a multiple selection starts.

Returns
the zero-based selection mark, or -1 if there is no selection mark.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761071.aspx

Definition at line 3046 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetSelIndex()

auto owl::TListViewCtrl::GetSelIndex ( ) const -> int

Retrieves the selected item index.

Note
If the list-view control does not have the LVS_SINGLESEL style, the first selected item index is retrieved.
Returns
the item index of the selected item, or -1 if there isn't one.

Definition at line 1873 of file listviewctrl.cpp.

References GetNextSelIndex().

◆ GetSelIndexes()

auto owl::TListViewCtrl::GetSelIndexes ( int * indexes,
int maxCount ) const -> int

Retrieves the indexes of the selected items.

Parameters
[out]indexesis an array where the item indexes will be stored.
[in]maxCountis the maximum number of indexes to retrieve.
Note
If the list-view control has the LVS_SINGLESEL style, at most only one index will be retrieved.
Returns
the number of indexes retrieved, or -1 if there are no selected items.
See also
GetSelCount

Definition at line 1906 of file listviewctrl.cpp.

◆ GetSelString() [1/2]

auto owl::TListViewCtrl::GetSelString ( int subitemIndex = 0) const -> tstring

String overload for GetSelString(tchar*, int, int) const .

Returns
string of selected item, which will be empty if no item is selected.

Definition at line 1960 of file listviewctrl.cpp.

◆ GetSelString() [2/2]

auto owl::TListViewCtrl::GetSelString ( tchar * str,
int maxChars,
int subitemIndex = 0 ) const -> bool

Retrieves the selected item or item subitem text.

Parameters
[out]stris a character array where the text string will be stored.
[in]maxCharsis the maximum number of characters to store including the null terminator.
[in]subitemIndexis the subitem index, which if 0 specifies to retrieve the item text.
Note
If the list-view control does not have the LVS_SINGLESEL style, at most only the first selected item string will be retrieved.
Returns
true if an item is selected.

Definition at line 1942 of file listviewctrl.cpp.

◆ GetSelStrings()

auto owl::TListViewCtrl::GetSelStrings ( tchar ** strs,
int maxCount,
int maxChars,
int subitemIndex = 0 ) const -> int

Retrieves the item or subitem strings of the selected items.

Parameters
[out]strsis an array of text strings where the strings will be stored.
[in]maxCountis the maximum number of strings to retrieve.
[in]maxCharsis the size of each string in the array including the null terminator.
[in]subitemIndexis the subitem index, which if 0 specifies to retrieve the item text.
Note
If the list-view control has the LVS_SINGLESEL style, at most only one string will be retrieved.
Returns
the number of strings retrieved, or -1 if there are no selected items.
See also
GetSelCount

Definition at line 1986 of file listviewctrl.cpp.

◆ GetStringWidth() [1/2]

auto owl::TListViewCtrl::GetStringWidth ( const tstring & text) const -> int

String overload for GetStringWidth(LPCTSTR) const .

Parameters
[in]textis the string to analyze.
Returns
pixel width of the string.

Definition at line 2461 of file listviewctrl.cpp.

References PRECONDITION.

◆ GetStringWidth() [2/2]

auto owl::TListViewCtrl::GetStringWidth ( LPCTSTR text) const -> int

Calculates the exact width in pixels of the given string using the control's current font.

Parameters
[in]textis the string to analyze.
Note
Use CalculateColumnWidth instead of this function to set the column width using InsertColumn or SetColumnWidth to avoid truncation.
Returns
pixel width of the string.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761073.aspx

Definition at line 2446 of file listviewctrl.cpp.

References PRECONDITION.

◆ GetSubItemRect()

auto owl::TListViewCtrl::GetSubItemRect ( TRect & rect,
int subitemIndex = 0,
int index = 0,
TItemRectType type = Bounds ) const -> bool

Retrieves the bounding rectangle for a subitem in a list-view control when in report view.

Parameters
[out]rectupon return contains the bounding rectangle.
[in]subitemIndexthe subitem index.
[in]indexthe item index.
[in]typethe type of bountding rectangle to retrieve.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761075.aspx

Definition at line 2835 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ GetTextBkColor()

auto owl::TListViewCtrl::GetTextBkColor ( ) const -> TColor

Retrieves the text background color of a list-view control.

Returns
the text background color.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761077.aspx

Definition at line 2199 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetTextColor()

auto owl::TListViewCtrl::GetTextColor ( ) const -> TColor

Retrieves the text color of a list-view control.

Returns
the text color.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761079.aspx

Definition at line 2231 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetTileInfo() [1/2]

auto owl::TListViewCtrl::GetTileInfo ( LVTILEINFO & lvTileInfo) const -> void

Reference overload for GetTileInfo(PLVTILEINFO) const .

Definition at line 3591 of file listviewctrl.cpp.

◆ GetTileInfo() [2/2]

auto owl::TListViewCtrl::GetTileInfo ( PLVTILEINFO lvTileInfo) const -> void

Retrieves information about a tile in a list-view control.

Parameters
[in,out]lvTileInfois the class which specifies the tile item information to retrieve, and upon return will contain the tile information.
Returns
none.
Note
This function is not supported under the LVS_OWNERDATA style.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761081.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774766.aspx

Definition at line 3580 of file listviewctrl.cpp.

References PRECONDITION.

◆ GetTileViewInfo()

auto owl::TListViewCtrl::GetTileViewInfo ( TLvTileViewInfo & tileViewInfo) const -> void

Retrieves tile view information.

Parameters
[in,out]tileViewInfois the class which specifies the tile view item information to retrieve, and upon return will contain the tile view information.
Returns
none.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761083.aspx

Definition at line 3636 of file listviewctrl.cpp.

References PRECONDITION.

◆ GetToolTips()

auto owl::TListViewCtrl::GetToolTips ( ) const -> HWND

Retrieves the handle of the tooltip control that the list-view control uses to display tooltips.

Returns
the handle of the tooltip control.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761085.aspx

Definition at line 3414 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetTopIndex()

auto owl::TListViewCtrl::GetTopIndex ( ) const -> int

Retrieves the topmost visible item index when in list or report view.

Returns
the topmost visible item index if successful; 0 if the list-view control is in icon or small icon view, or if the list-view control is in details view with groups enabled.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761087.aspx

Definition at line 2297 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetUnicodeFormat()

auto owl::TListViewCtrl::GetUnicodeFormat ( ) const -> bool

Queries whether the Unicode character set is being used instead of ANSI.

Returns
true if Unicode is being used.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761089.aspx

Definition at line 3338 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, owl::TWindow::SendMessage(), and owl::ToBool().

◆ GetView()

auto owl::TListViewCtrl::GetView ( ) const -> TViewType

Retrieves the view type.

Returns
the view type.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761091.aspx

Definition at line 3544 of file listviewctrl.cpp.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetViewRect()

auto owl::TListViewCtrl::GetViewRect ( TRect & rect) const -> bool

Retrieves the bounding rectangle of all items in the list-view control when in icon or small icon view.

Parameters
[out]rectupon return will contain the bounding rectangle.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761093.aspx

Definition at line 2515 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ GetWindowClassName()

auto owl::TListViewCtrl::GetWindowClassName ( ) -> TWindowClassName
protectedvirtual

Reimplemented from owl::TWindow.

Definition at line 3742 of file listviewctrl.cpp.

◆ GetWorkAreas()

auto owl::TListViewCtrl::GetWorkAreas ( int count,
TRect * areas ) const -> void

Retrieves the working areas from a list-view control.

Parameters
[in]countis the maximum number of working areas to retrieve.
[out]areasupon return will contain the client coordinates of the working areas.
Returns
none.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761095.aspx

Definition at line 3011 of file listviewctrl.cpp.

References PRECONDITION.

◆ HitTest() [1/2]

auto owl::TListViewCtrl::HitTest ( const TPoint & p) const -> TLvHitTestInfo

Functional-style overload.

Definition at line 2387 of file listviewctrl.cpp.

◆ HitTest() [2/2]

auto owl::TListViewCtrl::HitTest ( TLvHitTestInfo & info) const -> int

Determines whether a list-view item is at a specified position.

Parameters
[in,out]infois a class containing the position to check, and upon return contains results of the test.
Returns
item index found at the specified position if any, otherwise -1.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761099.aspx

Definition at line 2378 of file listviewctrl.cpp.

References PRECONDITION.

◆ InsertColumn()

auto owl::TListViewCtrl::InsertColumn ( int colNum,
const TLvColumn & column ) -> int

Inserts a new column in a list-view control.

Parameters
[in]colNumis the column number.
[in]columncontains the column attributes.
Note
Columns are visible only in report (details) view.
Returns
column number if successful, otherwise -1.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761101.aspx

Definition at line 1139 of file listviewctrl.cpp.

References PRECONDITION.

◆ InsertItem() [1/2]

auto owl::TListViewCtrl::InsertItem ( const TLvItem & item,
int index = -1 ) -> int

Inserts a new item to the list.

Parameters
[in]itemis the class containing the item.
[in]indexis the item index to place the new item, which overrides the setting in item unless -1.
Returns
the index of the new item if successful, otherwise -1.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761107.aspx

Definition at line 1675 of file listviewctrl.cpp.

References PRECONDITION.

◆ InsertItem() [2/2]

auto owl::TListViewCtrl::InsertItem ( const tstring & text,
int index = 0 ) -> int

Inserts a new item with the given text to the list.

Parameters
[in]textis the text to add.
[in]indexis the item index to place the new item.
Returns
the index of the new item if successful, otherwise -1.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761107.aspx

Definition at line 1699 of file listviewctrl.cpp.

◆ IsItemVisible()

auto owl::TListViewCtrl::IsItemVisible ( int index) const -> bool

Queries whether an item is visible.

Parameters
[in]indexis the item index.
Returns
true if visible.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761135.aspx

Definition at line 2531 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ IsSelected()

auto owl::TListViewCtrl::IsSelected ( int index) const -> bool

Queries if an item is selected.

Parameters
[in]indexis the item index.
Returns
true if item is selected.

Definition at line 1846 of file listviewctrl.cpp.

◆ MapIdToIndex()

auto owl::TListViewCtrl::MapIdToIndex ( TListViewCtrl::TItemId id) const -> int

Retrieves the current index for the item with the given unique identifier.

Parameters
[in]idis the unique identifier for the item.
Note
In a multithreaded environment, the index is only guaranteed on the thread that hosts the list-view control, not on background threads. Not supported under the LVS_OWNERDATA style.
Returns
the item index.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761137.aspx

Definition at line 3399 of file listviewctrl.cpp.

References PRECONDITION.

◆ MapIndexToId()

auto owl::TListViewCtrl::MapIndexToId ( int index) const -> TItemId

Associates a unique identifier with an item.

List-view controls internally track items by index which can present problems because indexes can change during the control's lifetime. Using a unique identifier allows an item to be easily referenced independent of index changes.

Parameters
[in]indexis the item index.
Note
In a multithreaded environment, the index is only guaranteed on the thread that hosts the list-view control, not on background threads. Not supported under the LVS_OWNERDATA style.
Returns
a unique identifier for the item.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761139.aspx

Definition at line 3379 of file listviewctrl.cpp.

References PRECONDITION.

◆ RedrawItems()

auto owl::TListViewCtrl::RedrawItems ( int startIndex,
int endIndex ) -> bool

Forces a list-view control to redraw a range of items.

Parameters
[in]startIndexis the first item index to redraw.
[in]endIndexis the last item index to redraw.
Note
The items are not actually redrawn until the list-view window receives a WM_PAINT message to repaint. To repaint immediately, call the UpdateWindow() function after calling this function.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761145.aspx

Definition at line 2572 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ ResetIconSpacing()

auto owl::TListViewCtrl::ResetIconSpacing ( ) -> TSize
inline

Resets the icon spacing to the default spacing.

Returns
the previous icon spacing used.

Definition at line 878 of file listviewctrl.h.

◆ Scroll()

auto owl::TListViewCtrl::Scroll ( int dx,
int dy ) -> bool

Scrolls the content of a list-view control.

Parameters
[in]dxis the pixel amount of horizontal scrolling relative to the current position.
[in]dyis the pixel amount of vertical scrolling relative to the current position.
Note
When the list-view control is in report view, the control can only be scrolled vertically in whole line increments so the vertical scrolling amount will be rounded to the nearest number of pixels that form a whole line increment.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761151.aspx

Definition at line 2409 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetBkColor()

auto owl::TListViewCtrl::SetBkColor ( const TColor & c) -> bool

Sets the background color of a list-view control.

Parameters
[in]cthe color to use.
Note
Specify TColor::None for no background color.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761153.aspx

Definition at line 2185 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetBkImage()

auto owl::TListViewCtrl::SetBkImage ( const TLvBkImage & bkimg) -> bool

Sets the background image in a list-view control.

Parameters
[in]bkimgis the class containing the background image information.
Returns
true if successful and a background image is used.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761155.aspx

Definition at line 2940 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetCallBackMask()

auto owl::TListViewCtrl::SetCallBackMask ( TLvItem::TListState mask) -> bool

Sets the callback mask for a list-view control.

Note
The callback mask of a list-view control specifies the item states for which the application, rather than the control, stores the current data. The callback mask applies to all of the control's items, unlike the callback item designation, which applies to a specific item. The callback mask is Unspecified by default, meaning that the list-view control stores all item state information.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761157.aspx

Definition at line 2281 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetColumn()

auto owl::TListViewCtrl::SetColumn ( int colNum,
const TLvColumn & column ) -> bool

Sets the attributes of a list-view control's column.

Parameters
[in]colNumis the column number.
[in]columncontains the column attributes.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761159.aspx

Definition at line 1205 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetColumnOrder()

auto owl::TListViewCtrl::SetColumnOrder ( int count,
const int * array ) -> bool

Sets the current left-to-right order of columns in a list-view control.

Parameters
[in]countis the number of columns to be set.
[in]arrayis an array of columns to set.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761161.aspx

Definition at line 2709 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetColumnWidth()

auto owl::TListViewCtrl::SetColumnWidth ( int colNum,
int width ) -> bool

Sets the width of a column in report or list view.

Parameters
[in]colNumis the column number.
[in]widthis the new column width.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761163.aspx

Definition at line 1222 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetExtStyle()

auto owl::TListViewCtrl::SetExtStyle ( uint32 mask,
uint32 style ) -> uint32

Sets the extended styles to use for a given list-view control.

Parameters
[in]maskspecifies the styles that are to be affected in style; 0 means all the styles given.
[in]stylespecifies the styles.
Returns
the previously used extended styles.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761165.aspx

Definition at line 2740 of file listviewctrl.cpp.

References PRECONDITION.

◆ SetFocusItem()

auto owl::TListViewCtrl::SetFocusItem ( int index,
bool focused = true ) -> bool

Sets or removes the focus for an item.

Parameters
[in]indexis the item index.
[in]focusedspecifies whether the focus is set or removed.
Returns
true if successful.

Definition at line 2649 of file listviewctrl.cpp.

References owl::TLvItem::Focus, and owl::TLvItem::Unspecified.

◆ SetHotCursor()

auto owl::TListViewCtrl::SetHotCursor ( HCURSOR cur) -> HCURSOR

Sets the cursor handle to use when the pointer is over an item while hot tracking is enabled.

Parameters
[in]curthe new cursor handle to use.
Note
A list-view control uses hot tracking and hover selection when the LVS_EX_TRACKSELECT style is set.
Returns
the previous cursor handle used.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774938.aspx

Definition at line 2788 of file listviewctrl.cpp.

References PRECONDITION.

◆ SetHotItem()

auto owl::TListViewCtrl::SetHotItem ( int index) -> int

Sets the index of the hot item.

Returns
the previous hot item index.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761172.aspx

Definition at line 2816 of file listviewctrl.cpp.

References PRECONDITION.

◆ SetHoverTime()

auto owl::TListViewCtrl::SetHoverTime ( uint32 tm) -> uint32

Sets the amount of time that the mouse cursor must hover over an item before it is selected.

Parameters
[in]tmis the amount of time in milliseconds; if this is the maximum value for this data type the default time is used.
Returns
the previous hover time used.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761174.aspx

Definition at line 2978 of file listviewctrl.cpp.

References PRECONDITION.

◆ SetIconSpacing() [1/2]

auto owl::TListViewCtrl::SetIconSpacing ( const TPoint & pt) -> TSize
inline

TPoint overload for SetIconSpacing(int, int).

Definition at line 870 of file listviewctrl.h.

◆ SetIconSpacing() [2/2]

auto owl::TListViewCtrl::SetIconSpacing ( int x,
int y ) -> TSize

Sets the spacing between icons in list-view controls that have the LVS_ICON style.

Parameters
[in]xis the horizontal spacing to use.
[in]yis the vertical spacing to use.
Note
  1. The spacing values must include the icon size if overlapping is to be avoided.
  2. If the spacing values are outside a valid range, a TXOwl exception is thrown.
Returns
the previous icon spacing used.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761176.aspx

Definition at line 2905 of file listviewctrl.cpp.

References _T, owl::HiUint16(), owl::LoUint16(), and PRECONDITION.

◆ SetImageList()

auto owl::TListViewCtrl::SetImageList ( HIMAGELIST list,
TImageListType type ) -> HIMAGELIST

Assigns an image list to a list-view control.

Parameters
[in]listthe handle to the image list.
[in]typespecifies the type of image list to set.
Returns
the handle to the image list previously associated with the control if successful, or NULL otherwise.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761178.aspx

Definition at line 2153 of file listviewctrl.cpp.

References PRECONDITION.

◆ SetInfoTip() [1/3]

auto owl::TListViewCtrl::SetInfoTip ( const tstring & text,
int index,
int subitemIndex = 0 ) -> bool

String overload for SetInfoTip(LPCWSTR, int, int).

Definition at line 3530 of file listviewctrl.cpp.

References PRECONDITION.

◆ SetInfoTip() [2/3]

auto owl::TListViewCtrl::SetInfoTip ( LPCSTR text,
int index,
int subitemIndex = 0 ) -> bool

C single-byte string overload for SetInfoTip(LPCWSTR, int, int).

Definition at line 3473 of file listviewctrl.cpp.

References _T, PRECONDITION, and WARN.

◆ SetInfoTip() [3/3]

auto owl::TListViewCtrl::SetInfoTip ( LPCWSTR text,
int index,
int subitemIndex = 0 ) -> bool

Sets tooltip text in delayed response to the LVN_GETINFOTIP notification.

This function lets an application calculate infotips in the background by performing the following steps:

  1. In response to the LVN_GETINFOTIP notification, set the pszText member of the TLvGetInfoTip structure to an empty string and return 0.
  2. In the background, compute the infotip.
  3. After computing the infotip, call this function with the infotip and item and sub-item indexes to which the infotip applies.
    Note
    The intotip appears only if the specified item and sub-item are still in a state that requires an infotip.
    Parameters
    [in]textis the wide-char tooltip text to set; a null pointer results in an empty string used.
    [in]indexis the item index.
    [in]subitemIndexis the subitem index.
    Returns
    true if successful.
    See also
    http://msdn.microsoft.com/en-us/library/windows/desktop/bb761180.aspx

Definition at line 3462 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetItem()

auto owl::TListViewCtrl::SetItem ( const TLvItem & item,
int index = -1,
int subitemIndex = -1 ) -> bool

Sets a list-view item's attributes.

Parameters
[in]itemcontains the attributes to set.
[in]indexis the item index, which overrides the setting in item unless -1.
[in]subitemIndexis the subitem index, which overrides the setting in item unless -1.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761186.aspx

Definition at line 1279 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetItemCount()

auto owl::TListViewCtrl::SetItemCount ( int numItems,
TSetItemCountBehavior behavior = Unspecified ) -> bool

Sets the number of items that the list-view control will ultimately contain.

Causes the list-view control to allocate memory for the number of items specified in numItems or sets the virtual number of items for a virtual list-view control depending on how the control was created, and returns whether successful.

Parameters
[in]numItemsis the new number of items.
[in]behavioris the behavior of the list-view control after setting the item count.
Note
  1. If the list-view control was created without the LVS_OWNERDATA style, sending this message causes the control to allocate its internal data structures for the specified number of items. This prevents the control from having to allocate the data structures every time an item is added.
  2. If the list-view control was created with the LVS_OWNERDATA style (a virtual list-view), sending this message sets the virtual number of items that the control contains.
  3. The behavior parameter is intended only for controls that use the LVS_OWNERDATA and LVS_REPORT or LVS_LIST styles.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761188.aspx

Definition at line 1357 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetItemIndexState()

auto owl::TListViewCtrl::SetItemIndexState ( const TLvItem & item,
int index,
int group ) -> bool

Sets the state of a list-view item.

Parameters
[in]itemis the class containing the state attributes to set.
[in]indexis the item index.
[in]groupis the group number.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761190.aspx

Definition at line 3128 of file listviewctrl.cpp.

References PRECONDITION.

◆ SetItemPosition()

auto owl::TListViewCtrl::SetItemPosition ( int index,
const TPoint & pt ) -> bool

Sets the position of a list-view item.

Parameters
[in]indexis the item index.
[in]ptis the new item position.
Note
If the coordinates are outside valid range, a TXOwl exception is thrown. Use SetItemPosition32 to avoid this.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761192.aspx

Definition at line 1410 of file listviewctrl.cpp.

References _T, owl::MkParam2(), PRECONDITION, owl::ToBool(), and WARN.

◆ SetItemPosition32()

auto owl::TListViewCtrl::SetItemPosition32 ( int index,
const TPoint & pt ) -> void

Sets the position of a list-view item.

Note
Must be in icon or small icon view.
Parameters
[in]indexis the item index.
[in]ptis the new item position.
Returns
none.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761194.aspx

Definition at line 1432 of file listviewctrl.cpp.

References PRECONDITION.

◆ SetItemState()

auto owl::TListViewCtrl::SetItemState ( int index,
TLvItem::TListState state,
uint mask ) -> bool

Sets the current state for an item.

Parameters
[in]indexis the item index.
[in]stateis the new item state.
[in]maskspecifies which state attributes to set.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761196.aspx

Definition at line 1503 of file listviewctrl.cpp.

References owl::ToBool().

◆ SetItemText() [1/3]

auto owl::TListViewCtrl::SetItemText ( int index,
const TLvItem & item ) -> bool

Sets the text of a list-view item or subitem.

Parameters
[in]indexis the item index.
[in]itemis the class where the buffer, buffer size, and subitem index are specified. Before calling this function:
  1. call item.SetTextBuffer(buffer, bufferSize) to set the buffer and buffer size of the text to set.
  2. call item.SetSubItem(subitemIndex) where subitemIndex is 0 to set the item text rather than the text of a subitem.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761198.aspx

Definition at line 1589 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetItemText() [2/3]

auto owl::TListViewCtrl::SetItemText ( int index,
int subitemIndex,
const tstring & text ) -> bool

String overload for SetItemText(int, const TLvItem&).

Parameters
[in]indexis the item index.
[in]subitemIndexis the subitem index; 0 specifies to set the item text rather than the text of a subitem.
[in]textis the text to set.
Returns
true if successful.

Definition at line 1623 of file listviewctrl.cpp.

References PRECONDITION.

◆ SetItemText() [3/3]

auto owl::TListViewCtrl::SetItemText ( int index,
int subitemIndex,
LPCTSTR text ) -> bool

C string overload for SetItemText(int, const TLvItem&).

Parameters
[in]indexis the item index.
[in]subitemIndexis the subitem index; 0 specifies to set the item text rather than the text of a subitem.
[in]textis the text to set.
Returns
true if successful.

Definition at line 1606 of file listviewctrl.cpp.

References PRECONDITION.

◆ SetOutlineColor()

auto owl::TListViewCtrl::SetOutlineColor ( const TColor & color) -> TColor

Sets the list-view control border color.

Parameters
[in]coloris the color to set.
Note
Only valid if the LVS_EX_BORDERSELECT extended window style is set.
Returns
the control border color.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761200.aspx

Definition at line 3686 of file listviewctrl.cpp.

References PRECONDITION.

◆ SetSel()

auto owl::TListViewCtrl::SetSel ( int index,
bool select ) -> bool

Selects or deselects an item.

Parameters
[in]indexis the item index.
[in]selectspecifies whether to select or deselect the item.
Returns
true if successful.

Definition at line 2018 of file listviewctrl.cpp.

References owl::TLvItem::Selected, and owl::TLvItem::Unspecified.

◆ SetSelectedColumn()

auto owl::TListViewCtrl::SetSelectedColumn ( int colNum) -> void

Sets the selected column number.

Parameters
[in]colNumis the column number to select; -1 specifies to not select a column.
Returns
none.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761202.aspx

Definition at line 2101 of file listviewctrl.cpp.

References PRECONDITION.

◆ SetSelectionMark()

auto owl::TListViewCtrl::SetSelectionMark ( int index) -> int

Sets the selection mark for a list-view control.

The selection mark is the item index from which a multiple selection starts.

Parameters
[in]indexis the zero-based index of the new selection mark; if -1, the selection mark is removed.
Returns
the previous selection mark, or -1 if there was no previous selection mark.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761204.aspx

Definition at line 3065 of file listviewctrl.cpp.

References PRECONDITION.

◆ SetSelIndexes()

auto owl::TListViewCtrl::SetSelIndexes ( int * indexes,
int count,
bool select ) -> bool

Selects or deselects items.

Parameters
[in]indexesis the array of item indexes.
[in]countis the size of the item indexes array.
[in]selectspecifies whether to select or deselect the items.
Note
If the list-view control has the LVS_SINGLESEL style, this function will not succeed if multiple items are designated to be selected.
Returns
true if successful.

Definition at line 2036 of file listviewctrl.cpp.

◆ SetSelItemRange()

auto owl::TListViewCtrl::SetSelItemRange ( bool select,
int first,
int last ) -> bool

Selects or deselects a range of items.

Parameters
[in]selectspecifies whether to select or deselect the items.
[in]firstis the item index of the first item to select or deselect.
[in]lastis the item index of the last item to select or deselect.
Note
If the list-view control has the LVS_SINGLESEL style, this function will not succeed if multiple items are designated to be selected.
Returns
true if successful.

Definition at line 2063 of file listviewctrl.cpp.

◆ SetTextBkColor()

auto owl::TListViewCtrl::SetTextBkColor ( const TColor & c) -> bool

Sets the background color of text in a list-view control.

Parameters
[in]cthe color to use.
Note
Specify TColor::None for no text background color.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761206.aspx

Definition at line 2217 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetTextColor()

auto owl::TListViewCtrl::SetTextColor ( const TColor & c) -> bool

Sets the color of text in a list-view control.

Parameters
[in]cthe color to use.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761208.aspx

Definition at line 2247 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetTileInfo() [1/2]

auto owl::TListViewCtrl::SetTileInfo ( LVTILEINFO & lvTileInfo) -> bool

Reference overload for SetTileInfo(PLVTILEINFO).

Definition at line 3620 of file listviewctrl.cpp.

◆ SetTileInfo() [2/2]

auto owl::TListViewCtrl::SetTileInfo ( PLVTILEINFO lvTileInfo) -> bool

Sets information about a tile in a list-view control.

Parameters
[in]lvTileInfois the class containing the tile information to set.
Note
This function is not supported under the LVS_OWNERDATA style.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761210.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774766.aspx

Definition at line 3609 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetTileViewInfo()

auto owl::TListViewCtrl::SetTileViewInfo ( const TLvTileViewInfo & tileViewInfo) -> bool

Sets tile view information.

Parameters
[in]tileViewInfois the class containing the tile view information to set.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761212.aspx

Definition at line 3652 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetToolTips()

auto owl::TListViewCtrl::SetToolTips ( THandle handle) -> HWND

Sets the handle of the tooltip control that the list-view control uses to display tooltips.

Parameters
[in]handleis the handle of the tooltip control to use.
Returns
the handle of the previous tooltip control that was used.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761216.aspx

Definition at line 3431 of file listviewctrl.cpp.

References PRECONDITION.

◆ SetUnicodeFormat()

auto owl::TListViewCtrl::SetUnicodeFormat ( bool useUnicode = true) -> bool

Sets whether the Unicode character set is being used instead of ANSI.

Parameters
[in]useUnicodeif true, Unicode will be used.
Returns
the previous setting.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761218.aspx

Definition at line 3354 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetView()

auto owl::TListViewCtrl::SetView ( TListViewCtrl::TViewType viewType) -> bool

Sets the view type.

Parameters
[in]viewTypeis the view type ot set.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761220.aspx

Definition at line 3560 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().

◆ SetWorkAreas()

auto owl::TListViewCtrl::SetWorkAreas ( int count,
TRect * areas ) -> void

Sets the working areas for a list-view control.

Parameters
[in]countis the number of working areas.
[in]areasis the list of the client coordinates of the working areas; if a null pointer is passed, the working area will be set to the client area of the control.
Returns
none.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761223.aspx

Definition at line 3030 of file listviewctrl.cpp.

References PRECONDITION.

◆ SortItems()

auto owl::TListViewCtrl::SortItems ( const TCompareFunc & comparator,
LPARAM lParam = 0 ) -> bool

Sorts the list items.

Parameters
[in]comparatoris an application-defined derived class of TCompareFunc that performs the comparison.
[in]lParamis an application-defined value that will be passed to the comparison function.
Returns
true if successful.
Note
  1. The first two parameters passed to the comparison function are the values returned by TLvItem::GetItemData for the two items to be compared.
  2. During the sorting process, the list-view contents are unstable. If the comparator class causes any messages to be sent to the list-view control that modify the list-view contents, the results are unpredictable.
See also
SortItemsEx
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761227.aspx

Definition at line 1796 of file listviewctrl.cpp.

References owl::ToBool().

◆ SortItemsEx()

auto owl::TListViewCtrl::SortItemsEx ( const TCompareFunc & comparator,
LPARAM lParam = 0 ) -> bool

Sorts the list items.

This function differs from SortItems only in that the first two parameters passed to the comparison function are the item indexes for the two items to be compared.

See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761228.aspx

Definition at line 1814 of file listviewctrl.cpp.

References owl::ToBool().

◆ SubItemHitTest() [1/2]

auto owl::TListViewCtrl::SubItemHitTest ( const TPoint & p) const -> TLvHitTestInfo

Functional-style overload.

Definition at line 2865 of file listviewctrl.cpp.

◆ SubItemHitTest() [2/2]

auto owl::TListViewCtrl::SubItemHitTest ( TLvHitTestInfo & info) const -> int

Determines which list-view item or subitem is at a given position.

Parameters
[in,out]infois a class containing the position to check, and upon return contains results of the test.
Returns
item or subitem index found at the specified position if any, otherwise -1.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761229.aspx

Definition at line 2856 of file listviewctrl.cpp.

References PRECONDITION.

◆ Update()

auto owl::TListViewCtrl::Update ( int index) -> bool

Updates a list-view item.

Parameters
[in]indexis the item index to update.
Note
If the list window has LVS_AUTOARRANGE, the items are automatically arranged to their proper locations.
Returns
true if successful.
See also
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761230.aspx

Definition at line 2361 of file listviewctrl.cpp.

References PRECONDITION, and owl::ToBool().


The documentation for this class was generated from the following files: