Newsgroups: comp.windows.ms.programmer Path: utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau From: bonneau@hyper.hyper.com (Paul Bonneau) Subject: Re: Read-only Edit Windows Message-ID: <1991Jun13.200446.25992@hyper.hyper.com> Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,) Organization: HyperCube Inc. References: <5266@servax0.essex.ac.uk> <783@wsl.ie> Date: Thu, 13 Jun 1991 20:04:46 GMT In article <783@wsl.ie> jja@wsl.ie (John Allen on wsl) writes: >In article <5266@servax0.essex.ac.uk> whisd@essex.ac.uk (Whiteside S D B) writes: >> >>I had a query about Read-Only Edit windows. >> >>Many thanks to all who sent me suggestions on how to implement them. >> >>Following up on some of them, I have found one solution to the problem: >> >>i) Subclass the edit window (using SetWindowLong, GetWindowLong and >>CallWindowProc to insert your window procedure before the default one) >> > >Forgive me if I'm missing something, but >what is wrong with > >EnableWnd(hEditWnd, FALSE); // can't edit >EnableWnd(hEditWnd, TRUE); // can edit. If your edit is a scrollable (ES_AUTOHSCROLL or a multi line edit for example), it is nice to be able to scroll it without allowing the user to edit it. Disbaling the edit, will disable scrolling via the mouse or keyboard. cheers - Paul Bonneau.