uLib
User mode C/C++ extended API library for Win32 programmers.
|
Additional listview APIs...
Macros | |
#define | I_NOIMAGE (I_IMAGECALLBACK-1) /* Oops.. flew past I_IMAGENONE (also -2) */ |
Typedefs | |
typedef bool(__stdcall * | PFLvItemAction) (HWND hList, LPLVITEM pItem, PVOID pCtx) |
Functions | |
UINT | ListView_ForEach (HWND hLv, PFLvItemAction Action, PVOID pCtx) |
#define I_NOIMAGE (I_IMAGECALLBACK-1) /* Oops.. flew past I_IMAGENONE (also -2) */ |
Definition at line 1547 of file UtilFunc.h.
typedef bool(__stdcall * PFLvItemAction) (HWND hList, LPLVITEM pItem, PVOID pCtx) |
PFLvItemAction is the callback used with ListView_ForEach().
The callback recieves an LVITEM with the following filled in:
iItem = Item index, and iSubItem = zero.
pszText contains the item text, and cchTextMax it's length.
lParam contains the item data, if any.
state contains the item's current state.
You may freely use the LVITEM to send updates to the listview, or query and add subitems,
but you may not delete the item from the list, nor add new items, in the callback,
since that would disrupt the enumeration loop.
Note: The buffer for pszText is 256 chars thread-local, not on stack.
Return true to continue enumeration, of false to stop.
Definition at line 1565 of file UtilFunc.h.
UINT ListView_ForEach | ( | HWND | hLv, |
PFLvItemAction | Action, | ||
PVOID | pCtx | ||
) |
ListView_ForEach enumerates items in a list view until the callback returns false or the list is exhausted.
hLv | ListView handle. |
Action | Your PFLvItemAction callback for the items. |
pCtx | Anyhing your callback may need. |
ListView_ForEach returns the nr of items processed.
Definition at line 1461 of file UserUtil.cpp.