Problem with Catchimage and API

Just starting out? Need help? Post your questions and find answers here.
energy
User
User
Posts: 19
Joined: Sat Aug 04, 2007 1:05 pm
Location: Germany

Problem with Catchimage and API

Post 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 

eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Post by eesau »

Try ImageID ( ImageNumber ).
energy
User
User
Posts: 19
Joined: Sat Aug 04, 2007 1:05 pm
Location: Germany

Post by energy »

Thanx!!!
That was it!! :D
Post Reply