Using powercobol 5.0 controls with ole..
Using powercobol 5.0 controls with ole..
(OP)
Hi all
I would like to use the static and text (and others) powercobol 5.0 controls by calling and (above all) creating them by using the ole method.
I wrote (for manage the static controls):
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 OGGETTO OBJECT REFERENCE OLE GLOBAL.
01 G-SUBFORM-OLENAME PIC X(32) VALUE "Fujitsu.PcobStaticText.4" GLOBAL.
01 testo PIC X(100) VALUE "sample text".
01 POS PIC S9(4) COMP-5 VALUE 100.
PROCEDURE DIVISION.
INVOKE OLE "CREATE-OBJECT"
USING G-SUBFORM-OLENAME RETURNING OGGETTO
INVOKE OGGETTO "SET-caption" using TESTO.
---------------------trouble at this line
INVOKE OGGETTO "SET-Width" using POS.
Last invoke issues a object error. I have seen by using the oleview.exe program that the property "Width" is not present inside the COM control. So I can guess that I need to get and instance of other object.. Has someone any feedback about this ?
Thanks in advance
Federico
I would like to use the static and text (and others) powercobol 5.0 controls by calling and (above all) creating them by using the ole method.
I wrote (for manage the static controls):
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 OGGETTO OBJECT REFERENCE OLE GLOBAL.
01 G-SUBFORM-OLENAME PIC X(32) VALUE "Fujitsu.PcobStaticText.4" GLOBAL.
01 testo PIC X(100) VALUE "sample text".
01 POS PIC S9(4) COMP-5 VALUE 100.
PROCEDURE DIVISION.
INVOKE OLE "CREATE-OBJECT"
USING G-SUBFORM-OLENAME RETURNING OGGETTO
INVOKE OGGETTO "SET-caption" using TESTO.
---------------------trouble at this line
INVOKE OGGETTO "SET-Width" using POS.
Last invoke issues a object error. I have seen by using the oleview.exe program that the property "Width" is not present inside the COM control. So I can guess that I need to get and instance of other object.. Has someone any feedback about this ?
Thanks in advance
Federico
RE: Using powercobol 5.0 controls with ole..
Not sure this helps,but the Fujitsu help states Position made up of the following elements. This property corresponds to the POS-Width
01 Positions.
02 POS-X pic s9(4) comp-5.
02 POS-Y pic s9(4) comp-5.
02 POS-WIDTH pic s9(4) comp-5.
02 POS-HEIGHT pic s9(4) comp-5.
Bruce
RE: Using powercobol 5.0 controls with ole..
It isn't inside the property's list of the oggetto item.
Federico