🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #3422

Re: EM_SETMODIFY

#3422
From: Paul Bonneau
Date: Tue, 25 Jun 1991 19:42
29 lines
1311 bytes
In article <1991Jun24.210619.13889@athena.mit.edu> memetral@athena.mit.edu (Max E. Metral) writes:
>I am trying to make an edit control read-only.
>
>The parent window is Parent, and the control is EDITCNT.
>
>	SendMessage(EDITCNT, EM_SETMODIFY, FALSE, NULL);
>	
>	or
>	
>	SendMessage(Parent, EM_SETMODIFY, FALSE, NULL);
>
>don't work.  What am I doing wrong?  The SDK man never says what value I should
>set the flag to to make it read-only...
>
EM_SETMODIFY merely sets (or clears) the "dirty" bit.  This
is set automatically whenever the contents of an edit are
changed.  This allows the app to know if they have been
changed since the last time it looked (by sending
EM_GETMODIFY).

As has been discussed recently, you can subclass the edit and
eat messages that can affect its contents.  These include:
	WM_CHAR,
	WM_CUT,
	WM_COPY,
	WM_PASTE, and
	WM_CLEAR.

cheers - Paul Bonneau.
Technical Details
Message-ID: <1991Jun25.194227.5890@hyper.hyper.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau
References: <1991Jun24.210619.13889@athena.mit.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.ms.programmer
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau
From: bonneau@hyper.hyper.com (Paul Bonneau)
Subject: Re: EM_SETMODIFY
Message-ID: <1991Jun25.194227.5890@hyper.hyper.com>
Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,)
Organization: HyperCube Inc.
References: <1991Jun24.210619.13889@athena.mit.edu>
Date: Tue, 25 Jun 1991 19:42:27 GMT