ReactOS 0.4.15-dev-8222-g9164419
CListView Class Reference

#include <rosctrls.h>

Inheritance diagram for CListView:
Collaboration diagram for CListView:

Public Member Functions

HWND Create (HWND hWndParent, _U_RECT rect, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
 
void SetRedraw (BOOL redraw)
 
BOOL SetTextBkColor (COLORREF cr)
 
BOOL SetBkColor (COLORREF cr)
 
BOOL SetTextColor (COLORREF cr)
 
DWORD SetExtendedListViewStyle (DWORD dw, DWORD dwMask=0)
 
int InsertColumn (int iCol, LV_COLUMN *pcol)
 
int InsertColumn (int iCol, LPWSTR pszText, int fmt, int width=-1, int iSubItem=-1, int iImage=-1, int iOrder=-1)
 
int GetColumnWidth (int iCol)
 
HIMAGELIST SetImageList (HIMAGELIST himl, int iImageList)
 
int InsertItem (const LV_ITEM *pitem)
 
BOOL DeleteItem (int i)
 
BOOL GetItem (LV_ITEM *pitem)
 
BOOL SetItem (const LV_ITEM *pitem)
 
BOOL FindItem (int iStart, const LV_FINDINFO *plvfi)
 
int GetItemCount ()
 
BOOL DeleteAllItems ()
 
BOOL Update (int i)
 
UINT GetSelectedCount ()
 
BOOL SortItems (PFNLVCOMPARE pfnCompare, PVOID lParam)
 
BOOL EnsureVisible (int i, BOOL fPartialOK)
 
HWND EditLabel (int i)
 
int GetSelectionMark ()
 
int GetNextItem (int i, WORD flags)
 
void GetItemSpacing (SIZE &spacing, BOOL bSmallIconView=FALSE)
 
UINT GetItemState (int i, UINT mask)
 
void SetItemState (int i, UINT state, UINT mask)
 
BOOL SetItemText (int i, int subItem, LPCWSTR text)
 
void SetCheckState (int i, BOOL check)
 
int HitTest (LV_HITTESTINFO *phtInfo)
 
DWORD_PTR GetItemData (int i)
 
BOOL GetSelectedItem (LV_ITEM *pItem)
 
void GetItemText (int iItem, int iSubItem, LPTSTR pszText, int cchTextMax)
 
BOOL GetItemPosition (int nItem, POINT *pPoint)
 
BOOL SetItemPosition (int nItem, POINT *pPoint)
 
BOOL Arrange (UINT nCode)
 

Detailed Description

Definition at line 4 of file rosctrls.h.

Member Function Documentation

◆ Arrange()

BOOL CListView::Arrange ( UINT  nCode)
inline

Definition at line 241 of file rosctrls.h.

242 {
243 return (BOOL)SendMessage(LVM_ARRANGE, nCode, 0);
244 }
unsigned int BOOL
Definition: ntddk_ex.h:94
#define LVM_ARRANGE
Definition: commctrl.h:2532
#define SendMessage
Definition: winuser.h:5852

Referenced by CDefView::AutoArrange(), and CDefView::OnCommand().

◆ Create()

HWND CListView::Create ( HWND  hWndParent,
_U_RECT  rect,
LPCTSTR  szWindowName = NULL,
DWORD  dwStyle = 0,
DWORD  dwExStyle = 0,
_U_MENUorID  MenuOrID = 0U,
LPVOID  lpCreateParam = NULL 
)
inline

Definition at line 8 of file rosctrls.h.

10 {
11 m_hWnd = ::CreateWindowEx(dwExStyle,
13 szWindowName,
14 dwStyle,
15 rect.m_lpRect->left,
16 rect.m_lpRect->top,
17 rect.m_lpRect->right - rect.m_lpRect->left,
18 rect.m_lpRect->bottom - rect.m_lpRect->top,
20 MenuOrID.m_hMenu,
21 _AtlBaseModule.GetModuleInstance(),
22 lpCreateParam);
23
24 return m_hWnd;
25 }
#define WC_LISTVIEW
Definition: commctrl.h:2259
& rect
Definition: startmenu.cpp:1413
#define CreateWindowEx
Definition: winuser.h:5764

Referenced by CAppsListView::Create(), CDowloadingAppsListView::Create(), and CDefView::CreateList().

◆ DeleteAllItems()

BOOL CListView::DeleteAllItems ( )
inline

Definition at line 126 of file rosctrls.h.

127 {
129 }
#define LVM_DELETEALLITEMS
Definition: commctrl.h:2413

Referenced by CDefView::InitList(), CDefView::Refresh(), and CDefView::RemoveObject().

◆ DeleteItem()

BOOL CListView::DeleteItem ( int  i)
inline

Definition at line 101 of file rosctrls.h.

102 {
103 return (BOOL)SendMessage(LVM_DELETEITEM, i, 0);
104 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define LVM_DELETEITEM
Definition: commctrl.h:2410

Referenced by CDefView::LV_DeleteItem(), and CDefView::RemoveObject().

◆ EditLabel()

HWND CListView::EditLabel ( int  i)
inline

Definition at line 151 of file rosctrls.h.

152 {
153 return (HWND)SendMessage(LVM_EDITLABEL, i, 0);
154 }
#define LVM_EDITLABEL
Definition: commctrl.h:2538

Referenced by CDefView::SelectItem().

◆ EnsureVisible()

BOOL CListView::EnsureVisible ( int  i,
BOOL  fPartialOK 
)
inline

Definition at line 146 of file rosctrls.h.

147 {
148 return (BOOL)SendMessage(LVM_ENSUREVISIBLE, i, MAKELPARAM((fPartialOK),0));
149 }
#define LVM_ENSUREVISIBLE
Definition: commctrl.h:2518
#define MAKELPARAM(l, h)
Definition: winuser.h:4008

Referenced by CDefView::SelectItem().

◆ FindItem()

BOOL CListView::FindItem ( int  iStart,
const LV_FINDINFO plvfi 
)
inline

Definition at line 116 of file rosctrls.h.

117 {
118 return (BOOL)SendMessage(LVM_FINDITEM, iStart, (LPARAM) plvfi);
119 }
#define LVM_FINDITEM
Definition: commctrl.h:2468
LONG_PTR LPARAM
Definition: windef.h:208
_In_ UINT iStart
Definition: wingdi.h:3620

◆ GetColumnWidth()

int CListView::GetColumnWidth ( int  iCol)
inline

Definition at line 86 of file rosctrls.h.

87 {
88 return (int)SendMessage(LVM_GETCOLUMNWIDTH, iCol);
89 }
#define LVM_GETCOLUMNWIDTH
Definition: commctrl.h:2641

◆ GetItem()

BOOL CListView::GetItem ( LV_ITEM pitem)
inline

Definition at line 106 of file rosctrls.h.

107 {
108 return (BOOL)SendMessage(LVM_GETITEM, 0, reinterpret_cast<LPARAM>(pitem));
109 }
#define LVM_GETITEM
Definition: commctrl.h:2392

Referenced by GetItemData(), GetSelectedItem(), CDefView::LV_RenameItem(), and CDefView::SelectItem().

◆ GetItemCount()

◆ GetItemData()

DWORD_PTR CListView::GetItemData ( int  i)
inline

Definition at line 204 of file rosctrls.h.

205 {
206 LVITEMW lvItem = { 0 };
207 lvItem.mask = LVIF_PARAM;
208 lvItem.iItem = i;
209 BOOL ret = GetItem(&lvItem);
210 return (DWORD_PTR)(ret ? lvItem.lParam : NULL);
211 }
BOOL GetItem(LV_ITEM *pitem)
Definition: rosctrls.h:106
#define NULL
Definition: types.h:112
#define LVIF_PARAM
Definition: commctrl.h:2311
UINT mask
Definition: commctrl.h:2360
LPARAM lParam
Definition: commctrl.h:2368
uint32_t DWORD_PTR
Definition: typedefs.h:65
int ret

Referenced by CDefView::_MoveSelectionOnAutoArrange(), and CDefView::_PidlByItem().

◆ GetItemPosition()

BOOL CListView::GetItemPosition ( int  nItem,
POINT pPoint 
)
inline

Definition at line 231 of file rosctrls.h.

232 {
233 return (BOOL)SendMessage(LVM_GETITEMPOSITION, nItem, (LPARAM)pPoint);
234 }
#define LVM_GETITEMPOSITION
Definition: commctrl.h:2483

Referenced by CDefView::Drop(), CDefView::GetItemPosition(), and CDefView::OnNotify().

◆ GetItemSpacing()

void CListView::GetItemSpacing ( SIZE spacing,
BOOL  bSmallIconView = FALSE 
)
inline

Definition at line 166 of file rosctrls.h.

167 {
168 DWORD ret = SendMessage(LVM_GETITEMSPACING, bSmallIconView);
169 spacing.cx = LOWORD(ret);
170 spacing.cy = HIWORD(ret);
171 }
unsigned long DWORD
Definition: ntddk_ex.h:95
#define LOWORD(l)
Definition: pedump.c:82
#define LVM_GETITEMSPACING
Definition: commctrl.h:2711
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28
#define HIWORD(l)
Definition: typedefs.h:247

Referenced by CDefView::GetSpacing().

◆ GetItemState()

UINT CListView::GetItemState ( int  i,
UINT  mask 
)
inline

Definition at line 173 of file rosctrls.h.

174 {
176 }
GLenum GLint GLuint mask
Definition: glext.h:6028
#define LVM_GETITEMSTATE
Definition: commctrl.h:2675

Referenced by CDefView::OnCommand(), and CDefView::OnContextMenu().

◆ GetItemText()

void CListView::GetItemText ( int  iItem,
int  iSubItem,
LPTSTR  pszText,
int  cchTextMax 
)
inline

Definition at line 221 of file rosctrls.h.

222 {
223 LV_ITEM itemInfo;
224 itemInfo.iSubItem = iSubItem;
225 itemInfo.pszText = pszText;
226 itemInfo.cchTextMax = cchTextMax;
227
228 SendMessage(LVM_GETITEMTEXT, iItem, (LPARAM) &itemInfo);
229 }
#define LVM_GETITEMTEXT
Definition: commctrl.h:2682
#define LV_ITEM
Definition: commctrl.h:2337

◆ GetNextItem()

int CListView::GetNextItem ( int  i,
WORD  flags 
)
inline

◆ GetSelectedCount()

UINT CListView::GetSelectedCount ( )
inline

Definition at line 136 of file rosctrls.h.

137 {
139 }
unsigned int UINT
Definition: ndis.h:50
#define LVM_GETSELECTEDCOUNT
Definition: commctrl.h:2708

Referenced by CDefView::FillFileMenu(), CDefView::GetSelections(), CDefView::OnContextMenu(), CDefView::OpenSelectedItems(), and CDefView::UpdateStatusbar().

◆ GetSelectedItem()

BOOL CListView::GetSelectedItem ( LV_ITEM pItem)
inline

Definition at line 213 of file rosctrls.h.

214 {
215 pItem->iItem = GetNextItem(-1, LVNI_ALL | LVNI_SELECTED);
216 if (pItem->iItem == -1)
217 return FALSE;
218 return GetItem(pItem);
219 }
int GetNextItem(int i, WORD flags)
Definition: rosctrls.h:161
#define FALSE
Definition: types.h:117
#define LVNI_SELECTED
Definition: commctrl.h:2424
#define LVNI_ALL
Definition: commctrl.h:2422

◆ GetSelectionMark()

int CListView::GetSelectionMark ( )
inline

Definition at line 156 of file rosctrls.h.

157 {
159 }
#define LVM_GETSELECTIONMARK
Definition: commctrl.h:2788

Referenced by CDefView::GetSelectionMarkedItem().

◆ HitTest()

int CListView::HitTest ( LV_HITTESTINFO phtInfo)
inline

Definition at line 199 of file rosctrls.h.

200 {
201 return (int)SendMessage(LVM_HITTEST, 0, reinterpret_cast<LPARAM>(phtInfo));
202 }
#define LVM_HITTEST
Definition: commctrl.h:2515

Referenced by CDefView::drag_notify_subitem(), and CDefView::OnContextMenu().

◆ InsertColumn() [1/2]

int CListView::InsertColumn ( int  iCol,
LPWSTR  pszText,
int  fmt,
int  width = -1,
int  iSubItem = -1,
int  iImage = -1,
int  iOrder = -1 
)
inline

Definition at line 57 of file rosctrls.h.

58 {
59 LV_COLUMN column = {0};
61 column.pszText = pszText;
62 column.fmt = fmt;
63 if(width != -1)
64 {
65 column.mask |= LVCF_WIDTH;
66 column.cx = width;
67 }
68 if(iSubItem != -1)
69 {
70 column.mask |= LVCF_SUBITEM;
71 column.iSubItem = iSubItem;
72 }
73 if(iImage != -1)
74 {
75 column.mask |= LVCF_IMAGE;
76 column.iImage = iImage;
77 }
78 if(iOrder != -1)
79 {
80 column.mask |= LVCF_ORDER;
81 column.iOrder = iOrder;
82 }
83 return InsertColumn(iCol, &column);
84 }
int InsertColumn(int iCol, LV_COLUMN *pcol)
Definition: rosctrls.h:52
GLint GLint GLsizei width
Definition: gl.h:1546
#define LVCF_ORDER
Definition: commctrl.h:2591
#define LVCF_IMAGE
Definition: commctrl.h:2590
#define LVCF_WIDTH
Definition: commctrl.h:2587
#define LVCF_FMT
Definition: commctrl.h:2586
#define LVCF_SUBITEM
Definition: commctrl.h:2589
#define LVCF_TEXT
Definition: commctrl.h:2588
#define LV_COLUMN
Definition: commctrl.h:2547
Definition: dsound.c:943

◆ InsertColumn() [2/2]

int CListView::InsertColumn ( int  iCol,
LV_COLUMN pcol 
)
inline

Definition at line 52 of file rosctrls.h.

53 {
54 return (int)SendMessage(LVM_INSERTCOLUMN, iCol, reinterpret_cast<LPARAM>(pcol));
55 }
#define LVM_INSERTCOLUMN
Definition: commctrl.h:2634

Referenced by CDowloadingAppsListView::AddColumn(), and InsertColumn().

◆ InsertItem()

int CListView::InsertItem ( const LV_ITEM pitem)
inline

Definition at line 96 of file rosctrls.h.

97 {
98 return (int)SendMessage(LVM_INSERTITEM, 0, reinterpret_cast<LPARAM>(pitem));
99 }
#define LVM_INSERTITEM
Definition: commctrl.h:2406

Referenced by CDowloadingAppsListView::AddItem(), and CDefView::LV_AddItem().

◆ SetBkColor()

BOOL CListView::SetBkColor ( COLORREF  cr)
inline

Definition at line 37 of file rosctrls.h.

38 {
39 return (BOOL)SendMessage(LVM_SETBKCOLOR, 0, cr);
40 }
#define LVM_SETBKCOLOR
Definition: commctrl.h:2293

Referenced by CDefView::UpdateListColors().

◆ SetCheckState()

void CListView::SetCheckState ( int  i,
BOOL  check 
)
inline

Definition at line 194 of file rosctrls.h.

195 {
197 }
void SetItemState(int i, UINT state, UINT mask)
Definition: rosctrls.h:178
#define check(expected, result)
Definition: dplayx.c:32
#define INDEXTOSTATEIMAGEMASK(i)
Definition: commctrl.h:2328
#define LVIS_STATEIMAGEMASK
Definition: commctrl.h:2326

◆ SetExtendedListViewStyle()

DWORD CListView::SetExtendedListViewStyle ( DWORD  dw,
DWORD  dwMask = 0 
)
inline

Definition at line 47 of file rosctrls.h.

48 {
50 }
REFIID LPVOID DWORD_PTR dw
Definition: atlbase.h:40
#define LVM_SETEXTENDEDLISTVIEWSTYLE
Definition: commctrl.h:2724

Referenced by CDefView::ArrangeGrid(), CDefView::CreateList(), CDefView::OnCommand(), and CDefView::UpdateListColors().

◆ SetImageList()

HIMAGELIST CListView::SetImageList ( HIMAGELIST  himl,
int  iImageList 
)
inline

Definition at line 91 of file rosctrls.h.

92 {
93 return (HIMAGELIST)SendMessage(LVM_SETIMAGELIST, iImageList, reinterpret_cast<LPARAM>(himl));
94 }
HIMAGELIST himl
#define LVM_SETIMAGELIST
Definition: commctrl.h:2303

Referenced by CDefView::InitList().

◆ SetItem()

BOOL CListView::SetItem ( const LV_ITEM pitem)
inline

Definition at line 111 of file rosctrls.h.

112 {
113 return (BOOL)SendMessage(LVM_SETITEM, 0, reinterpret_cast<LPARAM>(pitem));
114 }
#define LVM_SETITEM
Definition: commctrl.h:2399

Referenced by CDefView::LV_RefreshIcon(), CDefView::LV_RenameItem(), CDefView::LV_UpdateItem(), CDefView::OnNotify(), and CDefView::SelectItem().

◆ SetItemPosition()

BOOL CListView::SetItemPosition ( int  nItem,
POINT pPoint 
)
inline

Definition at line 236 of file rosctrls.h.

237 {
238 return (BOOL)SendMessage(LVM_SETITEMPOSITION, nItem, MAKELPARAM(pPoint->x, pPoint->y));
239 }
#define LVM_SETITEMPOSITION
Definition: commctrl.h:2480
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48

Referenced by CDefView::Drop(), and CDefView::SelectAndPositionItems().

◆ SetItemState()

void CListView::SetItemState ( int  i,
UINT  state,
UINT  mask 
)
inline

Definition at line 178 of file rosctrls.h.

179 {
181 item.stateMask = mask;
182 item.state = state;
183 SendMessage(LVM_SETITEMSTATE, i, reinterpret_cast<LPARAM>(&item));
184 }
static int state
Definition: maze.c:121
static ATOM item
Definition: dde.c:856
#define LVM_SETITEMSTATE
Definition: commctrl.h:2672

Referenced by CDefView::OnCommand(), CDefView::SelectAndPositionItems(), CDefView::SelectItem(), and SetCheckState().

◆ SetItemText()

BOOL CListView::SetItemText ( int  i,
int  subItem,
LPCWSTR  text 
)
inline

Definition at line 186 of file rosctrls.h.

187 {
189 item.iSubItem = subItem;
190 item.pszText = (LPWSTR)text;
192 }
const WCHAR * text
Definition: package.c:1799
#define LVM_SETITEMTEXT
Definition: commctrl.h:2689
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by CDowloadingAppsListView::SetDownloadStatus().

◆ SetRedraw()

void CListView::SetRedraw ( BOOL  redraw)
inline

Definition at line 27 of file rosctrls.h.

28 {
30 }
void redraw(int x, int y, int cx, int cy)
Definition: qtewin.cpp:1248
#define WM_SETREDRAW
Definition: winuser.h:1616

Referenced by CDefView::Drop(), CDefView::FillList(), CDefView::LoadColumns(), and CDefView::SetRedraw().

◆ SetTextBkColor()

BOOL CListView::SetTextBkColor ( COLORREF  cr)
inline

Definition at line 32 of file rosctrls.h.

33 {
34 return (BOOL)SendMessage(LVM_SETTEXTBKCOLOR, 0, cr);
35 }
#define LVM_SETTEXTBKCOLOR
Definition: commctrl.h:2662

Referenced by CDefView::UpdateListColors().

◆ SetTextColor()

BOOL CListView::SetTextColor ( COLORREF  cr)
inline

Definition at line 42 of file rosctrls.h.

43 {
44 return (BOOL)SendMessage(LVM_SETTEXTCOLOR, 0, cr);
45 }
#define LVM_SETTEXTCOLOR
Definition: commctrl.h:2658

Referenced by CDefView::UpdateListColors().

◆ SortItems()

BOOL CListView::SortItems ( PFNLVCOMPARE  pfnCompare,
PVOID  lParam 
)
inline

Definition at line 141 of file rosctrls.h.

142 {
143 return (BOOL)SendMessage(LVM_SORTITEMS, (WPARAM)lParam, (LPARAM) pfnCompare);
144 }
LPARAM lParam
Definition: combotst.c:139
#define LVM_SORTITEMS
Definition: commctrl.h:2702
UINT_PTR WPARAM
Definition: windef.h:207

Referenced by CDefView::_MoveSelectionOnAutoArrange(), and CDefView::_Sort().

◆ Update()

BOOL CListView::Update ( int  i)
inline

Definition at line 131 of file rosctrls.h.

132 {
133 return (BOOL)SendMessage(LVM_UPDATE, i, 0);
134 }
#define LVM_UPDATE
Definition: commctrl.h:2670

Referenced by CDefView::LV_RefreshIcon(), CDefView::LV_RenameItem(), CDefView::LV_UpdateItem(), and CDefView::OnNotify().


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