SetDepth
SetDepth
Set the mode of the device to a given pixel depth GDHandle gdh ; Device whose pixel depth is being set
short depth ; Depth being set to
short whichFlags ; Used to specify which of the gdFlags to check
short flags ; Used to specify the mode you want set
returns error state (0 if noErr)
SetDepth sets the mode of the specified device to the pixel depth you specify in the depth parameter. It does not change the 'scrn' resource; when the system
is rebooted, the original depth is re stored.
Note: This function is a convenience for applications that need to run on
devices of a particular depth and are unable to adapt to any other depth. Your
application should use it ONLY after asking the user's permission.
In the whichFlags parameter you specify which of the gdFlags set to modify; in
the flags parameter you specify the value. Currently, the first flag,
gdDevType, is the only one that can be set with a SetDepth call. For example, if you wanted to switch a device to black and white, you would specify a
whichFlags value of 0001 and a flags value of 0000.
can be set to the depth desired.
noErr (0) No error
paramErr (-50) Illegal parameter
cDepthErr (-157) Invalid pixel resolution