Export (0) Print
Expand All
Expand Minimize

LVM_MAPIDTOINDEX

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This message maps the identifier (ID) of an item to an index.

To send this message, call the SendMessage function.


lResult = SendMessage(
   (HWND) hWndControl,
   (UINT) LVM_MAPIDTOINDEX, 
   (WPARAM) wParam,    // = (WPARAM) (UINT) id;
   (LPARAM) lParam     // = 0; not used, must be zero
);

id

UINT that contains the unique ID of an item.

lParam

Must be zero.

Returns the most current index.

List-view controls internally track items by index. This can present problems because indexes can change during the control's lifetime.

The list-view control can tag an item with an ID when the item is created. You can use this ID to guarantee uniqueness during the lifetime of the list-view control.

If you need the index of an item after an ID is created you can call LVM_MAPIDTOINDEX with the unique ID and it returns the most current index.

Aa932275.note(en-us,MSDN.10).gifNote:
In a multithreaded environment, the index is only guaranteed on the thread that hosts the list-view control, not on background threads.

Headercommctrl.h
Windows Embedded CEWindows CE 5.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

ADD
Show:
© 2014 Microsoft