[Migrated content. Thread originally posted on 11 February 2005]
I am trying to load an image list for an active-x grid from Developer Express.I used the axdeftool (which is excellent) and looked at the code generated, but I'm getting an error "parameter is incorrect" when I try to access this method.
* AddBitmap
* method AddBitmap
METHOD, 17, @AddBitmap,
"long" @hBitmap, TYPE 3,
"OLE_COLOR" @mask, TYPE 19
RETURNING "short", TYPE 2
COBOL CODE
77 olImageLists handle of IdxImageLists.
77 olImageList handle of IdxImageList.
77 ole-color pic 9(9) comp-5.
77 olhbitmap pic s9(9) comp-5.
77 olImageidx pic s9(4) comp-5.
.....
INQUIRE SS-dxDBGrid @Imagelists() IN olImageLists.
MODIFY olImageLists, @Add() GIVING olImageList.
COMPUTE OLE-COLOR = 192 256 * (192 256 * 192).
Accept IMAGE-PATH from ENVIRONMENT "IMAGE-PATH".
MOVE SPACES TO SCR-S.
STRING IMAGE-PATH, "\\ACTION.BMP" DELIMITED BY " "
INTO SCR-S.
CALL "W$BITMAP" USING WBITMAP-LOAD, SCR-S
GIVING olhBITMAP.
MODIFY olImageList, @Name = "dxImageList1".
INQUIRE olImageLists @Count() IN image-ct.
MODIFY olImageList, @AddBitmap(
by name hBitmap olhBitmap
by name mask ole-color)
Returning olimageidx.
Developer Express Link