Skip to main content

[Migrated content. Thread originally posted on 12 May 2006]

I wish to populate a number of combo boxed that are common to many programs.

Ideally I would likem to be able to pass the control's handle to a common sub-program so that the subprogram can populate the combo box and retrun to the calling program which will then update the display.

Although I can describe the combo box handle, I cannot see how to actually get the handle placed into it so I can do what I suggest. Window handles can be passed - is there a reason I cannot get hold of and/or pass a control's handle?

Any help or suggestions would be appreciated.

Keith

[Migrated content. Thread originally posted on 12 May 2006]

I wish to populate a number of combo boxed that are common to many programs.

Ideally I would likem to be able to pass the control's handle to a common sub-program so that the subprogram can populate the combo box and retrun to the calling program which will then update the display.

Although I can describe the combo box handle, I cannot see how to actually get the handle placed into it so I can do what I suggest. Window handles can be passed - is there a reason I cannot get hold of and/or pass a control's handle?

Any help or suggestions would be appreciated.

Keith
There are two ways to get a control handle.

The first is to DISPLAY the control with the phrase HANDLE IN MY-HANDLE

The second is to use a named SCREEN SECTION control and after displaying the screen, use the statement:
SET MY-HANDLE TO HANDLE OF SCREEN-ITEM

It really depends on how you display the control in the first place.

[Migrated content. Thread originally posted on 12 May 2006]

I wish to populate a number of combo boxed that are common to many programs.

Ideally I would likem to be able to pass the control's handle to a common sub-program so that the subprogram can populate the combo box and retrun to the calling program which will then update the display.

Although I can describe the combo box handle, I cannot see how to actually get the handle placed into it so I can do what I suggest. Window handles can be passed - is there a reason I cannot get hold of and/or pass a control's handle?

Any help or suggestions would be appreciated.

Keith
Duncan

Thanks for this - I am using the controls in a screen section and the 'set' trick was the one I needed.

Keith