For those new to message boards please try to follow a few simple rules when posting your question.
1. Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
1. Define exactly what you mean.
2. If you mean at the application level then analyze the application to find how input is handled. If at the OS level then read up on how to create input handlers (drivers.) Depending on what 'key' you want to disable then this might require different approaches.
3. Write the code
4. Test it.
Yes, you can use CreateEvent, change the folder, set its value in lpParam, then SetEvent to let the thread to reread lpParam and continue to work with a new folder.
Note, that thread must now wait for multiple objects!
Have a look at the WorkerThreads essay of Joe Newcomer.
It is MFC issue, but the main concept is the same as for plain Win32 API. Just look at the sections: Pausing a Thread and Thread Shutdown
Shutting down a thread from a view or main frame
Thread Shutdown Without Polling
(Well, you would need something similar to "Pausing" event.
I have a MFC app which list some files (from an HDD folder) into a CListCtrl. Is there any windows message to know when a files was deleted/copied with other app (e.g. Windws Explorer) from that folder where I listed the files ? I need that message in order to handle it to refresh my file list ...
There is nothing that will tell you when a file is "copied". There is really no such operation. All a copy is is a file being opened for read and another being opened for write. The bytes in the first file are read and then written to the second file. You cannot get a notification of the read but you can for the file being created. See the links the other have posted for that.