What API is mIRC using to check Ctrl+Break? Is it using GetAsyncKeyState(VK_CANCEL)?

If so, perhaps a better way to do this would be to just check the individual keys directly. I tested the following and it seems to work just fine for me:

Code:
short down = 0x8000;
if (GetAsyncKeyState(VK_CONTROL) & down && GetAsyncKeyState(VK_PAUSE) & down) {
  /* break out of loop */
}


This would fix any bugs windows has with checking the VK_CANCEL vkey directly (w.r.t. letting go of control after break).

Also, this would allow you to check for an alternate key combination in the process (like Ctrl+Alt+Esc) for users without the Pause/Break key (you could do this regardless, of course).


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"