View previous topic :: View next topic |
Author |
Message |
dmonckton Contributor
Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Thu Oct 19, 2017 3:53 pm Post subject: Data Freeze |
|
|
Hi All
Its been a while!
I've written an app that uses the Windows API to send MIDI data to an attached synthesizer. The app is a sequencer so when I press the run button its sends data constantly. Everything is fine until I move the dialog box. When I start to move the dialog box the MIDI data stops until I release the dialog, it then starts sending again without problem. I know the API uses the handle of the dialog so its seems as if when I grab the dialog the message queue freezes. Is this normal behaviour for the message queue?
Kind regards
David |
|
Back to top |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Fri Oct 20, 2017 4:18 pm Post subject: |
|
|
I think that's normal for VDS made programs. I notice that one of my programs which downloads pages from a website can't be moved at all until it's in between downloading the files. Once it hits the :EVELOOP for me, that's when the dialog is allowed to move.
The only solution I can think of to your problem though is something I did long ago, which uses two separate VDS made programs. One program is the interface and interface only. The second program is the one that runs the behind the scenes code that I don't want interrupted. I communicate between the two programs via a text file which holds commands and replies to and from each other. Both programs check the file a couple of times per second. To insure that both do not try to write at the same time, the first line of the file contained a zero or a one to signify whether it was in use or not.
There might be something better or easier, but if there is, someone else will have to mention it.
~Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
Back to top |
|
|
dmonckton Contributor
Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Mon Oct 23, 2017 10:36 am Post subject: |
|
|
Hi Garrett
Thanks for the info, running the MIDI part as a separate process is a great idea, wish I'd thought of it!
Do you think I can use DDE to do the control or do you need a window present for DDE? I could use the Windows API for the Global Atom Table maybe.
Thanks
David |
|
Back to top |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Mon Oct 23, 2017 5:00 pm Post subject: |
|
|
I didn't try DDE with my program at the time. You might consider experimenting with that.
~Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
Back to top |
|
|
|