New to PureBasic, playing around with CatchImage(). I'm wondering how to get the memory address for the label in the include data section if the label changes?
I have several images in the data section with include section using IncludeBinary, each image is 1Kb in size. But the problem is that when a condition changes the image displayed in ImageGadget will need to change also and I do not know ahead of time which label to select. For example:
Code: Select all
<prior condition selection for label here>
CatchImage(1, ?<image label selected by prior condition>) ;
ImageGadget(200, 15, 522, 40, 40, ImageID(1))
DataSection
NoteGIF: : IncludeBinary "D:\load_get.gif"
USea: : IncludeBinary "D:\usea.png"
USeb: : IncludeBinary "D:\useb.png"
USec: : IncludeBinary "D:\usec.png"
USed: : IncludeBinary "D:\used.png"
USee: : IncludeBinary "D:\usee.png"
USef: : IncludeBinary "D:\usef.png"
USeg: : IncludeBinary "D:\useg.png"
USeh: : IncludeBinary "D:\useh.png"
EndDataSection
The prior condition generates the name of the label needed but its a string. So how do I put that into CatchImage(1, ?<image label selected by prior condition>) because its expecting a (number) memory address and not a string?
Thank You