ListView_SetExtendedListViewStyle

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

This macro sets extended styles for list-view controls.


void ListView_SetExtendedListViewStyle(
  HWND hwndLV, 
  DWORD dwExStyle 
);

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.

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

Aa933024.note(en-us,MSDN.10).gifNote:
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
}

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

Community Additions

Show: