Jump to content

EzBmpButton


Greenhorn
 Share

Recommended Posts

Moin Sirs,

here is an example of creating a custom control.

In this case it is just a simple button with bitmaps.

The script is not already finished, but it works.

So, don't put any blame on me, please. :D

EDIT:

I forgot to say:

It only responses to WM_COMMAND and WM_NOTIFY !

So you have to register one or both of these messages.

It will NOT respond to GUIGetMsg () !

However, love it or hate it ... :D

post-20093-12477894750745_thumb.png

EDIT 2:

Little update ...

EDIT 3:

Now it works also fine in a GUIGetMsg () loop ... :o

EDIT 4:

Rewrote implementation of Keyboard input

TODO:

Easy font support ...

Mnemonic-Prefix character support ...

Alternative drawing, without xp theme ...

Greetz

Greenhorn

EzBmpButton.zip

Edited by Greenhorn
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...

Hi!

It's still cool but you have some misses in the examples,

  • The compiled one can't handle when you click and holdd on a button and then move your mouse away from it
  • The script one uses $ID_BUTTON_3 for 2 buttons (that looks like you did on purpose?)
  • The script one, when compiles, have no graphics
  • The script one, when compiling, tries to use Reshacker which doesn't exist (AutoIt3#Wrapper doesn't use it anymore in later versions)
Link to comment
Share on other sites

Hi!

It's still cool but you have some misses in the examples,

  • The compiled one can't handle when you click and holdd on a button and then move your mouse away from it
  • The script one uses $ID_BUTTON_3 for 2 buttons (that looks like you did on purpose?)
  • The script one, when compiles, have no graphics
  • The script one, when compiling, tries to use Reshacker which doesn't exist (AutoIt3#Wrapper doesn't use it anymore in later versions)
Thanks and yes, you're right, I slept while I edited the example script ... :)

And also yes, I use ResHacker in this script, if somebody includes resources in another way, please adjust the script.

I fixed the example script, so test it again, please ...

Once more, thanks to all for your replies. :)

Greets

Greenhorn

Edited by Greenhorn
Link to comment
Share on other sites

  • 2 years later...

Updated to Unicode use and some little Bugfixes ...

I'm getting errors with your latest file ... with $WM_MOUSELEAVE, $WM_MOUSEHOVER and a couple of other constants. Yet I see that their declarations are commented out. Simply enabling them does't clear things up. What's the correct action to take?

Thanks.

Link to comment
Share on other sites

I'm getting errors with your latest file ... with $WM_MOUSELEAVE, $WM_MOUSEHOVER and a couple of other constants. Yet I see that their declarations are commented out. Simply enabling them does't clear things up. What's the correct action to take?

Thanks.

Hi,

please post the output. Without this info I just can guess ...

Which version of AutoIt do you use?

Regards

Greenhorn

Link to comment
Share on other sites

Which version of AutoIt do you use?

Well, I thought I was current ... but my copy of WindowsConstants.au3 is dated 3/7/10 ... and it doesn't have those contants I listed as problems.

I'll download the latest and try again.

Thanks for your help.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...