3.69 DM_StartDialog
This function starts the actual dialog application. The DM creates all necessary resources (colors, cursor, fonts etc.) in the window system, puts all top level objects defined as visible in the dialog on the screen, and executes the start rule.
DM_Boolean DML_default DM_EXPORT DM_StartDialog
(
DM_ID dialogID,
DM_Options options
)
Parameters
-> DM_ID dialogID
Identifier of the dialog to be started. This identifier was received as the return value from DM_LoadDialog.
-> DM_Options options
Currently not used. Please specify with 0.
Return Value
TRUE |
The dialog was successfully started. |
FALSE |
The dialog could not be started, e.g. because another dialog is already running or the given parameter is no dialog. |
Example
Typical main program for DM applications:
int DML_c DM_CALLBACK AppMain __2(
(int, argc),
(char far * far *, argv))
{
DM_ID dialogID;
/*
* Initialize Dialog Manager
*/
if (!DM_Initialize (&argc, argv, 0))
{
DM_TraceMessage("could not initialize", DMF_LogFile);
return (1);
}
/*
* Load the dialog file
*/
dialogID = DM_LoadDialog ("tabdemo.dlg",0);
if (!dialogID)
{
DM_TraceMessage("could not load dialog", DMF_LogFile);
return(1);
}
/*
* Start the dialog and enter event loop
*/
if (DM_StartDialog (dialogID, 0))
DM_EventLoop (0);
else
return (1);
return (0);
}
See Also
Built-in function run() in manual “Rule Language”