Sign in to follow this  
Followers 0
Greenhorn

EzBmpButton

14 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



Thanks for testing, Admiral, Sir. :D

Greetz

Greenhorn

Share this post


Link to post
Share on other sites

OK, I got it working now with GUIGetMsg ().

I think it's a dirty solution, but maybe I'm wrong.

LG

Greenhorn

Share this post


Link to post
Share on other sites

Little Update ...

Greets

Greenhorn

Share this post


Link to post
Share on other sites

Thanks !!

Nice

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

This is cool, thanks I'll use some of this script next time im playing around with GUI's :)

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Updated to Unicode use and some little Bugfixes ...

Regards

Greenhorn

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

That was it. Everything is fine, now.

In fact, everything with AutoIt3 ran so smooth for me throughout 2011 that "a new release" completely escaped my attention.

Sorry for the false alarm. And thanks for the quick response.

Share this post


Link to post
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
Sign in to follow this  
Followers 0