ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Managing external languages
  • Use
  • Syntax
  • From a program written in C, C++, Java or Visual Basic
  • From a program written in Pascal or Delphi
  • From a program written in Cobol
  • From a program written in Fortran
  • Details of parameters
  • Notes
  • Function specific to the external language
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
Use
Calls a WLanguage function from an external language.
Caution: This function must not be used in a WINDEV application. Indeed, this function is not a WLanguage function.
Using specific preset functions
// From a program written in C, C++, Java or Visual Basic
// Open the "Window" window
CallWD("Open,Window.WDW")
// Switch the window to edit
CallWD("Screen,Input")
// Call a global WLanguage procedure
CallWD("pMyCollection.CalculateOrder(2451478)")
Using the entire WLanguage code (slower because performs a dynamic compilation of code)
// From a program written in Pascal...
// Open the "Window" window
CallWD('Open,Window.WDW')
// Call a global WLanguage procedure
CallWD('pMyCollection.CalculateOrder(2451478)')
Syntax

From a program written in C, C++, Java or Visual Basic

CallWD("<Function name>,<Function parameters>")

or
CallWD("<WLanguage code>")

From a program written in Pascal or Delphi

CallWD('<Function name>,<Function parameters>')

or
CallWD('<WLanguage code>')

From a program written in Cobol

call "_CallWD" using by reference "<Function name>,<Function parameters>" & x"00"

or
call "_CallWD" using by reference "<WLanguage code>" & x"00"

From a program written in Fortran

CALL CallWD(LOC('<Function name>,<Function parameters>'C))

or
CALL CallWD(LOC('<WLanguage code>'C))

Details of parameters

<Function name>: Character string
Name of the function to call. This function corresponds to:
  • a WLanguage function.
  • a function specific to the external language. For more details, see remarks.
<Function parameters>: Character string
Parameters of function called.
The different parameters are separated by a comma.
If the parameters are enclosed in double quotes or in single quotes, they must be doubled.
<WLanguage code>: Character string
WLanguage code to run.
The code will compiled dynamically and run. It can be:
  • a simple call to a function, most frequent case,
  • a complex WLanguage code built dynamically.
As the code is compiled dynamically, there is a compilation step that makes this type of calls less efficient than the calls that use preset functions in external language.
Remark: If double quotes or single quotes are found in the string, they must be doubled.
Notes

Function specific to the external language

Some actions are automatically performed by WINDEV (a window automatically becomes editable when it is opened for example). This is the reason why no WLanguage function can be used to perform these actions.
However, when using a WINDEV element from a program written in an external language, these actions must be specified.
The following functions are used to perform the actions automatically performed by WINDEV:
BeepUsed to emit a beep on the speaker of the computer.
CloseCloses the current window and restores the context that existed before the window opening.
ConfirmDisplays a dialog box that includes a logo, a message, the "Yes", "No" and "Cancel" buttons, and returns the button validated by the user.
DisplayLongTextDisplays a long text in a text control in Pascal and in C.
DisplaysDisplays a value in a control or assigns a value in a variable.
ErrorDisplays a dialog box containing an error logo and the message passed in parameter.
ExecuteRuns the code of a control or the code of a procedure in WLanguage.
GetRetrieves the value of a control.
HandleReturns the handle of a window or control.
HourglassDisplays a mouse pointer shaped like an hourglass.
HsMenu,LabelModifies the caption of a menu option.
HsMenu,MarkFinds out whether a menu option is marked or not.
HsMenu,NameAdds a menu into the window that is opened. The menu is the menu of another window.
HsMenu,SelectSelects or deselects, makes invisible, marks or unmarks an option found in the current menu.
HsMenu,StatusReturns the status of a menu option (active, invisible, grayed).
InfoDisplays a dialog box containing an information logo and the message passed as parameter
iPrintReportPrints a report created with the report editor.
LCommandReturns the command line passed as parameter to the executable program. WdString contains the command line passed in parameter to the executable program (without the name of the executable itself).
Library,DiskOpens the project library that is stored on disk.
Library,ErrorLoads the file that contains the error messages handled by WDXXXEXE.DLL in the desired language. If no Library, Error is called, the error messages are displayed in French by default.
List,AddAdds an element into a drop-down list or into an expanded list.
List,CountReturns the number of elements found in a list.
List,DeleteDeletes an element from a drop-down list or from an expanded list. The following elements are moved up by one rank.
List,GetRetrieves the value of a given element or the value of the selected element in a drop-down list or in an expanded list.
List,InsertInserts an element at the given index of a drop-down or expanded list.
List,ModifyModifies an element in a drop-down list or in an expanded list.
List,PositionSets the position on the first element of the List Box or returns the index of the first element displayed.
List,SearchFinds a value in a list. The search performed is an exact-match search.
List,Select,-Deselects an element from a drop-down list or from an expanded list.
List,Select,?Returns the element selected in the list.
List,Select,+Selects an element in a drop-down list or in an expanded list. This function is mainly used to handle multi-selection list boxes.
MessageDisplays a message in the status bar
MultitaskAllows the programs currently run to process the Windows messages or runs a temporization.
NationDefines the display language in the windows and controls for the titles, captions, messages, ...
OpenOpens a window.
Option,SpaceFills the content of WdString with space characters on the right.
Option,TestIn an information window, displays each call to the function and each status report returned by the function.
Option,VersionFinds out the version number of WINDEV wdXXXVM.DLL.
ProjectOpens and runs a WINDEV project. The first project window is displayed and the input is automatically enabled in this window.
Screen,ColumnReturns the index of the current column in a Table based on a data file or in a Table populated programmatically.
Screen,CoordinateRetrieves the coordinates of the control in relation to the top left border of the window as well as the physical size of a control.
Screen,CurrentRetrieves the name of the control being edited and its index, if necessary.
Screen,FileToScreenInitializes the window controls with the values of the file items linked to the controls.
Screen,FirstDisplays a long text in a text control in Pascal and in C.
Screen,GetRetrieves the value in a control or in a variable. The space characters found at the end of WdString are deleted by default.
Screen,InputStarts the input in the controls of a window.
Screen,NextReturns the name of the next editable control.
Screen,RazResets to zero (for a numeric control) or clears (for the other types of controls) the content of the controls found in the current window. The list boxes and the combo boxes cannot be reset to zero.
Screen,ScreenToFileInitializes the file items with the value of the window controls linked to these items.
Screen,SelectionModifies the status of a control (invisible, active, inactive, grayed).
Screen,XVarDefines whether a control is included (or not) in the current window.
SoundInitInitializes the sound interpreter. This function must be run once in each program. It is used to calibrate the execution speed of the sounds. This function may take a few minutes.
SpaceFills the content of WdString with space characters on the right.
StyleLoads a style sheet.
Table,AddAdds an element to a Table control.
Table,ColReturns the current index of the column.
Table,CountReturns the number of elements in a Table control.
Table,DeleteDeletes an element from a Table control.
Table,DisplayRefreshes the Table control. The calculated controls are recalculated. The position in the Table control is set according to the current position in the data file.
Table,GetRetrieves the value of a given element or the value of the selected element in a Table control.
Table,InsertInserts an element at the given index of a Table control.
Table,ModifyModifies an element in a Table control.
Table,Position
Sets the position on a given element or returns the element in the first row of a Table control.
Table,SaveUpdates or adds a record in the data file linked to the Table control.
Table,SearchSearches for a value in a Table control populated programmatically. It is an exact-match search.
Table,Select,?Returns the index of the selected element in a Table control.
Table,Select,+Selects an element in a Table control.
TestDisplays each function call and each status report returned by the function.
UseOpens the specified window by closing all the windows opened beforehand.
WavPlayPlays the requested sound. The sound interpreter must be initialized by SoundInit.
WDEndEnds a program that is using WINDEV.
WindowReturns the number of windows opened at a given time.
Windows,TCurrentModifies the title of the current window.
Windows,TitleModifies the title of the next window (or dialog box) displayed.
Windows,TNextModifies the title of the next window (or dialog box) displayed.
Yes,NoDisplays a dialog box that includes a logo, a message and the "Yes" and "No" buttons. The user must validate one of the buttons ("Yes" or "No") to close the window
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help