With only GetCapture() != es->hwndSelf statemet, the string selection will
occur
even if the capturing is done by external processes.
So what you are saying is that an external process captures the mouse, and somehow GetCapture() returns the handle of this edit. Why would that happen? How can the external process' window have the same handle as this edit? And BTW, what exactly do you mean by external process?