home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / mswindo / programm / tools / 961 < prev    next >
Encoding:
Text File  |  1992-09-15  |  1.5 KB  |  34 lines

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