NO

Author Topic: reversing EM_SETREADONLY  (Read 4356 times)

tpekar

  • Guest
reversing EM_SETREADONLY
« on: October 30, 2012, 03:45:29 PM »
If I use SetWindowLong to disable input to an edit control with style EM_SETREADONLY, how do I reverse it to once again allow input to the edit control?  EM_UNDO doesn't seem to work.

tpekar

  • Guest
Re: reversing EM_SETREADONLY
« Reply #1 on: October 30, 2012, 04:29:36 PM »
Got it figured out.  Just needed to use SendMessage instead of SetWindowLong to set EM_SETREADONLY.  The third parameter sets the read only attribute based on a 1 or 0 (zero).

CommonTater

  • Guest
Re: reversing EM_SETREADONLY
« Reply #2 on: October 30, 2012, 04:47:42 PM »
You can also use EnableWindow() which is faster, greys the window and prevents tabbing to it when it's disabled.

If you don't have the Windows SDK you should download it... HERE  (You only need the Documentation. Pelles C supplies the rest)
 
 
 
« Last Edit: October 30, 2012, 08:41:20 PM by CommonTater »