The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

update command

The update command repaints the current frame into the specified device context (DC). Digital-video devices recognize this command.

To send this command, call the mciSendString function with the lpszCommand parameter set as follows.

  TEXT("update %s %s %s"), 



Identifier of an MCI device. This identifier or alias is assigned when the device is opened.


Handle of a DC. The following table lists device types that recognize the update command and the flags used by each type.

digitalvideohdc hdc
hdc hdc at rect
paint hdc hdc


The following table lists the flags that can be specified in the lpszHDC parameter and their meanings.

hdc hdcSpecifies the handle of the DC to paint.
hdc hdc at rectSpecifies the clipping rectangle relative to the client rectangle.
paint hdc hdcPaints the DC when the application receives a WM_PAINT message intended for a DC.


To specify the handle of the DC, use the string "hdc" followed by an ASCII representation of the handle. The rectangle is specified asX1 Y1 X2 Y2. The coordinatesX1 Y1specify the upper left corner of the rectangle, and the coordinatesX2 Y2specify the width and height.


Can be "wait", "notify", or both. For digital-video devices, "test" can also be specified. For more information about these flags, see The Wait, Notify, and Test Flags.

Return Value

Returns zero if successful or an error otherwise.


The following command updates the entire display window used by the "movie" device. The number 203 is a handle to a DC obtained from the BeginPaint function.

update movie hdc 203


Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

See also

MCI Command Strings