Skip to main content

[archive] Help with background image of a #grid

  • June 20, 2007
  • 3 replies
  • 0 views

Dominique Sacre
Forum|alt.badge.img+2

[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

3 replies

Dominique Sacre
Forum|alt.badge.img+2

[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
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

Dominique Sacre
Forum|alt.badge.img+2

[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
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

Dominique Sacre
Forum|alt.badge.img+2

[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
It finally worked !!!

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

9 is VT_DISPATCH

Thanks for giving me the idea!

Thanos