forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Data Freeze

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
dmonckton
Contributor
Contributor


Joined: 09 Aug 2002
Posts: 117
Location: Lewes, U.K.

PostPosted: Thu Oct 19, 2017 3:53 pm    Post subject: Data Freeze Reply with quote

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
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Fri Oct 20, 2017 4:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
dmonckton
Contributor
Contributor


Joined: 09 Aug 2002
Posts: 117
Location: Lewes, U.K.

PostPosted: Mon Oct 23, 2017 10:36 am    Post subject: Reply with quote

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
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Mon Oct 23, 2017 5:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group