DC_GetBitmap()

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
slobodan1949
Posts: 80
Joined: Mon Apr 25, 2011 8:57 am
Location: SERBIA
Contact:

DC_GetBitmap()

#1 Post 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
Attachments
NOPHOTO.zip
(4.58 KiB) Downloaded 300 times

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DC_GetBitmap()

#2 Post 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.
The eXpress train is coming - and it has more cars.

User avatar
slobodan1949
Posts: 80
Joined: Mon Apr 25, 2011 8:57 am
Location: SERBIA
Contact:

Re: DC_GetBitmap()

#3 Post by slobodan1949 »

Thanks

Post Reply