Microsoft Windows CE 3.0  

SetMode

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.

The SetModefunction is used to change the current display mode, and conditionally update the current GDI surface. You are required to implement the GPEversion of this function. You should also override DDGPE's version of the function to allow it to operate properly.

The DDGPE::SetModefunction is similar to the GPE::SetModefunction. The difference between the two versions of the function is the addition of the bChangeGDISurfaceMode parameter for DDGPE. If this parameter is TRUE, the behavior of SetModeshould be identical to that expected of the GPEversion. If the parameter is FALSE, however, the SetModefunction should simply change the physical mode. In both cases, the m_dwPhysicalModeID DDGPEmember variable should be updated.

virtual SCODE SetMode (
int
modeNo
,
HPALETTE *
pPalette
,
BOOL
bChangeGDISurfaceMode
);

Parameters

modeNo
The requested mode number.
pPalette
The palette for the requested mode, if applicable. If the palette does not apply or if the default palette should be used, this parameter should be NULL.
bChangeGDISurfaceMode
Indicates whether the GDIsurface mode should be changed as a result of the SetMode. If this parameter is TRUE, the current GDImode is modified, and the GDIsurface is reallocated, if necessary. Otherwise, this function simply sets the hardware's mode and updates the physical mode settings.

Return Values

None



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.