Greenhorn Posted March 27, 2009 Posted March 27, 2009 (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. 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 ... EDIT 2:Little update ...EDIT 3:Now it works also fine in a GUIGetMsg () loop ... EDIT 4:Rewrote implementation of Keyboard inputTODO:Easy font support ...Mnemonic-Prefix character support ...Alternative drawing, without xp theme ...GreetzGreenhornEzBmpButton.zip Edited January 25, 2012 by Greenhorn
AdmiralAlkex Posted March 27, 2009 Posted March 27, 2009 Very cool! .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Greenhorn Posted April 2, 2009 Author Posted April 2, 2009 Thanks for testing, Admiral, Sir. Greetz Greenhorn
Greenhorn Posted April 27, 2009 Author Posted April 27, 2009 OK, I got it working now with GUIGetMsg (). I think it's a dirty solution, but maybe I'm wrong. LG Greenhorn
AdmiralAlkex Posted July 15, 2009 Posted July 15, 2009 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 itThe script one uses $ID_BUTTON_3 for 2 buttons (that looks like you did on purpose?)The script one, when compiles, have no graphicsThe script one, when compiling, tries to use Reshacker which doesn't exist (AutoIt3#Wrapper doesn't use it anymore in later versions) .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
delme Posted July 16, 2009 Posted July 16, 2009 This is cool, thanks I'll use some of this script next time im playing around with GUI's
Greenhorn Posted July 17, 2009 Author Posted July 17, 2009 (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 itThe script one uses $ID_BUTTON_3 for 2 buttons (that looks like you did on purpose?)The script one, when compiles, have no graphicsThe 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. GreetsGreenhorn Edited July 17, 2009 by Greenhorn
Greenhorn Posted January 25, 2012 Author Posted January 25, 2012 Updated to Unicode use and some little Bugfixes ... Regards Greenhorn
qwert Posted January 25, 2012 Posted January 25, 2012 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.
Greenhorn Posted January 25, 2012 Author Posted January 25, 2012 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?RegardsGreenhorn
qwert Posted January 25, 2012 Posted January 25, 2012 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.
qwert Posted January 25, 2012 Posted January 25, 2012 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now