Reference Guide > W Routines > WCopy Function (Windows)
  

WCopy Function (Windows)
Copies the contents of a graphics window onto the Clipboard.
Usage
status = WCopy( [window_index] )
Input Parameters
window_index — (optional) The index of the window to copy to the clipboard. If not specified, the current window is assumed.
Output Parameters
None.
Returned Value
statusThe value returned by WCopy; expected values are:
*< 0 — Indicates an error.
*0 — Indicates a successful copy.
Keywords
None.
Discussion
You can copy graphics to the Clipboard in two ways:
*The WCopy function
*The Copy to Clipboard option on the graphics window Control menu
Example
This example demonstrates a simple method for resizing graphics using WCOPY and WPASTE.
 
note
The graphics inside the window are not resized.
WINDOW, 2
; Display some graphics in the window.
SHADE_SURF, DIST(40)
; Now, resize the window using the mouse.
; Copy the graphics to the Clipboard.
status = WCopy(2)
; Paste the plot back into the window. The graphics are redrawn 
; to fit in the resized window.
status = WPaste(2)
See Also
WINDOW, WPASTE
The graphics window Control menu includes a command that copies graphics to the Clipboard. For information on the Control menu, see the PV‑WAVE User’s Guide.

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.