🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #2918

Re: Can I use EN_KILLFOCUS for field-checking?

#2918
From: Norbert Unterberg
Date: Mon, 27 May 1991 09:33
16 lines
1185 bytes
 > >
 > >MessageBeep(0);
 > >SetFocus(hwndCtrl);
 > >SendDlgItemMessage(hDlg, nCtrlID, EN_SETSEL, 0, MAKELONG(0,32767));
 > >
 > The problem is that you are trying the set the focus back on
 > a kill focus notification.  SetFocus() is *not* reentrant, and
 > things will get truly screwed up.

You can use this way of checking, but you must replace thwe GetFocus(...)
with
PostMessage(hDlg, WM_NEXTDLGCTL, GetDlgItem(hDlg, nCtrlID), (LONG)TRUE);

Norbert
Dortmund, Germany
Technical Details
Message-ID: <1569357096@p4.f36.n245.z2.fidonet.org>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!unido!rwthinf!slcdec!hippo!f1.n6000.z2.fidonet.org!p4.f36.n245.z2.fidonet.org!Norbert_Unterberg
References: <7203@p1.f6.n242.z2.fidonet.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!unido!rwthinf!slcdec!hippo!f1.n6000.z2.fidonet.org!p4.f36.n245.z2.fidonet.org!Norbert_Unterberg
From: Norbert_Unterberg@p4.f36.n245.z2.fidonet.org (Norbert Unterberg)
Newsgroups: comp.windows.ms.programmer
Subject: Re: Can I use EN_KILLFOCUS for field-checking?
Message-ID: <1569357096@p4.f36.n245.z2.fidonet.org>
Date: 27 May 91 09:33:00 GMT
References: <7203@p1.f6.n242.z2.fidonet.org>
Reply-To: Norbert_Unterberg%p4.f36.n245.z2@hippo.dfv.rwth-aachen.de (Norbert Unterberg)
Organization: Point of SoftStream, Dortmund, Germany
Lines: 17
Comment-To: Paul_Bonneau@f1.n6000.z2.fidonet.org (Paul Bonneau)