| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | How can you complex procedures in the PM? |
Jonathan Tew wrote in a message to All: JT> I'm studying PM programming right now and have some JT> questions. According to my book there is the "one/tenth of JT> a second rule" which is your program should be able to JT> respond to the next message in the queue within this amount JT> of time. It says that it is ok to violate this occasionally JT> like on program load etc, but how can I get around the JT> message processing when I'm trying to run a Zmodem transfer JT> procedue that needs to update a dialog window every time a JT> block is transferred. Multi-threaded programs can't share JT> the same HAB or HMQ so how do I accomplish this. I think JT> the bottom line is that the Zmodem procedure still has to JT> check the message queue. Have the Zmodem transfer thread write its current status asynchronously into a structure in memory that you define. Then your thread that handles message processing can, when it runs, pull information out of this structure and display it to the user. It might also be a good idea to have the Zmodem thread acquire a RAM semaphore while it is updating the structure in order to prevent the message processing thread from reading partially updated data. Using this simple system, the information will only be updated when the message processing thread happens to be unblocked for another reason. If you want to force the message processing thread to run whenever the Zmodem transfer thread updates the shared data, then have the Zmodem transfer thread send a message to its own process with WinPostMsg() to wake up the message processing thread. JT> Another thing that bothers me is the lack of real examples JT> on how to use the dialog controls. I have two books and JT> neither of them cover anything more than back list boxes, JT> entry fields, and buttons. What about spin buttons, combo JT> boxes, etc? Is there any good sources such as books, JT> examples, etc that anyone could recommend? Do you have IBM's official PM Reference? This is a set of files provided with the Toolkit that are defined with the environment variable "PMREF" when you install the Toolkit: SET PMREF=PMFUN.INF+PMGPI.INF+PMHOK.INF+PMMSG.INF+PMREL.INF+PMWIN.INF+PMWKP.INF -- Mike ---* Origin: N1BEE BBS +1 401 944 8498 V.34/V.FC/V.32bis/HST16.8 (1:323/107) SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809 @PATH: 323/107 150 3615/50 396/1 270/101 105/103 42 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.