| |

VerySource

 Forgot password?
 Register
Search
View: 812|Reply: 6

Small problem, bothering all night, come in and help, thank you!

[Copy link]

3

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-1-5 04:10:01
| Show all posts |Read mode
I have a program to trigger the OnComm event in the View class to read data from the serial port. Then I inserted an MSChart control to draw a real-time data curve. But I don't want to draw in the View class, I want to draw in a popup dialog. What bothers me now is: How to get real-time data from OnComm in the dialog class? ?
I asked an expert, and he gave me a sentence: add a message, send a message after receiving a data in OnComm. . . Then he left. . .
I don't quite understand (because of qualifications), ask you masters, what should I do? Please tell me please
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-5 11:09:02
| Show all posts
Can't put mscomm on the dialog?
Reply

Use magic Report

3

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-1-5 11:27:01
| Show all posts
I beg everyone for help ~~~ Hurry ~~~
Reply

Use magic Report

3

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-1-5 11:54:01
| Show all posts
Yeah, I put it on the dialog. The problem is: each time you read a data from the serial port, trigger an OnComm event (in the View class), accept it, I want to pass it to the dialog class for drawing, and the dialog box may not be created when the data is received The problem is that I don't know how to pass the data. How to use message?
Reply

Use magic Report

1

Threads

7

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-1-5 17:03:01
| Show all posts
If a dialog class object is created in the View class, and a suitable Arrange for storing data is created in the dialog class, the data read by the serial port is stored in the Arrange of the dialog class in the OnComm event of the View class. Are the data sources and tools for drawing in the dialog class? It should be easy to operate!
personal opinion for reference only:)
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-7 10:30:01
| Show all posts
Isn't this similar to implementing a progress bar in another dialog?
It should be able to handle it similarly, delivering messages in real time.
Reply

Use magic Report

3

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-1-29 11:54:01
| Show all posts
Thank you
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