Jump to content

Recommended Posts

Posted

Howdy,

I'm working on a PNG GUI and found a few demos on the board using _GDIPlus_GraphicsDrawImageRectRect for things like rollovers. Most of the examples I've found call it similar to this:

; On rollover:
$myBtn = _GDIPlus_GraphicsDrawImageRectRect ($hGraphic, $myBtn_Over, 0, 0, 15, 15, 242, 27, 15, 15)

; On rollout:
$myBtn = _GDIPlus_GraphicsDrawImageRectRect ($hGraphic, $myBtn_Normal, 0, 0, 15, 15, 242, 27, 15, 15)

I assumed that the $myBtn variable was receiving a handle of some sort for the newly drawn graphic but it turns out that the function only returns a 1 for success. That being said, are the toggled images being created in this manner continuously stacking on top of each other rather than replacing? ...or is resetting the $myBtn variable a method for destroying the old picture when creating the new?

Thanks alot!

P.S. Does anybody have a guesstimate as to how much more CPU intensive a 10-button app using this method would be compared to the standard? Is it even worth the trouble?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...