RE: Win32lib.ew v0.57.1

new topic     » goto parent     » topic index » view thread      » older message » newer message

This is a multi-part message in MIME format.

------=_NextPart_000_0001_01C1DAEC.16F3D4A0
	charset="iso-8859-1"

>-----Original Message-----
>From: tone.skoda at siol.net [mailto:tone.skoda at siol.net]
>Sent: Saturday, 30 March 2002 10:24
>To: EUforum
>Subject: Re: Win32lib.ew v0.57.1
>Looks good, here are my comments from running samples using
>Windows 2000:
>
>1. Don't complicate things with compressed win32lib.ew and
>win32lib_full.ew. Come on, does it really work any faster?

The main purpose of the smaller version is to make it easier for people to
include the library in their own release packages. It is only secondary that
it might be faster for some people.

>2. In clock.exw when I put mouse over that clock tooltip it
>shows hourglas mouse cursor. It turns into normal cursor
>only when I click onto that tooltip. And if you click
>somewhere else that clock tooltip disappears but program
>is still running and you can't close it except in Task
>manager.

Attached is an updated version.

3.projectiles.exw: I pressed Fire!! and nothing happened.
>Default settings should be set up so that you see
>something happen without changing settings.

Sorry, this was not meant to be in the package.

>4. In a lot of samples controls are too small, like with edit
>boxes and then cursor is too big for it and it doesn't look
>good. Same is with a lot of buttons which have some text which
>is too long or too high for its button. Maybe this depends
>on what screen resolution you have.

You're right about the resolution aspect. In general the samples are
designed with 800x600 using small fonts. To have the samples detect what
resolution you are using and adjusting their dimensions accordingly would
add too much complexity for 'sample' code. I leave this as an exercise for
the reader. blink

>5. Files Rclick.exw and RtClick.exw are same. I checked them
>with ExamDiff (great little proggie, thanks Martin for
>link) and they are same.

Thank you. I'll get rid of one.

>6. special.exw: I can't do anything with it. It would be logical
>that text would be white cause text box background is black,
>but it doesn't show anything when I type into that text box.

This is also another experiment that should not have been in the package.

>7. Tooltip2.EXW fails: error code 461, Failed to acquire a
>hWnd when creating a control, ran it more times allways same.

Works fine on my systems. It doesn't do much and I really should get rid of
it.

>8. These samples: STYLES.EXW, STYLES6.EXW and Wstyles.EXW seem
>to show the same thing, why 3 of them when there could only be one?

I will get rid of 2 of them.

>9. sample.exw is really unsafe! First time it crashed after running
>a while with writing ex.err. The second time it really messed up
>my desktop, everything was white, and I thought I will have to
>reboot and lose this message which was open. It happened when
>radio button was selected which causes buttons to change color. I
>couldn't even bring up task manager to kill it. Then after about
>two minutes it went back to normal, don't know why.

It works fine on my systems. Tested on Win98, WinMe, Win2000.

----- Original Message -----
From: Derek Parnell
To: EUforum
Sent: Friday, March 29, 2002 6:25 PM
Subject: Win32lib.ew v0.57.1


package is available at :

  http://www.users.bigpond.com/ddparnell/euphoria/euphoria.htm

This is 693K and contains the library files, documentation, examples, and
commented source code. The list of changes for this release are attached.
If there are no serious bugs surfacing, it'll be available on the RDS
contributions page shortly.

-------------
Derek






------=_NextPart_000_0001_01C1DAEC.16F3D4A0
Content-Type: application/octet-stream;
	name="clock.exw"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="clock.exw"

-- Simple Clock by Dan B Moyer
-- gets actual time (in 24 hour format)
-- Modifyied by Martin Stachon

include win32lib_full.ew
without warning

sequence size  size =3D {90, 25}
sequence screensize screensize =3D getClientRect(Screen)

constant=20
    ClockWin =3D createEx( Window, "Clock Demo", 0, {0.5,-size[1]},
                                           {0.5,-size[2]},
                                size[1], size[2], {WS_BORDER ,
                                WS_POPUP}, WS_EX_TOPMOST ),
    myPopup  =3D create( Popup, "", ClockWin, 0, 0, 0, 0, 0),
	closeMenuItem =3D create( MenuItem, "&Close",    myPopup, 0, 0, 0, 0, =
0),
	sep1          =3D create( MenuItem, "-",         myPopup, 0, 0, 0, 0, =
0),
	aboutMenuItem =3D create( MenuItem, "&About...", myPopup, 0, 0, 0, 0, =
0)

constant MyTimer    =3D 1
-------------------------------------------------------------------------=
---

procedure onTimer_ClockWin( integer timerId )
	sequence TimeAndDate

	repaintWindow(ClockWin)
   -- get the time every second
	TimeAndDate =3D date()

 	-- display the new clock time:

	wPuts({ClockWin, 3, 0},
                {"%02d:%02d:%02d",
                    {TimeAndDate[4],TimeAndDate[5],TimeAndDate[6]}
                }
         )

end procedure

-------------------------------------------------------------------------=
---

procedure onClick_closeMenuItem()
	closeWindow(ClockWin)
end procedure

procedure onClick_aboutMenuItem()
	if message_box("Clock Example\n\n" &
	"Martin Stachon\n" &
	"Based on example from Dan B Moyer\n\n" &
        "Use Right Mouse button to get menu.\n" &
        "Drag with Left Mouse button to move it"
        , "About...", 0)
	then end if
end procedure

integer moving,relx,rely
moving =3D 0

procedure onMouse_ClockWin(integer event, integer x, integer y, integer =
shift )
	sequence mouse

	mouse =3D getPointerPos()
	if event =3D LeftDown then=20
                captureMouse(ClockWin)
		moving =3D 1
		relx   =3D x -- store relative mouse pos.
		rely   =3D y
		setMousePointer( ClockWin, SizePointer ) -- change mouse ptr
       =20
	elsif event =3D LeftUp then
        moving =3D 0
		setMousePointer( ClockWin, ArrowPointer )
       =20
	elsif event =3D MouseMove and moving then
		-- change the size and repaint
		setRect( ClockWin, mouse[1]-relx, mouse[2]-rely, size[1], size[2], =
True )
       =20
	elsif event =3D RightDown then
		popup( myPopup, 20,10) -- show popup
		moving =3D 0
	else
		moving =3D 0
	end if
        if moving =3D 0 then
                releaseMouse()
        end if
end procedure

-------------------------------------------------------------------------=
---

procedure onActivate_ClockWin()

    -- activate the timer to tick each second (1000 ms)
    setTimer( ClockWin, MyTimer, 1000 )
    setFont(ClockWin, "Arial", 15, Bold)
    onTimer_ClockWin(0)
    setMousePointer( ClockWin, ArrowPointer )
    onClick_aboutMenuItem()


end procedure

onActivate[ClockWin]     =3D routine_id( "onActivate_ClockWin" )
onTimer[ClockWin]        =3D routine_id( "onTimer_ClockWin" )
onClick[closeMenuItem]   =3D routine_id( "onClick_closeMenuItem" )
onClick[aboutMenuItem]   =3D routine_id( "onClick_aboutMenuItem" )
onMouse[ClockWin]        =3D routine_id( "onMouse_ClockWin" )

setWindowBackColor(ClockWin, Parchment)
WinMain( ClockWin, Normal )



------=_NextPart_000_0001_01C1DAEC.16F3D4A0--

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu