User Tools

Site Tools


Making a Text Window read-only (LBB)

by Richard Russell, September 2016

A TEXTEDITOR control (or a TEXTBOX) can easily be made read-only using the _ES_READONLY stylebit, but this doesn't work with a Text Window. You can achieve the desired result using the code below:

      open "Read Only Text Window" for text as #w
      hw = hwnd(#w)
      calldll #user32, "SendMessageA", hw as ulong, _
        _EM_SETREADONLY as long, 1 as long, 0 as long, r as long
      #w "The quick brown fox jumps over the lazy dog."
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information
making_20a_20text_20window_20read-only_20_28lbb_29.txt · Last modified: 2018/04/17 18:00 by tbest3112