Download FDK Programmer`s Reference

Transcript
2
FDK Function Reference
F_ApiModalDialog()
..............................................................................
IMPORTANT: When you are through with it, you should always close a dialog resource
via F_ApiClose(). Also, in some circumstances you might want a custom dialog box
to be modal, and in others you might want it to be modeless. To do this, you should
create two separate dialog resources. Then you should always call one with
F_ApiModalDialog(), and call the other with F_ApiModelessDialog().
..............................................................................
Synopsis
#include "fapi.h"
. . .
IntT F_ApiModalDialog(IntT dlgNum,
F_ObjHandleT dlgId);
Arguments
dlgNum
A unique number to identify the dialog box. The API passes this number
to your client’s F_ApiDialogEvent() callback when there is a user
action in the dialog box. If you don’t want the API to call your client’s
F_ApiDialogEvent() callback when there is a user action, set
dlgNum to 0.
dlgId
The ID of the dialog resource to display.
After calling F_ApiModalDialog(), you must call F_ApiClose() to free memory.
Returns
FE_Success or a nonzero value if the user requested help.
Example
The following code displays a dialog named mydlg as a modal dialog box:
. . .
#define MY_DLG 1
F_ObjHandleT dlgId;
/* Open the resource and display the dialog box. */
dlgId =
Resource(FO_DialogResource, "mydlg");
F_ApiModalDialog(MY_DLG, dlgId);
. . .
F_ApiClose (dlgId, FF_CLOSE_MODIFIED);
. . .
304
FDK Programmer’s Reference