comp.lang.ada
 help / color / mirror / Atom feed
From: David Botton <David@Botton.com>
Subject: Re: Win32ADA Edit Control Notification
Date: 1999/05/06
Date: 1999-05-06T00:00:00+00:00	[thread overview]
Message-ID: <3731F7B8.2B80B74C@Botton.com> (raw)
In-Reply-To: 7gsq1s$eml$1@nnrp1.deja.com

It still is, but it should come in as a WM_COMMAND, not WM_SYSCOMMAND.

Try something like this:

      case message is
         when WM_COMMAND =>
            declare
               wmID              : Win32.WORD :=
                 Win32.WinDef.LOWORD(Win32.DWORD(WPARAM));
               Notification_Code : Win32.WORD :=
Win32.WinDef.HIWORD(Win32.DWORD(WPARAM));
           begin

                case Notification_Code is
                    when EN_KILLFOCUS =>
                    if wmID = MY_EDIT_CONTROL_ID then
                    .
                    .
                    .
                    when EN_UPDATE =>

           end;
        .
        .
        .

I use a system where I use the extra bits in a Windows window to store a pointer to
an Ada object and since the HWND is passed in the lParam:

               Control_Window : Pointer := To_GWindow(

Win32.WinUser.GetWindowLong(To_HWND(lParam),Win32.WinUser.GWL_UserData) );


Then I can dispatch the Notification_Code directly to the Ada object that handles
the control with:

return On_Message(Control_Window, Message, wParam, lParam);

Be well,
David Botton


guru_upya@yahoo.com wrote:

> In previous versions of Windows, the notification code was in HIWORD(lParam)
> for EN_KILLFOCUS. For the EN_CHANGE and ... UPDATE it is as follows in MFC
> EN_CHANGE idEditCtrl = (int) LOWORD(wParam); // identifier of edit control
> hwndEditCtrl = (HWND) lParam;  // handle of edit control
>
> Hope this helps,
>
> In article <%fGV2.672$4S.363025@WReNphoon3>,
>   sbarber@snet.net (Shawn Barber) wrote:
> > I tried to use an edit control for the first time in a piece of software I
> > am developing. I can't seem to
> > trap the EN_CHANGE and the EN_UPDATE messages. I have been able to trap the
> > EN_SETFOCUS
> > and EN_KILLFOCUS messages. I need some new things to try. I've tried
> > checking the high word of
> > the wParam of a WM_SYSCOMMAND with no luck.
> >
> > Shawn Barber
> > SBarber@Sikorsky.com
> >
> > **** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm)
> ****
> >
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own





      reply	other threads:[~1999-05-06  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-28  0:00 Win32ADA Edit Control Notification Shawn Barber
1999-05-06  0:00 ` guru_upya
1999-05-06  0:00   ` David Botton [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox