Share via


DDGPE::DetectMode (Windows Embedded CE 6.0)

1/6/2010

This method determines the display mode that corresponds exactly to a set of parameters. If GetMode and GetModeEx are supported, they parse the list of supported modes to find the display mode that matches the parameters.

Syntax

virtual SCODE DetectMode(
  DWORD* dwModeID, 
  DWORD dwWidth, 
  DWORD dwHeight, 
  EGPEFormat format, 
  EDDGPEPixelFormat pixelFormat, 
  DDPIXELFORMAT* pDDPF = NULL 
);

Parameters

  • dwModeID
    Mode that is detected, based on the selected parameters.
  • dwWidth
    Display mode's width in pixels.
  • dwHeight
    Display mode's height in pixels.
  • format
    Display mode's format.
  • pixelFormat
    Display mode's pixel format.
  • pDDPF
    DirectDraw pixel format structure to use in addition to the other parameters for precisely matching a mode. If this parameter is NULL, it is ignored, and the function relies on the other parameters to find a match.

Return Value

The return value is S_OK, if the function is successful. Otherwise, an error code is returned.

Requirements

Header ddgpe.h
Library Ddgpe.lib
Windows Embedded CE Windows Embedded CE 6.0 and later

See Also

Concepts

DDGPE Class
DDGPE Class Definition