|
It depends on the type of program. If it is of dos16 type, the continuous operation of the general program is in a loop. This way you can use the keyboard query method in the loop. If there is a space detected, continue to wait or run down to Suspend / restart the program. If it is a Win32 class, the continuous running of the program is generally implemented by threads. You can use SuspendThread () / ResumeThread () in the message processing subroutine of the main thread when there is a space hotkey Function to suspend / resume the corresponding thread. |
|