C++
ACFDUI_PORT int AcFdUiInvokeFieldDialog( AcDbField*& pNewField, BOOL bEdit, AcDbDatabase* pDb, CWnd* pParent = NULL );
File
AcFdUi.h
Description
Displays the field dialog as a modal dialog. This dialog can be used to create a new field or edit an existing field.
If the dialog is invoked to create a new field, when the function returns IDOK, the new field will be set in pNewField. The caller is responsible for deleting the returned field or adding it to the database.
If the dialog is invoked to edit an existing field, pass the field to edit in the pNewField argument and set the second argument to true. When the function returns IDOK, pNewField contains the edited field if the user edited the field code, format, or other data of the field. It contains a new field if the user selected a different field. It is the responsibility of the caller to find out if the field is new by comparing the pointers, and to do the necessary cleanup.
Returns IDOK if the field dialog was closed when the user clicked OK, or IDCANCEL if the field dialog was canceled.
Parameters
Parameters | Description |
---|---|
pNewField | Input/output field to edit if an existing field is to be edited in the field dialog (if bEdit is true), or reference to receive a new field object (if bEdit is false) |
bEdit | Input Boolean indicating whether to edit an existing field (true) or create a new one (false) |
pDb | Input database to use for evaluating fields |
pParent | Input parent window |