M
Mark
Hello
I've got a combo box control on a form with its DropDownStyle set to
DropDown (so the user can still type in it).
The problem is when the user tabs to the combo box all the text is
highlighted in the Text Box (Edit class) part of the ComboBox, whereas I only
want certain text highlighted.
I've tried putting code in the CombBox Enter event to set the SelectionStart
and SelectionLength properties accordingly, but the ComboBox control seems to
reset these values after the Enter event to highlight all the text.
So I've used Spy++ and I can see that the Text Box (Edit class) part of the
combo box receives the EM_SETSEL message when the selection is being set.
Can someone please show me how I can subclass the EM_SETSEL message on the
ComboBox control and cancel it, so all the text doesn't get selected?
I'm using VS2005.
Many thanks
I've got a combo box control on a form with its DropDownStyle set to
DropDown (so the user can still type in it).
The problem is when the user tabs to the combo box all the text is
highlighted in the Text Box (Edit class) part of the ComboBox, whereas I only
want certain text highlighted.
I've tried putting code in the CombBox Enter event to set the SelectionStart
and SelectionLength properties accordingly, but the ComboBox control seems to
reset these values after the Enter event to highlight all the text.
So I've used Spy++ and I can see that the Text Box (Edit class) part of the
combo box receives the EM_SETSEL message when the selection is being set.
Can someone please show me how I can subclass the EM_SETSEL message on the
ComboBox control and cancel it, so all the text doesn't get selected?
I'm using VS2005.
Many thanks