ListView_SetExtendedListViewStyle

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This macro sets extended styles for list-view controls.

Syntax

void ListView_SetExtendedListViewStyle(
  HWND hwndLV, 
  DWORD dwExStyle 
);

Parameters

  • hwndLV
    Handle to the list-view control that will receive the style change.
  • dwExStyle
    Specifies the extended list-view control style. This parameter can be a combination of extended styles.

Remarks

Related message: LVM_SETEXTENDEDLISTVIEWSTYLE

Code Example

The following code example demonstrates how to use ListView_SetExtendedListViewStyle and the list view style, LVS_EX_DISJOINTFOCUS.

Note

To make the following code example easier to read, security checking and error handling are not included. This code example should not be used in a release configuration unless it has been modified to include them.

void CreateDisjointFocusLV(HWND hDlg)
{
    HWND hwndLV;
    INITCOMMONCONTROLSEX icce;
    icce.dwSize = sizeof(icce);
    icce.dwICC = ICC_LISTVIEW_CLASSES;
    InitCommonControlsEx(&icce);
    // Listview will be a child of the specified dialog    
    hwndLV = CreateWindowEx(0, WC_LISTVIEW, TEXT("My Listview"),
                            WS_CHILD | WS_VISIBLE, 0, 0, 100, 100, hDlg,
                            NULL, NULL, NULL);
    // Listview will allow its focus to be distinct from its selection
}

Requirements

Header commctrl.h
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

LVM_SETEXTENDEDLISTVIEWSTYLE
List-View Controls Macros