ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / OLE functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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. When leaving the server started with 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 may be displayed in the field 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
// Lance Paint Brush sur un document vide
OLECreateEmpty(OLE_OLE1, "PBrush")
// Traitement
// Sauvegarde
OLESave(OLE_OLE1, "OBJET.OLE")
// Récupère le serveur à lancer
Choix is string
Ind is int = ListSelect(LISTE_SERVOLE)
Choix = LISTE_SERVOLE[Ind] + TAB
Choix = ExtractString(Choix, 2)
OLECreateEmpty(OLE_OLE1, Choix)
Syntax
<Result> = OLECreateEmpty(<OLE control> , <Server name> [, <Locks>])
<Result>: Boolean
  • True if the function was run,
  • False otherwise.
<OLE control>: Control name
Name of the OLE control that will receive the new OLE object. If this parameter corresponds to an empty string (""), the control used will be the control to which the current event belongs. If the control contained an OLE object, this object is replaced with the new object.
<Server name>: Character string
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): Server blocking.
    The window containing the OLE control cannot be in edit as long as the user has not exited from the server.
  • False: Non-blocking 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: wd300ole.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help