IDirectDrawSurface2::EnumOverlayZOrders

HRESULT EnumOverlayZOrders(DWORD dwFlags, LPVOID lpContext,

LPDDENUMSURFACESCALLBACK lpfnCallback);

Enumerates the overlay surfaces on the specified destination. The overlays can be enumerated in front-to-back or back-to-front order.

·Returns DD_OK if successful, or one of the following error values otherwise:

DDERR_INVALIDOBJECT

DDERR_INVALIDPARAMS

dwFlags

One of the following flags:

DDENUMOVERLAYZ_BACKTOFRONT

Enumerates overlays back to front.

DDENUMOVERLAYZ_FRONTTOBACK

Enumerates overlays front to back.

lpContext

Address of the user-defined context that will be passed to the callback function for each overlay surface.

lpfnCallback

Address of the fnCallback function that will be called for each surface being overlaid on this surface.