Primary Dialog Control Functions

 

 

 

COS.DoModal - Retrieves and executes a modal dialog from the currently opened DLL.

 

This function is called to display and execute a MODAL dialog.  That is, a dialog that once called, disables all other parent windows belonging to the same program, only returning after the dialog has been closed by the user or a program function.  This is the most common kind of dialog that you will find used by Windows programs.  Examples of where modal dialogs might be used are; selection (font/printer), file maintenance, and setting’s dialogs.

 

On Entry:          <cosDlgId> contains the resource identifier for the dialog that is to be displayed.  The resource identifier is the ID that was assigned (or selected) when the dialog was first created in the Visual Studio.  The value of the ID can be found by opening the file resource.h in the DLL project directory and locating the symbolic name for the dialog (usually IDD_SOMETHING).  There you will find, adjacent to the symbol, a value than can be use directly or in a constant (recommended) in your program.

 

On Exit:            <cosError>      NOERROR if successful

NODIALOG if the function failed

 

 

COS.EndDialog - Terminates a modal dialog

 

This function is called from within a command message handler.  Once this function is called, the program must return to the calling functions before the dialog will actually be closed down.

 

On Entry:          <cosCtlID> contains the dialog result value.  That is, the value that will be returned in <cosDlgResult> upon returning from the COS.DoModal function.  Typical values would be IDOK or IDCANCEL: the standard returns values from the “OK” and “CANCEL” pushbuttons.

On Exit:


 

COS.AttachDialog - Attaches the Driver Library to an existing dialog

 

This function is used when returning to a program that wishes to regain control of an existing dialog.  This is necessary when overlaying another program because the Driver Library and all of its data is destroyed.  It is recommended that overlays NOT be used during the operation of a dialog.  In their place you can use the ENTER feature which preserves all Driver Library data.  This function can also be used from within a ENTER’d program to gain control of an existing dialog.  An important note: remember, you must always call COS.Init before any other functions.

 

On Entry:          <cosCWnd$> contains a handle to an existing dialog

On Exit:

 

 

COS.CreateModeless - Creates a modeless dialog

 

This function is called to display a MODELESS dialog.  Unlike a modal dialog, a modeless does not prevent the use of other application windows.  Once created, it is up to the program to insure that messages are received by making repeated calls to the Driver Library.  This is a very advanced function.  Information on the details of implementing a modeless dialog will be provided on a later date.

 

On Entry:          <cosDlgId> contains the resource identifier for the dialog that is to be displayed.  The resource identifier is the ID that was assigned (or selected) when the dialog was first created in the Visual Studio.  The value of the ID can be found by opening the file resource.h in the DLL project directory and locating the symbolic name for the dialog (usually IDD_SOMETHING).  There you will find, adjacent to the symbol, a value than can be use directly or in a constant (recommended) in your program.

 

On Exit:            <cosDlgOpen> is TRUE if successful

cosError = NOERROR

FALSE if the function failed

cosError = NODIALOG

 

 

COS.DestroyDialog -Terminates a modeless dialog

 

On Entry:

On Exit: