Share via


UpdateWindowSurface (Compact 7)

3/12/2014

This function is called by a display driver to update a window's back-buffer surface, the region in video memory or system memory that stores the pixels to be rendered onto a window in the UI

Syntax

int WINAPI UpdateWindowSurface(
    HWND hwnd,
    int nEscape,
    int cbInput,
    __in_bcount_opt(cbInput) LPCSTR lpszInData,
    int cbOutput,
    __out_bcount_opt(cbOutput) LPSTR lpszOutData
);

Parameters

  • hwnd
    [in] Handle to the window that has the surface to update.
  • nEscape
    [in] Escape code to pass to the display driver, which updates the window's back-buffer surface. The escape code determines the operation to perform on the window's back-buffer surface, such as querying information or copying pixel data. For a list of escape codes, see Remarks.
  • cpInput
    [in] Size, in bytes, of the buffer pointed to by lpzInData.
  • lpszInData
    [in] Pointer to the input data buffer.
  • cbOutput
    [in] Size, in bytes, of the buffer pointed to by lpzOutData.
  • lpszOutData
    [out] Pointer to the output data buffer.

Return Value

Returns 0 (zero) if the value in nEscape is unsupported or if the DrvEscape function that UpdateWindowSurface calls internally did not update the window's back-buffer surface. Returns a nonzero value if the function updated the window's back-buffer surface. Use GetLastError for extended error information.

Returns ERROR_CALL_NOT_IMPLEMENTED if you did not include the Window Compositor (SYSGEN_COMPOSITION) in your OS design.

Remarks

This function is optional. The driver can use this function to help optimize display-screen updates by analyzing the surface area of the window that is specified by the hwnd parameter.

When you use this function, the Window Compositor processes the OpenGL Embedded Systems (ES) rendering results and renders them to either the primary surface or another visible surface on the display screen.

When the driver calls this function, the Window Compositor calls back to the DrvEscape function with input arguments and information about the window's client area.

Requirements

Header

CompositorAPI.h,
pwinuser.h

sysgen

SYSGEN_COMPOSITION

See Also

Reference

Display Driver Functions

Other Resources

SetWindowCompositionFlags
SetWindowOpacity
Window Functions