Page 1 of 1

DC_GetBitmap()

Posted: Sat Aug 21, 2021 9:33 am
by slobodan1949
Uvaženi Roger,
imam mali problem, a nije mi jasno o čemu se radi.
Molim te pomogoni.
Problem:

file test.arc content:
// start
#include test.ch
BITMAP
B__nophoto = "NOPHOTO.BMP"
//end

file test.ch content:
// start
#define B__nophoto 9990
// end


Aplication:

Xbase++
-------

oBMP := XbpBitmap():new():create()
oBMP:Load(,B__nophoto)

result:
oBMP is XbpBitmap
Valtype(oBMP) is "O" (object) OK !

eXpress++
---------

oBMP := dc_getbitmap(B__nophoto,XBPSTATIC_TYPE_BITMAP ,"BMP")

result:
oBMP is 9990
Valtype(oBMP) is "N" (numeric) ???

I need a: "O" object XbpBitmap, WHERE AM I WRONG ?
==================================================


Xbase++ 2.00.817
eXpress++ 2.0.265

Re: DC_GetBitmap()

Posted: Sat Aug 21, 2021 12:16 pm
by rdonnay
If you pass a resource number (9990) as the first parameter, it will return that as the result.

If you pass a character string as the first parameter, it will return an XbpBitmap object.

DC_GetBitmap() was designed this way to work with eXpress++ commands.

Re: DC_GetBitmap()

Posted: Sun Aug 22, 2021 1:35 pm
by slobodan1949
Thanks