1. Demo HOV.EXW question
- Posted by Selgor Apr 12, 2010
- 1471 views
Hello,
I run HOV.exw in Demo Win32 Lib.
And place mouse over icon.
New colour , same icon, shows.
Click on new colour icon.
Result :- Euphoria Web Site then Euphoria Web Site and again etc ???
Any one know coding flaw .. "bug" ...
if there is one ?
taa
selgor
2. Re: Demo HOV.EXW question
- Posted by DerekParnell (admin) Apr 12, 2010
- 1462 views
Any one know coding flaw .. "bug" ...
if there is one ?
You have found a bug in the library. It appears that the 'click' event is not working correctly with the bitmap controls. Sometimes you get a two clicks - one for the button-down action and another with the button-up action.
Here is an edited version of the demo program that works around that bug ...
without warning include win32lib.ew constant Pointer = createMousePointer( 5, 1, { " xxx ", " x...x ", " x...x ", " x...x ", " x...x ", " x...x ", " .xxx...xxx ", " x..x...x..xxx ", " xxx..x...x..x..x", "x..x..x...x..x..x", "x..x..x...x..x..x", "x..x..x...x.....x", "x...............x", "x...............x", "x..............x ", " x............x ", " x...........x ", " x..........x ", " x..........x ", " x..........x ", " xxxxxxxxxxxx ", " xxxxxxxxxxxx "} ) integer vCurrentState integer mt sequence bm, bsize vCurrentState = 0 constant MainWin = create(Window, "Demo ", 0, 0, 0, 125, 150, 0), img = create(Bitmap, "",MainWin, 50, 50, 25, 25, SS_NOTIFY) setMousePointer( img, Pointer ) setHint(img, "Go to Rapid Development's web site") VOID = setSearchPaths("..\\demoresources\\") bm = {loadBitmapFromFile("1.bmp"), loadBitmapFromFile("1a.bmp")} bsize = {getSize(bm[1]), getSize(bm[2])} --------------------------------------------------- procedure w_Activate(integer self, integer event, sequence params) --------------------------------------------------- vCurrentState = 1 setBitmap(img, bm[vCurrentState]) end procedure --------------------------------------------------- procedure w_Mouse(integer self, integer event, sequence params) --------------------------------------------------- integer lDesiredState if self = img then lDesiredState = 2 if params[1] = WM_LBUTTONDOWN then shellExecute( "open", "http://www.rapideuphoria.com", Default ) end if else lDesiredState = 1 end if if vCurrentState != lDesiredState then vCurrentState = lDesiredState setBitmap(img, bm[vCurrentState]) end if end procedure setHandler(MainWin, w32HActivate, routine_id("w_Activate")) setHandler({MainWin, img}, w32HMouse, routine_id("w_Mouse")) WinMain(MainWin, Normal)
Let me know if this work around has still got problems.
3. Re: Demo HOV.EXW question
- Posted by Selgor Apr 12, 2010
- 1448 views
Hello Derek,
Thank you for the new HOV.
Works perfectly.
cheers
Selgor
4. Re: Demo HOV.EXW question
- Posted by ChrisB (moderator) Apr 15, 2010
- 1389 views
Hi
That's an interesting mouse pointer you've got there.
Chris
5. Re: Demo HOV.EXW question Pointer
- Posted by Selgor Apr 16, 2010
- 1369 views
Hi ChrisB,
Not my doing Came with the Demo Suite ???
But, yes .... someone's artistly brazen mind.
Who said programming wasn't fun .
Thanks ChrisB.
cheers,
Selgor
6. Re: Demo HOV.EXW question Pointer
- Posted by DanM Apr 18, 2010
- 1228 views
My apologies if I'm wrong, but I've always thought that pointer was an "editorial" comment by Derek, back a while ago?
Dan
7. Re: Demo HOV.EXW question Pointer
- Posted by DerekParnell (admin) Apr 18, 2010
- 1269 views
My apologies if I'm wrong, but I've always thought that pointer was an "editorial" comment by Derek, back a while ago?
Dan
Sorry, but this demo was originally written by David Cuny.
8. Re: Demo HOV.EXW question Pointer
- Posted by DanM Apr 19, 2010
- 1262 views
My apologies if I'm wrong, but I've always thought that pointer was an "editorial" comment by Derek, back a while ago?
Dan
Sorry, but this demo was originally written by David Cuny.
OOPS! Sorry 'bout that, Derek!
Dan