Microsoft Windows CE 3.0  

DrvEnableSurface

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function sets up a surface to be drawn on and associates it with a specified PDEV.

HSURF DrvEnableSurface(
IN DHPDEV
dhpdev
);

Parameters

dhpdev
Handle to a PDEVstructure. This value is the return value of the DrvEnablePDEVfunction. The PDEVdescribes the physical device for which a surface is to be created.

Return Values

A handle that identifies the newly created surface indicates success. Zero indicates failure.

Remarks

Depending on the device and circumstances, the driver can do any of the following to enable the surface:

  • If the driver manages its own surface, the driver can call the EngCreateDeviceSurfacefunction to get a handle to the surface.
  • The GDI can manage the surface completely if the device has a surface that resembles a standard format bitmap. The driver can obtain a bitmap handle for the surface by calling the EngCreateBitmapfunction with a pointer to the buffer for the bitmap.
  • The GDI can collect the graphics directly onto a GDI bitmap. The driver should call EngCreateBitmap, allowing the GDI to allocate memory for the bitmap. This function is generally used only by printer devices.

    Any existing GDI bitmap handle is a valid surface handle.

    Before defining and returning a surface, a graphics driver must associate the surface with the physical device using the EngAssociateSurfacefunction. This GDI function allows the driver to specify which graphics output routines are supported for standard format bitmaps. A call to this function can only be made when no surface exists for the specified physical device.

    This function is required for graphics drivers.

    Requirements

    Runs on Versions Defined in Include Link to
    Windows CE OS 1.0 and later      
    Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

    See Also

    DrvDisableSurface



     Last updated on Tuesday, July 13, 2004

    © 2004 Microsoft Corporation. All rights reserved.