1. Win32Lib: ListBox's and Focus

A loss of focus appears to be causing a w32HChange event to be called for 
ListBox's. I don't think this is correct. It never happens on such a thing 
as a ComboBox.

new topic     » topic index » view message » categorize

2. Re: Win32Lib: ListBox's and Focus

----- Original Message ----- 
From: "Elliott Sales de Andrade" <quantum_analyst at hotmail.com>
To: <EUforum at topica.com>
Subject: Win32Lib: ListBox's and Focus


> 
> 
>   A loss of focus appears to be causing a w32HChange event to be called for 
> ListBox's. I don't think this is correct. It never happens on such a thing 
> as a ComboBox.

Yep! This is a mistake I've made. The fix is not a one-liner though.

Change the definition of 'kMsgCommandCode' to ...

 constant kMsgCommandCode = {
    {BUTTON,BN_CLICKED},     -- Button click
    {STATIC,STN_CLICKED},    -- Label(static) click
    {COMBO,CBN_EDITCHANGE}, -- combo notify change
    {LISTBOX,LBN_SELCHANGE},  -- combo/list box notify change
    {EDIT,EN_CHANGE},      -- editbox notify change
    {COMBO,CBN_DROPDOWN},   -- The combobox is about to dropdown.
    {COMBO,CBN_CLOSEUP}     -- The combobox dropdown has just been closed
    }

and then in the 'wmCommand' routine, change the line ...

    w32event = find(event, kMsgCommandCode)

to

    w32event = find({window_family[id],event}, kMsgCommandCode)

-- 
Derek

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

3. Re: Win32Lib: ListBox's and Focus

Thanks, that seems to work, without breaking anything too. Also, there's 
an extra '0' in the name in the docs for drawRoundRect. It says 
drawRoundRect0angle in the title, drawRoundRectangle in the example, and the 
procedure is only drawRoundRect.

>From: Derek Parnell <ddparnell at bigpond.com>
>To: Euphoria EMail List <EUforum at topica.com>
>Subject: Re: Win32Lib: ListBox's and Focus
>
>
>----- Original Message -----
>From: "Elliott Sales de Andrade" <quantum_analyst at hotmail.com>
>To: <EUforum at topica.com>
>Sent: Sunday, November 23, 2003 8:04 AM
>Subject: Win32Lib: ListBox's and Focus
>
>
> >   A loss of focus appears to be causing a w32HChange event to be called 
>for
> > ListBox's. I don't think this is correct. It never happens on such a 
>thing
> > as a ComboBox.
>
>Yep! This is a mistake I've made. The fix is not a one-liner though.
>
>Change the definition of 'kMsgCommandCode' to ...
>
>  constant kMsgCommandCode = {
>     {BUTTON,BN_CLICKED},     -- Button click
>     {STATIC,STN_CLICKED},    -- Label(static) click
>     {COMBO,CBN_EDITCHANGE}, -- combo notify change
>     {LISTBOX,LBN_SELCHANGE},  -- combo/list box notify change
>     {EDIT,EN_CHANGE},      -- editbox notify change
>     {COMBO,CBN_DROPDOWN},   -- The combobox is about to dropdown.
>     {COMBO,CBN_CLOSEUP}     -- The combobox dropdown has just been closed
>     }
>
>and then in the 'wmCommand' routine, change the line ...
>
>     w32event = find(event, kMsgCommandCode)
>
>to
>
>     w32event = find({window_family[id],event}, kMsgCommandCode)
>
>--
>Derek
>
>
>
>TOPICA - Start your own email discussion group. FREE!
>
>

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

Search



Quick Links

User menu

Not signed in.

Misc Menu