Skip to main content

How to get the handle of the active window

  • January 16, 2023
  • 2 replies
  • 0 views

Andreas Weinand
Forum|alt.badge.img+2

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 ?

2 replies

Claudio Contardi
Forum|alt.badge.img+2

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 ?

aw_muench please have a look at the documentation for the INQUIRE statement.

Format 1 - bullet 8: 

The SYSTEM HANDLE phrase retrieves the host graphical system's handle that corresponds to the control and stores this value in system-handle....


Andreas Weinand
Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • January 16, 2023

aw_muench please have a look at the documentation for the INQUIRE statement.

Format 1 - bullet 8: 

The SYSTEM HANDLE phrase retrieves the host graphical system's handle that corresponds to the control and stores this value in system-handle....

That's the second step. But in order to "retrieve the host graphical system's handle that corresponds to the control" we need the cobol handle of that control. My problem is that the control (my window) was created in another program.

So my approach was somehow to get the cobol handle of the active window.

Or am I wrong ?