Re: Help Closing Euphoria Windows

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

My turn to butt in:

On Tue, 19 Nov 2002 13:53:59 -0000, Matthew Anderson
<andy at anders98.freeserve.co.uk> wrote:

>The only difference I noticed was that the window background was grey
>whereas the old library gives me white as a default. How do I change this?

I don't know why the change, but this should fix it:

 setWindowBackColor(<window>,getSysColor( COLOR ))

where COLOR is one of:
COLOR_SCROLLBAR,COLOR_BACKGROUND,COLOR_DESKTOP,
COLOR_ACTIVECAPTION,COLOR_INACTIVECAPTION,
COLOR_MENU,COLOR_WINDOW,COLOR_WINDOWFRAME,
COLOR_MENUTEXT,COLOR_WINDOWTEXT,COLOR_CAPTIONTEXT
COLOR_ACTIVEBORDER,COLOR_INACTIVEBORDER
COLOR_APPWORKSPACE,COLOR_HIGHLIGHT
COLOR_HIGHLIGHTTEXT,COLOR_BTNFACE
COLOR_BTNSHADOW,COLOR_GRAYTEXT,COLOR_BTNTEXT
COLOR_INACTIVECAPTIONTEXT, COLOR_BTNHIGHLIGHT
COLOR_3DDKSHADOW,COLOR_3DLIGHT, COLOR_INFOTEXT
COLOR_INFOBK


>Windows call back errors when I selected window closed, see attached error
>file. I have not attempted to understand this because the reason may be

Using setHandler instead of (eg) onClose[] uses/requires standard
parameters(integer id, integer event, sequence params) for each
routine specified by routine_id("<name>") passed as a parameter to
setHandler.

So, change
procedure onCloseMyWindow()
...
onClose[MyWindow]=3Droutine_id("onCloseMyWindow")

to
procedure onCloseMyWindow(integer id, integer event, sequence params)
...
setHandler(MyWindow,w32HClose,routine_id("onCloseMyWindow")

You can also replace eg:

onKeyDown[Button1]=3Droutine_id("onKeyDownInWindow")
onKeyDown[Button2]=3Droutine_id("onKeyDownInWindow")
onKeyDown[Button3]=3Droutine_id("onKeyDownInWindow")
onKeyDown[Button4]=3Droutine_id("onKeyDownInWindow")
onKeyDown[Button5]=3Droutine_id("onKeyDownInWindow")

with:

setHandler({Button1,Button2,Button3,Button4,Button5},
		     w32KeyDown,routine_id("onKeyDownInWindow"))

HTH
Pete

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

Search



Quick Links

User menu

Not signed in.

Misc Menu