fg_clip2vb()

Win32 DirectX Fastgraph/Light

Prototype

int fg_clip2vb (int minx, int maxx, int miny, int maxy, int flags);

Function fg_clip2vb (ByVal minx As Long, ByVal maxx As Long, ByVal miny As Long, ByVal maxy As Long, ByVal flags As Long) As Long

function fg_clip2vb (minx, maxx, miny, maxy, flags : integer) : integer;

Description

The fg_clip2vb() function copies a rectangular region from the Windows clipboard to the active virtual buffer. The region's extremes are expressed in screen space units.

Parameters

minx is the x coordinate of the source region's left edge.

maxx is the x coordinate of the source region's right edge. It must be greater than or equal to the value of minx. If the clipboard image width is less than the width of the specified transfer region, maxx is reduced to minx+width-1.

miny is the y coordinate of the source region's top edge. If the clipboard image height is less than the height of the transfer region, miny is reduced to maxy-height+1.

maxy is the y coordinate of the source region's bottom edge. It must be greater than or equal to the value of miny.

flags is a bit mask that controls how the resulting image is displayed and whether we cut or copy the clipboard contents, as shown here:

Bit

Value

Meaning

0

0

Update the logical palette with the clipboard palette data

0

1

Ignore the clipboard palette data

1

0

Empty clipboard after copying its contents (cut)

1

1

Keep clipboard contents intact (copy)

All other bits are reserved for future use and should be zero.

Return value

0 = Success

-1 = Another application has control of the clipboard

-2 = The clipboard does not contain a DIB image

-3 = The color depth of the clipboard image does not match the virtual buffer color depth

Restrictions

If the clipboard image width or height exceeds the size of the transfer region, the clipboard image is truncated at the boundaries of the transfer region.

See also

fg_vb2clip()

Examples

CBdemo

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.