PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
OLECreateEmpty (Function)
In French: OLECréeVide
Associates an OLE control with an OLE object by invoking a specific OLE server. To perform this operation, OLECreateEmpty starts the requested OLE server. The current document is a new document. The new document can be edited and created on the server. During the exit from the server started by OLECreateEmpty, the created object is automatically drawn in the OLE control of the WINDEV window. This function is used to create a new object.
Note: 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
// Starts Paint Brush on an empty document
OLECreateEmpty(OLE_OLE1, "PBrush")
// Process
// Save
OLESave(OLE_OLE1, "OBJECT.OLE")
// Retrieves the server to start
Choice is string
Sub is int = ListSelect(LIST_OLESERV)
Choice = LIST_OLESERV[Sub] + TAB
Choice = ExtractString(Choice, 2)
OLECreateEmpty(OLE_OLE1, Choice)
Syntax
<Result> = OLECreateEmpty(<Control Name> , <Server Name> [, <Locks>])
<Result>: Boolean
  • True if the function was run,
  • False otherwise.
<Control Name>: Character string (with or without quotes)
Name of the OLE control that will receive the new OLE object. If this parameter corresponds to an empty string (""), the control to which the current process belongs will be used. If the control contained an OLE object, this object is replaced by the new object.
<Server Name>: Character string (with quotes)
Official name of the OLE server that will provide the OLE object. The list of available servers is returned by OLEServer or by checking the OLE database with REGEDIT of Windows.
<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.
Components
WINDEVReports and Queries wd230ole.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment