Windows Mobile 6.5
A version of this page is also available for

This macro changes the callback mask for a list-view control. You can use this macro or send the LVM_SETCALLBACKMASK message explicitly.

BOOL ListView_SetCallbackMask( 
  HWND hwnd, 
  UINT mask 


Handle to the list-view control.


Value of the callback mask. The bits of the mask indicate the item states or images for which the application stores the current state data. It can be any combination of the following constants.

Value Description


The item is marked for a cut-and-paste operation.


The item is highlighted as a drag-and-drop target.


The item has the focus.


The item is selected.


The application stores the image list index of the current overlay image for each item.


The application stores the image list index of the current state image for each item.

TRUE indicates success. FALSE indicates failure.

The callback mask of a list-view control is a set of bit flags that specify 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 zero by default, meaning that the list-view control stores all item state information. After creating a list-view control and initializing its items, you can use the ListView_SetCallbackMask macro or LVM_SETCALLBACKMASK message to change the callback mask. To get the current callback mask, send the LVM_GETCALLBACKMASK message.

For more information about overlay images, state images, and list-view callbacks, see User Interface Services.


Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions