Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!hplabs!well!brent From: brent@well.UUCP (Brent Southard) Newsgroups: comp.windows.ms Subject: Re: Hilighting Text in edit fields Message-ID: <12583@well.UUCP> Date: 5 Jul 89 22:50:33 GMT References: <12265@polyslo.CalPoly.EDU> Reply-To: brent@well.UUCP (Brent Southard) Distribution: usa Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 17 In article <12265@polyslo.CalPoly.EDU> pdavid@polyslo.CalPoly.EDU (Paul C. David) writes: >Just wondering. Does anyone know how to highlight text >in edit fields, i.e. when the focus is set to it? You send the EM_SETSEL message to the edit window to highlight text. In order to do that when the window gets the focus, you will have to subclass the edit window and look for an incoming WM_SETFOCUS message. If you need more information on subclassing, try Petzold's book for a pretty good description. Subclassing is a necessary technique for doing involved Windows programming. brent -- brent southard (313) 656-8349 | oh mona mona ImageTech Corp (313) 362-3141 | you can close your eyes | i've got a twelve gauge surprise usenet: ...!well!brent | waiting for you -- James Taylor