| |

VerySource

 Forgot password?
 Register
Search
View: 960|Reply: 1

Little brother is unknown, the program switch problem

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 Thailand

Post time: 2020-2-19 23:30:01
| Show all posts |Read mode
For example, during program execution, I pause the execution by pressing a space, and resume execution with a space again.
Thank you all in advance
Reply

Use magic Report

0

Threads

23

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

Post time: 2020-4-27 21:15:01
| Show all posts
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.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list