I'm looking for a (sure) way to detect, if a childwindow is an editcontrol or not. Via classname isn't very sure...

Best regards,
Posted on 2006-11-29 11:02:17 by Nordwind64
Why? Windows registers "Edit" class during its startup (or is it during user32.dll startup? never mind.). If the class in question is "edit" (either in ANSI or UNICODE), then the control is an 'edit'. Problems may arise when an app uses its own custom-edits, or edits derived ('subclassed') from the original "Edit" class.
Posted on 2006-11-29 16:49:04 by ti_mo_n
ti_mo_n, nearly all editcontrols texteditors working with uses their own edit classes. Looking for "EDIT" as class is a sure way to found only some editcontrols...  :D
I need a way to test exististing controls.
Posted on 2006-11-29 23:30:08 by Nordwind64
You asked for 'edit' controls, not their derivatives :P
Posted on 2006-11-30 09:24:21 by ti_mo_n

Ok, now I ask for all controls I can edit texts...

Hm, my idea ist to use EM_GETLIMITTEXT (1) -> EM_SETLIMITTEXT (new) -> EM_GETLIMITTEXT (2) -> compare (1) and (2) ->  EM_SETLIMITTEXT (old). If (1)!=(2): Is edit.
The EM_ messages are nearly simulated by all custom edit controls... I will try that.


Posted on 2006-11-30 10:00:41 by Nordwind64
Works not.
I think, I had to read out the classnames for textpieces "EDIT", "TEXT" and "SCINTILLA"... works in 90 percent.
Posted on 2006-11-30 14:37:43 by Nordwind64