Highlighted
Absent Member.
Absent Member.
689 views

[archive] Help with background image of a #grid

[Migrated content. Thread originally posted on 20 June 2007]

Hi to all,

I am trying to set the background image of a #grid by doing the following:

...
WORKING-STORAGE SECTION.
77 BITMAP-HANDLE HANDLE OF iPictureDisp.
...
PROCEDURE DIVISION.
...
CALL "W$BITMAP" USING WBITMAP-LOAD-PICTURE, "MY-BITMAP.BMP" GIVING BITMAP-HANDLE
MODIFY MY-SHARP-GRID @BKGPICTURE = (BITMAP-HANDLE)

My "acuclass.def" file contains the definition of iPictureDisp interface.

At runtime I am getting a "bad variable type" error...

Thanks in advance.
Thanos
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Help with background image of a #grid

I would try:

MODIFY MY-SHARP-GRID @BKGPICTURE = BITMAP-HANDLE AS nnnn

where nnnn is some type of VARIANT type defined in activex.def. I'm not sure which one you would use, however. Perhaps that will resolve the problem?

Rob
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Help with background image of a #grid

Thank you for the response!

I tried MODIFY MY-SHARP-GRID @BKGPICTURE = BITMAP-HANDLE AS 16413 but I got the same error: "bad variable type". Any other num literal gives a "type mismatch" error.

Bellow is the part of the SGgrid.def file that describes the bkgpicture property:

* BkgPicture
* Returns or sets grid's background picture.
PROPERTY-PUTREF, 87, @BkgPicture,
"IPictureDisp* (Property_Value)", TYPE 16413


Thanos
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Help with background image of a #grid

It finally worked !!!

MODIFY MY-SHARP-GRID @BKGPICTURE = BITMAP-HANDLE AS 9

9 is VT_DISPATCH

Thanks for giving me the idea!

Thanos
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.