Page 1 of 1

ability to use actual image HANDLE in native PB img commands

Posted: Fri Jun 10, 2005 3:22 am
by localmotion34
in the docs it details examples of resizeimage(), copyimage(), imagewidth() and so on using the PB NUMBER. (imagewidth takes no input actually, and just returns the image that is active, and doesnt work when you are working with API or itemdata images. now i have written subclassed listbixes and other gadgets where the itemdata is the OS HANDLE (hbitmap) of the image. what would be great is the ability to do the following:

resizeimage(hbitmap,width,height)

if i try this, it crashes:

hbitmap=sendmessage_(gadgetid(listbox),#lb_getitemdata,item,0)
resizeimage(hbitmap,width,height)

what if where you could still use the PB NUMBER like:
resizeimage(useimage(22),width,height)

where the OS HANDLE of the image is the actual input to the command like creategadgetlist(windowid(2)). the creategadgetlist command requires the OS handle as input which is obtained with windowid().

or if the imageID() or imagewidth() commands could accept actual image numbers like:

imagewidth(imageid(#image2)) or imagewidth(#image2) (i'd prefer using the OS handle though)

or if compatibility is an issue, maybe a command that can dynamically assign a PB NUMBER to an itemdata hbitmap or hbitmap like:
PB_Image_Number=assignPBimagenumber(hbitmap)

so we can do:

hbitmap=sendmessage_(gadgetid(listbox),#lb_getitemdata,item,0)
resizeimage(assignPBimagenumber(hbitmap),width,height)

all i am saying is that there seems to be a gap between native PB image commands and that of images only with hbitmap OS handles.

i dont ask for much at all, but is there a possibility that we will be able to use hbitmap OS image handles as part of the native PB command set?

Posted: Tue Jun 21, 2005 5:26 pm
by localmotion34
wow--no one wants to see this either?