Article View: comp.os.os2.programmer
Article #3244Returning the focus to an entry control
From: Kenneth Porter
Date: Sun, 30 Jun 1991 22:07
Date: Sun, 30 Jun 1991 22:07
13 lines
997 bytes
997 bytes
I have a dialog box with several entry boxes. The valid values are a range of numbers. Upon receiving EN_KILLFOCUS, I want to pop up a message box if the entered value doesn't meet the requirements and return the focus to the offending entry box. I can get the message box to pop up, but WinSetFocus doesn't return the focus to the offending entry box. I'm using the code from the QuickHelp example that calls WinSetFocus immediately after WinMessageBox from within the EN_KILLFOCUS handler. What am I doing wrong? The focus just goes to the next control (whatever the user selected). Ken (shiva@well.sf.ca.us)
Technical Details
Message-ID:
<25805@well.sf.ca.us>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!well!shivaShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!well!shiva From: shiva@well.sf.ca.us (Kenneth Porter) Newsgroups: comp.os.os2.programmer Subject: Returning the focus to an entry control Keywords: entry focus verification Message-ID: <25805@well.sf.ca.us> Date: 30 Jun 91 22:07:42 GMT Distribution: comp Lines: 13