If your application uses its own message WINDOW or a third-party message procedure that is not dimmed automatically, cdWindowDim can dim the parent behind it.
Normal Clarion MESSAGE(), STOP() and HALT() calls already work with automatic message dimming, which is enabled by default. Supported CapeSoft MessageBox windows work automatically too; they do not require this extension.
Add the extension to each different custom message window procedure you want covered. Do not add it to every calling browse or form. You can leave the global automatic-message setting on (recommended) or turn it off; the custom extension works either way. If you use CapeSoft MessageBox, try the normal automatic setting first. The extension can also be used with a CapeSoft message window when you have access to that procedure.
ImportcdDimMessage into a single EXE or the Data DLL that owns them. Import ImportcdDimMessageDec into each other APP that calls them. The first utility supplies procedures; the second supplies calling declarations. Do not import both into the same APP. See Custom Colored Messages for details.Use the extension above whenever possible. If you need to insert the calls yourself, add these declarations to the Clarion MAP and link the matching product DLL/LIB:
MODULE('CDWindowDim.dll')
CDRegisterMessageWindow(LONG),SIGNED,PROC,PASCAL,RAW,NAME('CDRegisterMessageWindow')
CDUnregisterMessageWindow(LONG),SIGNED,PROC,PASCAL,RAW,NAME('CDUnregisterMessageWindow')
END
In the message WINDOW procedure, after the window opens:
IF 0{PROP:Handle} <> 0
CDRegisterMessageWindow(0{PROP:Handle})
END
When that message window closes, before the window is destroyed:
CDUnregisterMessageWindow(0{PROP:Handle})
Tip: Open the supplied demo application in Clarion and select Source to see the generated registration and unregistration calls in their proper locations.
For ordinary MESSAGE() calls use Automatic Message Dimming. See the DLL Function Reference if you need direct calls.