PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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 the 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.
  • to a function specific to the external language. See the Notes for more details.
<Function Parameters>: Character string
Parameters of the 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.
Note: 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:
DisplaysDisplays a value in a control or assigns a value in a variable.
DisplayLongTextDisplays a long text in a text control in Pascal and in C.
BeepUsed to emit a beep on the speaker of the computer.
Library,DiskOpens the project library that is stored on disk.
Library,ErrorLoads the file that contains the error messages managed by WDXXXEXE.DLL in the requested language. If no Library, Error is called, the error messages are in French by default.
ConfirmDisplays a dialog box that includes a logo, a message, the "Yes", "No" and "Cancel" buttons, and returns the button validated by the user.
Screen,ColumnReturns the subscript of the current subscripted column in a browsing table or in a memory table.
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 currently in edit and its subscript if possible.
Screen,ScreenToFileInitializes the file items with the value of the window controls linked to these items.
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,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,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,SelectionModifies the status of a control (invisible, active, inactive, grayed).
Screen,NextReturns the name of the next editable control.
Screen,XVarDefines whether a control is included (or not) in the current window.
ErrorDisplays a dialog box containing an error logo and the message passed in parameter.
SpaceFills the content of WdString with space characters on the right.
ExecuteRuns the code of a control or the code of a procedure in WLanguage.
WindowReturns the number of windows opened at a given time.
CloseCloses the current window and restores the context that existed before the window opening.
HandleReturns the handle of a window or control.
HsMenu,StatusReturns the status of a menu option (active, invisible, grayed).
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.
iPrintReportPrints a report created with the report editor.
InfoDisplays a dialog box containing an information logo and the message passed in parameter
LCommandReturns the command line passed in parameter to the executable program. WdString contains the command line passed in parameter to the executable program (without the name of the executable itself).
List,AddAdds an element into a drop-down list or into an expanded list.
List,SearchFinds a value in a list. The search performed is an exact-match search.
List,InsertInserts an element at a given subscript into a drop-down list or into an expanded list.
List,ModifyModifies an element in a drop-down list or in an expanded list.
List,CountReturns the number of elements found in a list.
List,PositionPositions on the first element displayed in the list box or returns the subscript of the first element displayed.
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,Select,?Returns the element selected in the list.
List,Select,-Deselects an element from a drop-down list or from an expanded list.
List,Select,+Selects an element in a drop-down list or in an expanded list. This function is mainly used to handle the multi-selection list boxes.
List,DeleteDeletes an element from a drop-down list or from an expanded list. The following elements are moved up by one rank.
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, ...
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.
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
OpenOpens a window.
ProjectOpens and runs a WINDEV project. The first project window is displayed and the input is automatically enabled in this window.
GetRetrieves the value of a control.
HourglassDisplays a mouse pointer shaped like an hourglass.
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.
WavPlayPlays the requested sound. The sound interpreter must be initialized by SoundInit.
StyleLoads a style sheet.
Table,DisplayRefreshes the display of the table. The calculated controls are recalculated. The table is repositioned according to the data file.
Table,AddAdds an element into a table.
Table,SearchFinds a value in a memory table. The search is an exact-match search.
Table,ColReturns the subscript of the column.
Table,SaveModifies or adds a record in the data file linked to the table.
Table,InsertInserts an element at a given subscript into a table.
Table,ModifyModifies an element in a table.
Table,CountReturns the number of elements found in a table.
Table,Position
Points to a given element or returns the element in the first row of a memory table.
Table,GetRetrieves the value of a given element or the value of the selected element in a table.
Table,Select,?Returns the subscript of the element selected in the table.
Table,Select,+Selects an element in a table.
Table,DeleteDeletes an element from a table.
TestDisplays each function call and each status report returned by the function.
UseOpens the specified window by closing all the windows opened beforehand.
WDEndEnds a program that is using WINDEV.
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.
Minimum required version
  • Version 9
Comments
Click [Add] to post a comment