🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #3631

Re: Disabling return in a dialog box

#3631
From: Bruce Blackshaw
Date: Thu, 12 Nov 1992 06:54
32 lines
1511 bytes
bruceb@ctpm.uq.oz.au (Bruce Blackshaw) writes:

>I'm using a multiline edit box in a dialog box, and want to
>stop the return key returning the dialog box - when the user
>presses the return key it should take them to the next line
>in the edit box.  Any ideas?  Please email replies.  If there is
>sufficient interest I'll post the (hopefully) solution.

Solved.  It wasn't that hard after all.  Simple trap the return key
using the below:
   
     void WMKeyDown(RTMessage Msg)
     {
       if (Msg.WParam == VK_RETURN)
       {
          SendMessage(HWindow, WM_CHAR, '\n', 0);
          SendMessage(HWindow, WM_CHAR, '\t', 0);
       }
       else
         DefWndProc(Msg);
     }


and replace it with \n\t so that the new line appears in the edit box.

Bruce.

--
****************************************************
Bruce Blackshaw bruceb@ctpm.uq.oz.au   
"... I'd rather be hang gliding ..."
****************************************************
Technical Details
Message-ID: <bruceb.721551282@babel.cltr.uq.oz.au>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!cltr.uq.OZ.AU!bruceb
References: <bruceb.721545170@babel.cltr.uq.oz.au>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!cltr.uq.OZ.AU!bruceb
From: bruceb@ctpm.uq.oz.au (Bruce Blackshaw)
Subject: Re: Disabling return in a dialog box
Message-ID: <bruceb.721551282@babel.cltr.uq.oz.au>
Sender: news@cltr.uq.OZ.AU (Mr. Time Waster)
Nntp-Posting-Host: pest.ctpm.uq.oz.au
Organization: Centre for Language Teaching and Research, Uni of Queensland, AUSTRALIA.
References: <bruceb.721545170@babel.cltr.uq.oz.au>
Date: 12 Nov 92 06:54:42 GMT
Lines: 32