PMCX Architecture

The PMCX is based on a very simple foundation that allows both your application and the IRE to interact with it. Through the conventions and methodology described below, you will be able to easily create PMCX controls.

The architecture of a PMCX control can be simply described as being three publicly-defined functions and a window procedure. The three publicly-defined functions must follow the naming and usage conventions of PMCX, whereas the window procedure is similar to any window procedure for a custom control.

The first of the conventions deals with the naming of the control and the functions provided within the PMCX control DLL.

For example, on OS/2, the definition of the initialization routine is:

XxxxRegister(HAB hAB);

The definition of the initialization routine, on Windows, is:

XxxxRegister(HINSTANCE hInst);

The Xxxx is the formal name of the control. It is also the name of the dynamic-link library.

Therefore, for OS/2, if the control being designed is called Ruler, the initialization routine would be:

RulerRegister(HAB hAB);

For Windows, the initialization routine would be:

RulerRegister(HINSTANCE hInst);

The dynamic-link library name would be RULER.DLL.

This convention is the cornerstone for PMCX. It allows the IRE to properly interact with the PMCX control DLL.

PMCX defines three required public functions: 

XxxxRegister  Control registration routine.
XxxxQuery  Control information query routine used by the IRE to determine capabilities of the control.
XxxxStyles  Control-styles dialog procedure. This is used by the IRE to allow the styles, text, ID symbol and value, and control-specific information to be defined and edited when it is included within a design.

A PMCX control must also provide certain resources that are used by the IRE. One of the resources is a dialog template that is used for the XxxxStyles dialog. The second of the resources, which is not absolutely required but makes the reading of resource script files easier, is a set of entries within a string table. These entries correspond to the style flags of the PMCX control. These are used by the IRE during the resource-script generation stage, thereby allowing the entry for the control to look exactly like a normal control.



Control Extensions


PMCX Construction


PMCX Definition Headers
How PMCX Works