Page 1 of 1

Problem with Catchimage and API

Posted: Thu Mar 20, 2008 9:55 am
by energy
Hi!
Have a problem with catchimage(). if i use #PB_ANY
i cant use that handle for CreatePatternBrush_().
if i use a number for catchimage it works.
anybody an idea??
Thanks

Code: Select all

pImage.l 
brush.l 

pImage=CatchImage(1,?logo)            ;- Image with number 
brush.l=CreatePatternBrush_(pImage) 
Debug pImage                          ;- 
Debug brush                           ;- right Handle back! 

pImage=CatchImage(#PB_Any,?logo)      ;- Image with #PB_Any ! 
brush.l=CreatePatternBrush_(pImage) 
Debug pImage                          ;-        
Debug brush                           ;- WRONG Handle zurück! 

DataSection 
  logo:  IncludeBinary "Dawn-Blood-New.bmp" 
EndDataSection 


Posted: Thu Mar 20, 2008 10:22 am
by eesau
Try ImageID ( ImageNumber ).

Posted: Thu Mar 20, 2008 12:01 pm
by energy
Thanx!!!
That was it!! :D