IupOpen
| Definition: |
include pGUI.e
IupOpen(nullable_string dll_root=NULL) |
| Description: | Initialise IUP |
| pwa/p2js: | Supported. (But any parameter is simply ignored.) |
| Comments: |
This procedure must be called before creating any controls, etc.
The optional dll_root, if provided, should be something like `C:\Program Files (x86)\Phix\demo\pGUI`, such that the appropriate win32/win64/lnx32/lnx64 subdirectory can be located. If you bundle a copy of pGUI.e and the appropriate dll/so subdirectory(ies) with your distribution, there should be no need to supply anything for dll_root. See also the technicalia. It may also be necessary to call IupControlsOpen() as well. However in all cases that I know of, pGUI takes care of that automatically, not that accidentally invoking it twice w/should cause any problems. See also IupClose, which should be called at the end of the program. |
| Ancilliary function: | (Windows only) sequence res = IupCheckVCRuntime(bool bCrash=true) has been factored out of IupOpen() for use in 'pw pdemo -settings' as run during installation: whereas IupOpen() displays a reasonable message and crashes, demo\pGUI\pdemo\installation.e attempts to download and initiate the needed Microsoft Visual C++ Redistributable Packages. It returns {} should nothing need to be downloaded and installed, and will crash if called on Linux or under p2js. |
| Example: |
include pGUI.e
IupOpen()
Ihandle main_dialog = IupDialog(IupLabel("Hello","PADDING=80x10"),"TITLE=test")
IupShow(main_dialog)
if platform()!=JS then
IupMainLoop()
IupClose()
end if
|
| See Also: |
IupClose,
IupMainLoop |