Boost logo

Boost Users :

From: Andreas Wehrmann (a.wehrmann_at_[hidden])
Date: 2019-07-16 06:50:14


On 16.07.19 02:27, Gavin Lambert via Boost-users wrote:
> On 15/07/2019 18:34, Dominique Devienne wrote:
>> On Fri, Jul 12, 2019 at 7:11 AM Christopher Pisz wrote:
>>
>>     It ends up that my problem is that if you click on a console window
>>     in windows 10, the program ceases execution when it enters "quick
>>     edit" mode.
>>
>>     I was not aware of that new behavior and thought the timer was not
>>     working. The program run fine, as is, if you don't touch the mouse.
>>
>> FWIW, that's not new behavior. It's always been that way in the DOS
>> console. --DD
>
> Prior to Windows 10, QuickEdit was disabled by default, though. It
> only paused if you selected the Mark menu option explicitly, not if
> you simply left-clicked the window.  (Unless you enabled that option
> yourself.)
>
> You can turn QuickEdit off in the console properties if it's annoying.
>

For what it's worth:
I ran into the same "problem" when I was porting some apps to Windows 10;
so I decided to restore the old behaviour by running this code during
startup (when starting inside a console):

static void console_disable_quick_edit()
{
     DWORD console_mode;
     HANDLE console_handle = GetStdHandle( STD_INPUT_HANDLE );

     if( NULL == console_handle )
     { return; }

     if( GetConsoleMode( console_handle, &console_mode ) )
     {
         console_mode &= ~ENABLE_QUICK_EDIT_MODE;
         SetConsoleMode( console_handle, (console_mode | ENABLE_EXTENDED_FLAGS) );
     }

     CloseHandle( console_handle );
}

Regards, Andreas


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net