3 Steps to make a DLG-Application:
1. "Plugging together" an Application Framework

The Application Framework technique, as implemented by DLG, offers a great many advantages over conventional programming. For the time being, DLG has only one big disadvantage: it is still new and unknown. So, how do you go about making a DLG-application?

Basically the making of a DLG-application is done in three steps:

Break the functionality of the target application down to existing DLG- components and "plug together" an application framework by combining these components.

For breaking down the target application, there are a number of methods (e.g. Jordan, SDA, etc.) Up to bow the community of computer scientists could not come to an agreement, which of them is best. So, all I can say is: "That's left to your own taste".

"Plugging together" is done just as if you would program some very simple code lines. Let's assume, in your target system there is an edit box into which the user is prompted to enter any character sequence (say, his/her name). From this input a ListBox will be searched. This ListBox is to be loaded from a file."

In DLG that's basically just three lines of code. For example:

char szName [40] = "";
CreateCtl (..., edt1, "Edit", ..., "\bIO=%p", szName, ..., 0);
CreateCtl (..., lst1, "ListBox", ..., "#list_file\ bIO=%p", szName, ..., 0);

The user's input into the edit box will be stored to the address given by the option "IO=%p" (here that is the 40- byte character array szName ). From that address the ListBox will fetch its input.

Of course, searching in the ListBox is not an end in itself. For example, the requirements of the target system could be: "If a matching item is found, processing will continue with any data associated with that item."

Consequently you will want to add a few code lines such as the following:

DWORD dwData;
CreateCtl (..., lst1, "ListBox", ..., "#list_file\bIO=%p", szName, ...,
          "IOdata=%p", &dwData, ..., 0);

Note that for option "IO=%p" not the value of the variable (here: dwData ) is required but its address (here: &dwData ).

What in detail is to be done with the associated data will usually be determined by an application-specific callback procedure. But we should not go astray here.

You see: In the code the user input is stored to a variable, from which it is fetched by the next UIF-element (in this example: the ListBox). This "next UIF- element", depending on the user interaction, stores another value(s) to some other variable(s). From them they are eventually fetched by one or more other UIF-elements, some of which are usually callback procedures programmed by the applier.

The next steps in making a DLG-application are:

2. Use DLG options to fine-tune the user-interface layout and behavior.
3. Program callback procedures to implement application-specific features.

They will be covered in the following articles.