Startdrawing(Gadgetoutput()) ?

Just starting out? Need help? Post your questions and find answers here.
Hydrate
Enthusiast
Enthusiast
Posts: 436
Joined: Mon May 16, 2005 9:37 pm
Contact:

Startdrawing(Gadgetoutput()) ?

Post by Hydrate »

I've been looking around for this feature or something similar for a while, but to no avail. I know it must exist because we have "Windowoutput()",, I just cant find a way. Can anyone point me in the right direction?
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Re: Startdrawing(Gadgetoutput()) ?

Post by Arctic Fox »

User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Startdrawing(Gadgetoutput()) ?

Post by netmaestro »

It's easily managed with API, but there are considerations. With WindowOutput you have an event loop in which you can use the #PB_Event_Repaint message to update your drawing so it will be persistent and not disappear as soon as a window is opened or dragged in front of it. For a gadget this isn't available. You'd have to subclass the gadget and operate with the #WM_PAINT message, which does require some knowledge of what you're doing.
BERESHEIT
Post Reply