Software Archive
Read-only legacy content
17061 Discussions

No attention paid to control

peteg
Beginner
456 Views
I've written a dialog application using a recursive algorith to copy files from device/folder to another. Everything works well, except that during the copying process, no notice is taken of the 'Cancel' button (or in fact any other controls). The button works both before and after, so I'm happy that the callback routine is ok. In fact, the button doesn't actually seem to 'depress', which tells me that windows may be too busy copying the files to be listening.
Has anyone got any thoughts ?
0 Kudos
1 Reply
Intel_C_Intel
Employee
456 Views
Hi,

The way Windows works, nothing will happen in the user interface unless you are procesing the Windows messages in a timely fashion. That is, you can't just go off and do something that takes a long time and ignore the Windows messages. The DialogProgress sample is an example on one type of technique you can use. Another possibility is to make your program multi-threaded, with the main thread handling he UI and the other doing the work. I don't have an example of that.

Regards,
Leo
0 Kudos
Reply