ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / OLE functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
OLECreateCopy (Function)
In french: OLECréeCopie
Associates an OLE control with an OLE object while specifying a base file. OLECreateCopy starts the OLE server that created the file. A copy of the file is edited. The server to run is deduced from the extension of the base file (Paint Brush for the BMP extension, WinWord for the DOC extension, etc.). During the exit from the server, the object is automatically drawn in the OLE control of the WINDEV window. This function is used to modify an OLE object.
Remark: Depending on the server that created the OLE object, the object can be displayed in the control as:
  • its bitmap representation (example of image created with Paint Brush),
  • its vector representation (example of worksheet created by Excel),
  • the icon representing the server (icon created by WinWord),
  • text.
Example
// The Castle.gif image was created by Paint Brush.
// Start Paint Brush with the Castle.gif image loaded.
OLECreateCopy(OLE_OLE1, "C:\Windows\Castle.gif")
// Process
// Save
OLESave(OLE_OLE1, "OBJECT.OLE")
Syntax
<Result> = OLECreateCopy(<OLE control> , <File name> [, <Locks>])
<Result>: Boolean
  • True if the function was run,
  • False otherwise.
<OLE control>: Control name
Name of OLE control that will receive the OLE object. If the control contained an object, this object is replaced with the new object. If this parameter corresponds to an empty string (""), the control used will be the control to which the current event belongs.
<File name>: Character string
Name and path (if necessary) of base file (with its extension). This file can be any file created with an OLE server (BMP image from Paint Brush, .XLS calculation worksheet, .DOC Word document, etc.).
<Locks>: Optional boolean
  • True (default value): Locking server.
    The window containing the OLE control cannot be in edit as long as the user has not exited from the server.
  • False: Non-locking server.
    The user can perform inputs in the window containing the OLE control while the server is still started. Used to play a verb with OLEPlay.
Remarks
Only OLE version 1 is supported.
Component: wd290ole.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help