# Function Reference

# _GUICtrlListView_BeginUpdate

Prevents updating of the control until the _GUICtrlListView_EndUpdate() function is called

#include <GuiListView.au3>
_GUICtrlListView_BeginUpdate ( $hWnd )

## Parameters

$hWnd | Control ID/Handle to the control

## Return Value

Success: | True.
Failure: | False.

## Related

_GUICtrlListView_EndUpdate

## Example

    #include <GUIConstantsEx.au3>
    #include <GuiImageList.au3>
    #include <GuiListView.au3>

    Example()

    Func Example()
        Local $hImage, $idListview

        GUICreate("ListView Begin Update", 400, 300)
        $idListview = GUICtrlCreateListView("", 2, 2, 394, 268)
        GUICtrlSetStyle($idListview, $LVS_ICON)
        GUISetState(@SW_SHOW)

        ; Load images
        $hImage = _GUIImageList_Create(32, 32)
        _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap(GUICtrlGetHandle($idListview), 0xFF0000, 32, 32))
        _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap(GUICtrlGetHandle($idListview), 0x00FF00, 32, 32))
        _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap(GUICtrlGetHandle($idListview), 0x0000FF, 32, 32))
        _GUICtrlListView_SetImageList($idListview, $hImage, 0)

        ; Add items
        _GUICtrlListView_BeginUpdate($idListview)
        For $iI = 1 To 10
            _GUICtrlListView_AddItem($idListview, "Red", 0)
            _GUICtrlListView_AddItem($idListview, "Green", 1)
            _GUICtrlListView_AddItem($idListview, "Blue", 2)
        Next
        _GUICtrlListView_EndUpdate($idListview)

        ; Loop until the user exits.
        Do
        Until GUIGetMsg() = $GUI_EVENT_CLOSE
        GUIDelete()
    EndFunc   ;==>Example