Net Framework ComboBox undo cut copy paste, etc, operations

Viewed 65

In MFC there are at least a couple of ways of getting the child textbox of a ComboBox that I know of.

If someone knows how to do that in .Net, please do tell.

Failing that, I need to implement a custom context menu for a ComboBox (no problem) that includes some of the usual operations (undo, cut, copy, paste, etc) and this is a problem. The Net port of the ComboBox does not expose these methods (unlike MFC's CComboBox).

Any clues would be much appreciated.

1 Answers

It seems the ComboBox accepts WM_CUT, WM_COPY, and WM_PASTE messages via pinvoke SendMessage.

Unfortunately, no luck with WM_UNDO. No idea why. The ComboBox ignores this one.

So, SendKeys for "undo" and "select all".

This whole thing is a dirty hack workaround but, what can you do.

Related