NMLVDISPINFOW structure (commctrl.h)

Contains information about an LVN_GETDISPINFO or LVN_SETDISPINFO notification code. This structure is the same as the LV_DISPINFO structure, but has been renamed to fit standard naming conventions.

Syntax

typedef struct tagLVDISPINFOW {
  NMHDR   hdr;
  LVITEMW item;
} NMLVDISPINFOW, *LPNMLVDISPINFOW;

Members

hdr

Type: NMHDR

NMHDR structure that contains information about this notification code.

item

Type: LVITEM

LVITEM structure that identifies the item or subitem. The structure either contains or receives information about the item. The mask member contains a set of bit flags that specify which item attributes are relevant. For more information on the available bit flags, see LVITEM.

Remarks

If the LVITEM structure is receiving item text, the pszText and cchTextMax members specify the address and size of a buffer. You can either copy text to the buffer or assign the address of a string to the pszText member. In the latter case, you must not change or delete the string until the corresponding item text is deleted or two additional LVN_GETDISPINFO messages have been sent.

If you are handling the LVN_GETDISPINFO message, you can set the LVIF_DI_SETITEM flag in the mask member of the LVITEM structure. This tells the operating system to store the requested list item information and not ask for it again. For list-view controls with the LVS_REPORT style, this flag only applies to the first (subitem 0) column's information. The control will not store information for subitems.

Note

The commctrl.h header defines NMLVDISPINFO as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header commctrl.h