SetConsoleCtrlHandler issue in while loop
I've developed a console interface which basically runs in a while loop until the user chooses to exit the program before it leaves the while loop, I've used SetConsoleCtrlHandler to capture ctrl+c and ctrl+break, but when I press ctrl+c when I'm in the while loop (the main event loop), it jumps out of the while loop (even though SetConsoleCtrlHandler stops ctlr+c from killing the program immediately)
Is there a way I can stop ctrl+c/ctrl+break from jumping out of the while loop? many thanks in advance

