3.10 DM_Control

This function can be used to change general settings in the ISA Dialog Manager or to trigger actions.

DM_boolean DML_default DM_EXPORT DM_Control
(
  DM_ID      objectID,
  DM_UInt    action,
  DM_Options options
)

Parameters

-> DM_ID objectID

Object for which the specified action shall be performed.

-> DM_UInt action

Action to be performed by the IDM. For this purpose, several constants are defined in the include file IDMuser.h. These constants are explained in the table below.

-> DM_Options options

Contains an argument for the action, if required (see table below).

Return value

DM_TRUE

The action has beeen executed successfully.

DM_FALSE

The action could not be executed.

The following table shows the valid assignments of the individual parameters and explains their meaning. When nothing else is stated with the action, the objectID has to be 0.

action

options

Meaning

DMF_UpdateScreen

0

All internal SetVal calls shall be displayed on the screen. In this case, the first parameter has to be assigned with the dialog.

DMF_UIAutomationMode

 

With this action the specific UI Automation support of the IDM for its specific objects can be disabled. However, the UI Automation support provided by Microsoft for the standard controls remains active.

UI Automation support is active by default.

The switching must happen before calling DM_Initialize() and after bootstrapping.

0

Disables the UI Automation support of the IDM.

1

Enables the UI Automation support of the IDM.

DMF_PCREBinding

0

Disables the linking to the PCRE library, thus Regular Expressions are no longer possible.

1

Linking to statically present PCRE functions in the executable (linking type E).

2

Only dynamic linking of PCRE libraries relative to the application (linking type A).

3

Linking to PCRE libraries relative to the application or from the system ( linking sequence A – S).

4

Linking with priority for functions in the executable (linking sequence E – A – S), this is the standard for self-built IDM applications.

5

Linking analog to 4 but in reverse order, i.e. precedence for the PCRE library installed in the system (linking sequence S – A – E).

See also

Chapter “PCRE Library for Support of Regular Expressions” at the built-in function regex()

DMF_SignalMode

0

The signals are intercepted by the function signal.

1

The signals are intercepted by the function sigaction.

DMF_SetSearchPath

0

This action sets the search path for IDM files (dialog, module, interface, and binary files). The semicolon-separated directories have to be passed as string pointers in the data parameter.

See also

Command line option -IDMsearchpath

DMF_SetUsepathModifier

0

This action controls the converter that turns Use Paths into file paths. The control happens through a string as data parameter.

Value range

  • ""empty string
  • "L"conversion to lower case
  • "F"conversion of the first letter in each path segment to lower case
  • "U"conversion to upper case
  • "u"conversion to upper case except for the file extension

DMF_SetCodePage

 

With this action the code page for the transfer of strings between application and IDM can be set.

Usually, IDM expects and returns strings that are encoded according to the ISO 8859-1 standard. With this action a different character encoding can be defined.

As of IDM version A.06.01.d, it is possible to specify an Application object in the objectID parameter. This changes the application-specific code page that is required for processing strings. The change of an application-specific code page within one of the functions of the corresponding application has an immediate effect.

However, the call on a DDM server side does not support changing the application code page, but only affects the network application anyway.

DMF_SetFormatCodePage

 

Defines the code page in which format functions interpret and return strings.

The options below apply to DMF_SetCodePage and DMF_SetFormatCodePage

 

CP_ascii

ASCII character encoding.

 

CP_iso8859

Western European Latin-1 encoding according to ISO 8859-1.

 

CP_cp437

English character encoding according IBM code page 437 (MS-DOS).

 

CP_cp850

Western European character encoding according to IBM code page 850 (MS-DOS).

 

CP_iso6937

Western European character encoding with variable length according to ISO 6937.

 

CP_winansi

Microsoft Windows character encoding.

 

CP_dec169

Character encoding according to DEC code page 169.

 

CP_roman8

8-bit character encoding according to HP code page Roman-8.

 

CP_utf8

8-bit Unicode encoding with variable length, corresponds to ASCII encoding in the range 0 – 127.

 

CP_utf16

CP_utf16b

CP_utf16l

16-bit Unicode encoding with character widths from 2 up to 4 bytes.

There are two variants:

  • BE – big-endian, bytes with higher numerical significance first.
  • LE – little-endian, bytes with lower numerical significance first.

UTF-16 without a specified byte order corresponds to the LE variant on Microsoft Windows and to the BE variant on Unix systems.

 

CP_cp1252

Western European character encoding according to Microsoft Windows code page 1252.

 

CP_acp

Currently used ANSI code page of an application on Microsoft Windows.

Can only be used on Microsoft Windows.

 

CP_hp15

Western European 16-bit character encoding used by HP systems.

 

CP_jap15

Japanese 16-bit character encoding used by HP systems.

 

CP_roc15

Simplified Chinese 16-bit character encoding used by HP systems.

 

CP_prc15

Traditional Chinese 16-bit character encoding used by HP systems.

 

CP_ucp

Custom code page ("User Code Page"). Convert to any code page with iconv().

Remarks

Example

Setting the application code page to Roman 8.

DM_TraceMessage ("This application will use roman-8 codepage",  0);
DM_Control (0, DMF_SetCodePage, CP_roman8);

See also

Function DM_ControlEx