MSVC 2010: Allow context menu on console while typing
When I call cin
or getline
with cin in my Visual Studio 2010 C ++ application, I can type something into the console (as it should), but the context menu is "locked". It is not displayed - this means that I and my clients cannot use copy and paste.
- How to enable context menu in console using cin?
a source to share
This is the end user configuration for console windows. Click on the title icon, select properties, in the options tab, uncheck the box in QuickEdit mode.
However, copying and pasting is actually easier in QuickEdit mode: a right-click performs an immediate paste operation if there is text on the clipboard. The text is copied by highlighting, dragging the text to be copied and press "Enter" to place the text on the clipboard. Disabling QuickEdit is useful for console programs that directly consume mouse events.
I'm not sure if there is a programmatic method for switching the edit mode, but since by design the end user's preference would probably be a bad form to impose your own preference.
a source to share