fg_modeset()

Win32 DirectX Fastgraph/Light

Prototype

int fg_modeset (int width, int height, int depth, int style);

Function fg_modeset (ByVal width As Long, ByVal height As Long, ByVal depth As Long, ByVal style As Long) As Long

function fg_modeset (width, height, depth, style : integer) :integer;

Description

The fg_modeset() function defines the desktop resolution and color depth when using Fastgraph's native libraries. We recommend that programs that change the display mode with fg_modeset() do so before setting up the logical palette, as some Windows display drivers redefine the palette values when changing display modes.

Parameters

width is the new horizontal resolution in pixels.

height is the new vertical resolution in pixels.

depth is the new color depth in bits per pixel. It must be 0, 8, 16, 24, or 32. If zero, fg_modeset() ignores the other parameters and restores the default display resolution and color depth as defined in the registry.

style controls the taskbar visibility. If style is zero, the display will include a taskbar; if style is any other value, the taskbar will be invisible.

Return value

<0 = The mode change failed

0 = The mode change was successful

1 = Windows must be restarted before the new mode takes effect

Restrictions

For some older display drivers, if the specified color depth does not match the display's current color depth, Windows must be restarted before the new mode takes effect.

See also

fg_colors(), fg_ddsetup(), fg_modetest()

Examples

Display, TMcubeX

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.