How to get the handle of the active window

A sub routine needs to know if the active window is maximized and therefor needs the Cobol-Handle of the active window.

Can the sub routine get this handle with cobol tools or by calling a dll ?