Another way to achieve your goal is to prevent content selection. When navigating through controls in a dialog box, the dialog manager asks the appropriate controls for specific properties related to their behavior. By default, the edit control responds with the DLGC_HASSETSEL flag (among others) to indicate to the dialog manager that its contents should be automatically selected.
To get around this, you must subclass the edit control and process the message
Iinspectable
source share