The SimbaEngine X SDK includes functionality to help you implement dialogs. You can use these dialogs to retrieve user input such as connection settings or configuration information.
The Quickstart sample driver for Windows platforms includes a sample implementation of a user dialog. For information on the Quickstart sample driver, see Build a C++ ODBC Driver in 5 Days at http://www.simba.com/resources/sdk/documentation/.
This section shows you how to use the
PromptDialog method of your
CustomerDSIIConnection class to display a dialog box that prompts the user for settings for this connection. For more information on the connection process, see Handling Connections.
CustomerDSIIConnection::PromptDialog method has the following signature:
virtual bool PromptDialog(
This method has the following parameters:
The connection response map updated to reflect the user's input.
The connection settings map updated with settings that are still needed and were not supplied. The connection settings from io_connectionSettings are presented as key-value string pairs. The input connection settings map is the initial state of the dialog box. The input connection settings map will be modified to reflect the user's input to the dialog box.
Handle to the parent window to which this dialog belongs.
Indicates what type of connection settings to request either both required and optional settings or just required settings.The return value for this method indicates if the user completed the process by clicking OK on the dialog box (return true), or if the user aborts the process by clicking CANCEL on the dialog box (return false).
Dialogs are also possible on Linux/Unix/macOS platforms, although the Quickstart sample driver for those platforms does not include a sample implementation.
PromptDialog function is the same as for Windows. However, the meaning of the
in_parentWindow argument is undefined. Different applications may potentially pass in different types of window handles. Therefore,
in_parentWindow can only be used if your driver can make assumptions about running within a specific window system or API toolkit. Otherwise, the window you create will need to be parentless.