home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.tools
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!spool.mu.edu!snorkelwacker.mit.edu!bloom-picayune.mit.edu!yev_g
- From: yev_g@athena.mit.edu (Yevgeny Gurevich)
- Subject: Re: IS IT WINDOWS, OWL, OR ME?
- Message-ID: <1992Sep15.185141.4124@athena.mit.edu>
- Keywords: OWL Windows Borland BCW
- Sender: news@athena.mit.edu (News system)
- Nntp-Posting-Host: m4-035-18.mit.edu
- Organization: Massachusetts Institute of Technology
- References: <1992Sep15.001526.18454@cbnewsl.cb.att.com>
- Date: Tue, 15 Sep 1992 18:51:41 GMT
- Lines: 20
-
- In article <1992Sep15.001526.18454@cbnewsl.cb.att.com> ggh@cbnewsl.cb.att.com (gerald.g.heit) writes:
- >
- >My app uses a resource'd dialog for the main window and has
- >a multiline edit control, TEdit, that I like to come up as read only.
- >Then the user may click a radio button to make it fully
- >editable (and click again for readonly, etc.).
- >I experimented with TEdit and could not find a way to
- >merely toggle readonly on and off as I would have liked, so
-
- You certainly can toggle the "read-only"ness of an edit control. Simply
- use SendDlgItemMsg() to send an EM_READONLY message to the edit control.
- You pass a true or a false, depending on what you want the new attribute to
- be. I believe that you can also use the attributes of the control by
- doing something like EditBox.Attr.Style &= READONLY, although I am not
- really sure about which values to use in this case.
-
-
- --
- yev_g@athena.mit.edu
- 500 Memorial Drive, Cambridge, MA. [ Yevgeny Gurevich ]
-