User Tools

Site Tools


making_20a_20text_20window_20read-only_20_28lbb_29

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."
      wait
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
making_20a_20text_20window_20read-only_20_28lbb_29.txt · Last modified: 2024/01/05 00:22 by 127.0.0.1