> I want to make my CEditView object read-only i have tried
>
> ModifyStyle(0, GetStyle() | ES_READONLY) at OnInitialUpdateFunction for
> my
> CEditView derived class but this not work for me also I have tried this
> more complicated
> code at OnInitialUpdate but also doesn't work for me
>
> CEdit& edit = GetEditCtrl();
>
> edit.ModifyStyle(0, edit.GetStyle() | ES_READONLY)
>
> somebody knows how to achive that behavior????
For some reason edit boxes do not allow their key styles to be modified at
run time - they have to be created with them. You can try overriding
PreCreateWindow() for the CEditView (I hope it gets called!) and in that,
changing the style before passing on to the base class, thus trying to
ensure that it gets CREATED with your style.
However, a read-only CEditView isn't much more in terms of functionality
than a CScrollView - so an alternative would be to use a scroll view and
render the text yourself.
--
Jason Teagle
[EMAIL PROTECTED]
