1. Demo HOV.EXW question

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

new topic     » topic index » view message » categorize

2. Re: Demo HOV.EXW question

Selgor said...

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.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Demo HOV.EXW question

Hello Derek,

Thank you for the new HOV.

Works perfectly.

cheers

Selgor

new topic     » goto parent     » topic index » view message » categorize

4. Re: Demo HOV.EXW question

Hi

That's an interesting mouse pointer you've got there.

Chris

new topic     » goto parent     » topic index » view message » categorize

5. Re: Demo HOV.EXW question Pointer

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

new topic     » goto parent     » topic index » view message » categorize

6. Re: Demo HOV.EXW question Pointer

My apologies if I'm wrong, but I've always thought that pointer was an "editorial" comment by Derek, back a while ago?

Dan

new topic     » goto parent     » topic index » view message » categorize

7. Re: Demo HOV.EXW question Pointer

DanM said...

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.

new topic     » goto parent     » topic index » view message » categorize

8. Re: Demo HOV.EXW question Pointer

DerekParnell said...
DanM said...

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu