| |

VerySource

 Forgot password?
 Register
Search
View: 894|Reply: 9

How to achieve the effect like the CPU usage record and memory usage record in the task manager

[Copy link]

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-3-8 02:00:01
| Show all posts |Read mode
That is, the value of a certain data changes continuously with time, forming a continuously changing curve. And the curve only displays the data of the last 3 minutes
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-6-6 20:45:01
| Show all posts
Simple math problem?

SetTimer(), change every second, or milliseconds
Reply

Use magic Report

0

Threads

22

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-6-8 18:45:02
| Show all posts
Timed redraw
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-6-11 15:00:01
| Show all posts
Redraw, isn't it necessary to redraw every second? Who has examples?
Reply

Use magic Report

0

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-6-11 15:30:01
| Show all posts
How to solve the problem of flicker and efficiency
For example, it can be designed that the picture is moved forward, that is, when the next drawing is made, the same picture of the previous time is copied forward, and then only the points added later need to be drawn to consider the problem of data alignment.
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 United States

 Author| Post time: 2020-6-12 01:15:02
| Show all posts
Oh, and I want to display many graphs of different data in the same interface at the same time, will it affect the system speed
Reply

Use magic Report

0

Threads

9

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 Invalid IP Address

Post time: 2020-6-14 10:45:01
| Show all posts
Is it just a drawing?
Fetch data in real time and draw in real time? The news in the station gives you an example, sine wave ~
Reply

Use magic Report

0

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-6-15 01:45:02
| Show all posts
Can be encapsulated into a curve drawing class, and then start a thread for each curve drawn
Reply

Use magic Report

0

Threads

59

Posts

43.00

Credits

Newbie

Rank: 1

Credits
43.00

 China

Post time: 2020-6-17 17:30:01
| Show all posts
I have written source code before.

Collect data through a timer, and then determine the relative coordinate position of the current point according to the ratio of this data, define a POINT[100] array, leave an element to store the current coordinate value, and then turn the current element value to The last 99 elements are moved in. Of course, the array elements should be moved as a whole, and the last one discarded is the same as the queue data structure. After all the elements are moved, then draw them out.

The drawn effect may flicker. Of course, double buffering will not be used.
Reply

Use magic Report

0

Threads

12

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-7-6 18:30:01
| Show all posts
Polyline POINT[100]
First switch to MemDC and then Bitblt comes out
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